diff --git a/migrations/20230426221940_init.up.sql b/migrations/20230426221940_init.up.sql index da7493d..d8ecb6a 100644 --- a/migrations/20230426221940_init.up.sql +++ b/migrations/20230426221940_init.up.sql @@ -34,13 +34,12 @@ create table if not exists watch_quests ( priority int, -- 1-5 how much do you want to watch it public boolean not null default true, watched boolean not null default false, - when_added int not null default (unixepoch()), when_watched int, + created_at 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 (watch) references watches (id) on delete cascade on update no action, - primary key (user, watch) -) without rowid; + foreign key (watch) references watches (id) on delete cascade on update no action +); -- 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/