fix: update watchlist schema to only allow completed, dropped, plan_to_watch
This commit is contained in:
@@ -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)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user