Skip to content

Database Schema

Andrew Murray edited this page Feb 6, 2022 · 9 revisions

Users

column name data type details
id integer not null, primary key
username varchar not null, unique
email varchar not null, unique
hashedPassword varchar not null
createdAt timestamp not null
updatedAt timestamp not null

Notes

column name data type details
id integer not null, primary key
name varchar
content text
userId integer not null, foreign key
notebookId integer foreign key
createdAt timestamp not null
updatedAt timestamp not null

Notebooks

column name data type details
id integer not null, primary key
title varchar not null
userId integer not null, foreign key
createdAt timestamp not null
updatedAt timestamp not null

Tags

column name data type details
id integer not null, primary key
name varchar not null
userId integer not null, foreign key
createdAt timestamp not null
updatedAt timestamp not null

NoteTags

column name data type details
id integer not null, primary key
noteId integer not null, foreign key
tagId integer not null, foreign key
createdAt timestamp not null
updatedAt timestamp not null

db schema image

Clone this wiki locally