Skip to content

Database Schema

Brandon Laursen edited this page Nov 14, 2021 · 5 revisions

Users

Column Type Data type Details
id integer not null, primary key
username varchar(25) not null, unique
email varchar(100) not null, unique
hashedPassword varchar not null
profilPicUrl varchar not null
darkMode boolean not null
createdAt timestamp not null
updatedAt timestamp not null

NoteBooks

Column Type Data type Details
id integer not null, primary key
userId integer not null, foreign Key
title varchar(25) not null,
bannerPicUrl varchar not null
createdAt timestamp not null
updatedAt timestamp not null

userId references Users Table

Notes

Column Type Data type Details
id integer not null, primary key
userId integer not null, foreign Key
notebookId integer not null, foreign Key
title varchar(25) not null,
content varchar not null
createdAt timestamp not null
updatedAt timestamp not null

userId references Users Table

notebookId references Notebooks Table

Clone this wiki locally