Initial code changes to support new db redesign.
This commit is contained in:
@@ -1,31 +1,32 @@
|
||||
-- # migrate_up
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "state"
|
||||
CREATE TABLE "state"
|
||||
(
|
||||
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"type" text NOT NULL,
|
||||
"updated" integer NOT NULL,
|
||||
"watched" integer NOT NULL DEFAULT 0,
|
||||
"meta" text NULL,
|
||||
"guid_plex" text NULL,
|
||||
"guid_imdb" text NULL,
|
||||
"guid_tvdb" text NULL,
|
||||
"guid_tmdb" text NULL,
|
||||
"guid_tvmaze" text NULL,
|
||||
"guid_tvrage" text NULL,
|
||||
"guid_anidb" text NULL
|
||||
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"type" text NOT NULL,
|
||||
"updated" integer NOT NULL,
|
||||
"watched" integer NOT NULL DEFAULT '0',
|
||||
"via" text NOT NULL,
|
||||
"title" text NOT NULL,
|
||||
"year" integer NULL,
|
||||
"season" integer NULL,
|
||||
"episode" integer NULL,
|
||||
"parent" text NULL,
|
||||
"guids" text NULL,
|
||||
"extra" text NULL
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS "state_type" ON "state" ("type");
|
||||
CREATE INDEX IF NOT EXISTS "state_watched" ON "state" ("watched");
|
||||
CREATE INDEX IF NOT EXISTS "state_updated" ON "state" ("updated");
|
||||
CREATE INDEX IF NOT EXISTS "state_meta" ON "state" ("meta");
|
||||
CREATE INDEX IF NOT EXISTS "state_guid_plex" ON "state" ("guid_plex");
|
||||
CREATE INDEX IF NOT EXISTS "state_guid_imdb" ON "state" ("guid_imdb");
|
||||
CREATE INDEX IF NOT EXISTS "state_guid_tvdb" ON "state" ("guid_tvdb");
|
||||
CREATE INDEX IF NOT EXISTS "state_guid_tvmaze" ON "state" ("guid_tvmaze");
|
||||
CREATE INDEX IF NOT EXISTS "state_guid_tvrage" ON "state" ("guid_tvrage");
|
||||
CREATE INDEX IF NOT EXISTS "state_guid_anidb" ON "state" ("guid_anidb");
|
||||
CREATE INDEX "state_type" ON "state" ("type");
|
||||
CREATE INDEX "state_updated" ON "state" ("updated");
|
||||
CREATE INDEX "state_watched" ON "state" ("watched");
|
||||
CREATE INDEX "state_via" ON "state" ("via");
|
||||
CREATE INDEX "state_title" ON "state" ("title");
|
||||
CREATE INDEX "state_year" ON "state" ("year");
|
||||
CREATE INDEX "state_season" ON "state" ("season");
|
||||
CREATE INDEX "state_episode" ON "state" ("episode");
|
||||
CREATE INDEX "state_parent" ON "state" ("parent");
|
||||
CREATE INDEX "state_guids" ON "state" ("guids");
|
||||
CREATE INDEX "state_extra" ON "state" ("extra");
|
||||
|
||||
-- # migrate_down
|
||||
|
||||
|
||||
Reference in New Issue
Block a user