-
Notifications
You must be signed in to change notification settings - Fork 1
Database Schema
sophiebui edited this page Feb 3, 2022
·
10 revisions

| column name | data type | detail |
|---|---|---|
| id | integer | not null, primary key |
| username | string | not null, unique |
| passwordHash | binary | not null |
| bio | text | |
| created_at | timestamp | not null |
| updated_at | timestamp | not null |
| column name | data type | detail |
|---|---|---|
| id | integer | not null, primary key |
| user_id | integer | not null, foreign key |
| deck_id | integer | not null |
| toStudy | boolean | not null |
| created_at | timestamp | not null |
| updated_at | timestamp | not null |
-
user_idreferencesusers.id -
deck_idreferencesdecks.id
| column name | data type | detail |
|---|---|---|
| id | integer | not null, primary key |
| user_id | integer | not null, foreign key |
| card_id | integer | not null |
| isCorrect | boolean | not null |
| created_at | timestamp | not null |
| updated_at | timestamp | not null |
-
user_idreferencesusers.id -
card_idreferencescards.id
| column name | data type | detail |
|---|---|---|
| id | integer | not null, primary key |
| title | string | not null |
| description | string | |
| user_id | integer | not null, foreign key |
| created_at | timestamp | not null |
| updated_at | timestamp | not null |
-
user_idreferencesusers.id
| column name | data type | detail |
|---|---|---|
| id | integer | not null, primary key |
| front | string | not null |
| back | string | not null |
| deck_id | integer | not null, foreign key |
| created_at | timestamp | not null |
| updated_at | timestamp | not null |
-
deck_idreferencesdecks.id
| column name | data type | detail |
|---|---|---|
| id | integer | not null, primary key |
| name | string | not null |
| deck_id | integer | not null, foreign key |
| created_at | timestamp | not null |
| updated_at | timestamp | not null |
-
deck_idreferencesdecks.id
| column name | data type | detail |
|---|---|---|
| id | integer | not null, primary key |
| content | text | not null |
| user_id | integer | not null, foreign key |
| deck_id | integer | not null, foreign key |
| created_at | timestamp | not null |
| updated_at | timestamp | not null |
-
user_idreferencesusers.id -
deck_idreferencesdecks.id