You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username TEXT NOT NULL, hash TEXT NOT NULL);
CREATE TABLE sqlite_sequence(name,seq);
CREATE UNIQUE INDEX username ON users (username);
CREATE TABLE notes (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, name TEXT NOT NULL, timestamp TIMESTAMP NOT NULL, content TEXT NOT NULL, owner INTEGER REFERENCES users(id) DEFAULT 0 NOT NULL);
CREATE TABLE note_access (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, userid INTEGER REFERENCES users(id) NOT NULL, noteid INTEGER REFERENCES notes(id) NOT NULL, CONSTRAINT unique_userid_noteid UNIQUE (userid, noteid));