Skip to content

Database Schema

John Chen edited this page Oct 1, 2020 · 1 revision

users

column name data type details
id integer primary key, not null
first_name string (40) not null
last_name string (40) not null
email string not null, unique
hashed_password string not null
picUrl string
created_at datetime not null
updated_at datetime not null

User Decks

column name data type details
id integer primary key, not null
user_id integer foreign key (users.id)
deck_id integer foreign key (decks.id)
created_at datetime not null
updated_at datetime not null

Decks

column name data type details
id integer primary key, not null
deck string (300)
deck_photo string (300)
created_at datetime not null
updated_at datetime not null

Cards

column name data type details
id integer primary key, not null
card string (300)
card_front string (300)
card_back string (300)
card_photo string (300)
card_audio string (300)
deck_id integer foreign key ('decks.id')
created_at datetime not null
updated_at datetime not null
Clone this wiki locally