-
Notifications
You must be signed in to change notification settings - Fork 0
Schema
Josh Bubar edited this page Dec 8, 2020
·
11 revisions
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
full_name |
string | not null, indexed |
email |
string | not null, indexed, unique |
team_id |
string | not null, indexed, unique |
password_digest |
string | not null |
session_token |
string | not null, indexed, unique |
created_at |
datetime | not null |
updated_at |
datetime | not null |
- index on
email, unique: true - index on
team_id - index on
full_name - index on
session_token, unique: true
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
name |
string | not null, indexed, unique |
created_at |
datetime | not null |
updated_at |
datetime | not null |
- index on
name, unique: true
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
name |
text | not null |
description |
text | |
due_date |
date | |
owner_id |
integer | not null, indexed, foreign key |
team_id |
string | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
owner_idreferencesusers -
team_idreferencesusers - index on
owner_id - index on
team_id
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
body |
string | not null |
project_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated at |
datetime | not null |
-
author_idreferencesusers -
project_idreferencesprojects - index on
author_id - index on
project_id
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
body |
text | not null |
section_id |
integer | not null, indexed, foreign key |
assignee_id |
integer | indexed, foreign key |
due_date |
date | |
status |
datetime | not null |
updated_at |
datetime | not null |
-
section_idreferencessections -
assignee_idreferencesusers - index on
section_id - index on
assignee_id
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
collaborator_id |
integer | not null, indexed, foreign key |
task_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
collaborator_idreferencesusers -
task_idreferencestasks - index on
[:task_id, :collaborator_id], unique: true
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
project_id |
integer | not null, indexed, foreign key |
title |
text | not null |
description |
text | |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
project_idreferencesprojects - index on
project_id
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
field_id |
integer | not null, indexed, foreign key |
body |
text | not null |
color |
text | |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
field_idreferencesfields - index on
field_id
| column name | data type | details |
|---|---|---|
id |
integer | not null, primary key |
user_id |
integer | not null, indexed, foreign key |
project_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
user_idreferencesusers -
project_idreferencesprojects - index on
[:project_id, :user_id], unique: true
Inspired by Bluebird wiki