-
Notifications
You must be signed in to change notification settings - Fork 1
Database Schema
rzh150030 edited this page May 28, 2021
·
6 revisions
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
username | string | not null, |
string | not null, unique | |
hashedPassword | string | not null |
professionalUser | boolean | not null |
created_at | datetime | not null |
updated-at | datetime | not null |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
question | string | not null |
voteCount | integer | not null |
userId | integer | not null, foreign key |
created_at | datetime | not null |
updated-at | datetime | not null |
-
userId
referencesusers
table
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
answer | string | not null |
voteCount | integer | not null |
userId | integer | not null, foreign key |
questionId | integer | not null, foreign key |
created_at | datetime | not null |
updated-at | datetime | not null |
-
userId
referencesusers
table -
questionId
referencesquestions
table
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
comment | string | not null |
userId | integer | not null, indexed, foreign key |
answerId | integer | indexed, foreign key |
-
userId
referencesusers
table -
answerId
referencesanswers
table