use implicit rowid primary key for quests

This commit is contained in:
Joe Ardent 2023-07-14 17:13:31 -07:00
parent f6b5b181d8
commit 2c7990ff09

View file

@ -34,13 +34,12 @@ create table if not exists watch_quests (
priority int, -- 1-5 how much do you want to watch it priority int, -- 1-5 how much do you want to watch it
public boolean not null default true, public boolean not null default true,
watched boolean not null default false, watched boolean not null default false,
when_added int not null default (unixepoch()),
when_watched int, when_watched int,
created_at int not null default (unixepoch()),
last_updated int not null default (unixepoch()), last_updated int not null default (unixepoch()),
foreign key (user) references users (id) on delete cascade on update no action, foreign key (user) references users (id) on delete cascade on update no action,
foreign key (watch) references watches (id) on delete cascade on update no action, foreign key (watch) references watches (id) on delete cascade on update no action
primary key (user, watch) );
) without rowid;
-- friend lists; this should really be a graph db, maybe the whole thing should be -- friend lists; this should really be a graph db, maybe the whole thing should be
-- TODO: look into replacing sqlite with https://www.cozodb.org/ -- TODO: look into replacing sqlite with https://www.cozodb.org/