From e8054c6cf2322212e240099659f1374a47b83f43 Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Mon, 27 Jun 2022 00:41:04 -0700 Subject: [PATCH] update table definitions --- sql/history.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/history.sql b/sql/history.sql index 74c6d65..787180a 100644 --- a/sql/history.sql +++ b/sql/history.sql @@ -24,7 +24,7 @@ CREATE TABLE IF NOT EXISTS watch_history ( episode_number integer NOT NULL, watch_date DATETIME NOT NULL, CHECK (LENGTH(anime_name) > 0), - UNIQUE (anime_name, episode_number, watch_date) + UNIQUE (anime_name, episode_number) ); CREATE TABLE IF NOT EXISTS search_history ( @@ -34,6 +34,6 @@ CREATE TABLE IF NOT EXISTS search_history ( CHECK (LENGTH(anime_name) > 0) ); -CREATE UNIQUE INDEX IF NOT EXISTS anime_search_idx ON search_history (anime_name, search_date); +CREATE UNIQUE INDEX IF NOT EXISTS anime_search_idx ON search_history (anime_name); CREATE UNIQUE INDEX IF NOT EXISTS watch_anime_episode_idx ON watch_history (anime_name, episode_number); CREATE UNIQUE INDEX IF NOT EXISTS dir_filename_idx ON file_history (directory, filename);