-
Notifications
You must be signed in to change notification settings - Fork 0
Database Schema
Justin Stoctkon edited this page Jul 22, 2022
·
16 revisions

| Column Name | Data Type | Details |
|---|---|---|
| id | integer | not null, primary key |
| username | string(20) | not null, unique |
| string(100) | not null, unique | |
| hashedPassword | string(100) | not null |
| createdAt | timestamp | not null |
| updatedAt | timestamp | not null |
| Column Name | Data Type | Details |
|---|---|---|
| id | integer | not null, primary key |
| userId | integer | not null, FK Users |
| cardId | integer | not null, FK Cards |
| Column Name | Data Type | Details |
|---|---|---|
| id | integer | not null, primary key |
| ownerId | integer | not null, FK Users |
| name | string(50) | not null |
| Column Name | Data Type | Details |
|---|---|---|
| id | integer | not null, primary key |
| boardId | integer | not null, FK Boards |
| workspaceId | integer | not null, FK Workspaces |
| username | string(20) | not null |
| name | string(50) | not null |
| position | integer | not null, default 1 |
| Column Name | Data Type | Details |
|---|---|---|
| id | integer | not null, primary key |
| workspaceId | integer | not null, FK Workspaces |
| username | string(20) | not null |
| name | string(50) | not null |
| color | string(100) |
| Column Name | Data Type | Details |
|---|---|---|
| id | integer | not null, primary key |
| boardId | integer | not null, FK Boards |
| username | string(20) | not null |
| name | string(50) | not null |
| description | Text | not null |
| color | string(100) | |
| position | integer | not null, default 1 |

| Column Name | Data Type | Details |
|---|---|---|
| id | integer | not null, primary key |
| userId | integer | not null, FK Users |
| cardId | integer | not null, FK Cards |
| comment | Text | not null |
| createdAt | timestamp | not null |
| updatedAt | timestamp | not null |
| Column Name | Data Type | Details |
|---|---|---|
| id | integer | not null, primary key |
| userId | integer | not null, FK Users |
| cardId | integer | not null, FK Cards |
| name | string(50) | not null |
| createdAt | timestamp | not null |
| updatedAt | timestamp | not null |
| Column Name | Data Type | Details |
|---|---|---|
| id | integer | not null, primary key |
| checklistId | integer | not null, FK Checklists |
| checked | Boolean | not null, default False |
| name | string(50) | not null |
| Model | Has Many | Belongs to Many | Belongs to One |
|---|---|---|---|
| Users | BoardRelationships, Workspaces, Comments, Boards, Stacks, Cards, Checklists | N/A | N/A |
| BoardRelationships | N/A | Users, Workspaces | N/A |
| Workspaces | BoardRelationships, Boards, Stacks | Users | Users (owner) |
| Boards | Stacks | N/A | Workspaces |
| Stacks | Cards | N/A | Boards, Workspaces |
| Cards | Comments, Checklists | N/A | Stacks |
| Comments | N/A | N/A | Cards, Users |
| Checklists | ChecklistItems | N/A | Cards, Users |
| ChecklistItems | N/A | N/A | Checklists |