Skip to content

Database Schema

sonwuana1 edited this page May 27, 2021 · 2 revisions

Database Schema

users

column name data type details
id integer not null, primary key
name string not null,
email string not null,
hashedPassword binary string not null, unique
created_at datetime not null
updated-at datetime not null
  • index on email, unique: true

album

column name data type details
id integer not null, primary key
name string not null
userId integer not null, foreign key
created_at datetime not null
updated-at datetime not null
  • userId references users table

photo

column name data type details
id integer not null, primary key
name string not null
photoLink string not null
userId integer not null, foreign key
albumId integer not null, foreign key
created_at datetime not null
updated-at datetime not null
  • userId references users table. 'album' referenced 'album' table.
Clone this wiki locally