mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-11-22 03:19:53 -08:00
update search table sql to not allow duplicate anime names
This commit is contained in:
parent
54cad7d62b
commit
9bd2b94bda
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user