mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2025-12-05 02:53:37 -08:00
update search table sql to not allow duplicate anime names
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
CREATE TABLE IF NOT EXISTS search_history (
|
||||
CREATE TABLE search_history (
|
||||
id integer PRIMARY KEY AUTOINCREMENT,
|
||||
anime_name varchar(200) NOT NULL,
|
||||
anime_name varchar(200) NOT NULL UNIQUE,
|
||||
search_date DATETIME NOT NULL,
|
||||
CHECK (LENGTH(anime_name) > 0),
|
||||
UNIQUE (anime_name, search_date)
|
||||
CHECK (LENGTH(anime_name) > 0)
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS anime_search_idx ON search_history (anime_name, search_date);
|
||||
CREATE UNIQUE INDEX anime_search_idx ON search_history (anime_name, search_date);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user