go/sqliteutil/test-migrations/000.sql
2024-11-11 06:36:55 +01:00

10 lines
282 B
SQL

CREATE TABLE users(
UserID BIGINT NOT NULL PRIMARY KEY,
Email TEXT NOT NULL UNIQUE);
CREATE TABLE user_notes(
UserID BIGINT NOT NULL REFERENCES users(UserID),
NoteID BIGINT NOT NULL,
Note Text NOT NULL,
PRIMARY KEY(UserID,NoteID));