From 41c142248daa12911e63db71212ce58934cececb Mon Sep 17 00:00:00 2001 From: mkelvers Date: Sat, 25 Apr 2026 16:30:31 +0200 Subject: [PATCH] fix: update watchlist schema to only allow completed, dropped, plan_to_watch --- migrations/001_init.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/migrations/001_init.sql b/migrations/001_init.sql index 5d505ce..f3a2932 100644 --- a/migrations/001_init.sql +++ b/migrations/001_init.sql @@ -32,8 +32,11 @@ CREATE TABLE IF NOT EXISTS watch_list_entry ( id TEXT PRIMARY KEY, user_id TEXT NOT NULL REFERENCES user(id) ON DELETE CASCADE, anime_id INTEGER NOT NULL REFERENCES anime(id) ON DELETE CASCADE, - status TEXT NOT NULL CHECK(status IN ('watching', 'completed', 'on_hold', 'dropped', 'plan_to_watch')), + status TEXT NOT NULL CHECK(status IN ('completed', 'dropped', 'plan_to_watch')), created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + current_episode INTEGER DEFAULT 0, + last_episode_at DATETIME, + current_time_seconds REAL NOT NULL DEFAULT 0, UNIQUE(user_id, anime_id) );