-- migrations/0001_notes.sql: each row is kept for the user who added it, its owner. CREATE TABLE "notes" ( id bigserial PRIMARY KEY, owner text NOT NULL, title text NOT NULL CHECK (title <> '') ); CREATE INDEX ON "notes" (owner, id);