Skip to content

Database Schema

DanielLaV edited this page Feb 3, 2022 · 10 revisions

Users

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

User_study_deck

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_id references users.id deck_id references decks.id

User_study_card

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_id references users.id card_id references cards.id

Comments

column name data type detail
id integer not null, primary key
userId integer not null, foreign key
storyId integer not null, foreign key
content text
created_at timestamp not null
updated_at timestamp not null

userId references users.id

storyId references story.id

Clone this wiki locally