2017-10-16 23:27:19 +00:00
|
|
|
BEGIN TRANSACTION;
|
|
|
|
CREATE TABLE "table_shows" (
|
|
|
|
`tvdbId` INTEGER NOT NULL UNIQUE,
|
|
|
|
`title` TEXT NOT NULL,
|
|
|
|
`path` TEXT NOT NULL UNIQUE,
|
|
|
|
`languages` TEXT,
|
|
|
|
`hearing_impaired` TEXT,
|
|
|
|
`sonarrSeriesId` INTEGER NOT NULL UNIQUE,
|
|
|
|
`overview` TEXT,
|
|
|
|
`poster` TEXT,
|
|
|
|
`fanart` TEXT,
|
|
|
|
PRIMARY KEY(`tvdbId`)
|
|
|
|
);
|
|
|
|
CREATE TABLE "table_settings_sonarr" (
|
|
|
|
`ip` TEXT NOT NULL,
|
|
|
|
`port` INTEGER NOT NULL,
|
|
|
|
`base_url` TEXT,
|
|
|
|
`ssl` INTEGER,
|
|
|
|
`apikey` TEXT
|
|
|
|
);
|
|
|
|
INSERT INTO `table_settings_sonarr` (ip,port,base_url,ssl,apikey) VALUES ('127.0.0.1',8989,'/','False',Null);
|
|
|
|
CREATE TABLE "table_settings_providers" (
|
|
|
|
`name` TEXT NOT NULL UNIQUE,
|
|
|
|
`enabled` INTEGER,
|
|
|
|
PRIMARY KEY(`name`)
|
|
|
|
);
|
|
|
|
CREATE TABLE "table_settings_languages" (
|
|
|
|
`code3` TEXT NOT NULL UNIQUE,
|
|
|
|
`code2` TEXT,
|
|
|
|
`name` TEXT NOT NULL,
|
|
|
|
`enabled` INTEGER,
|
|
|
|
PRIMARY KEY(`code3`)
|
|
|
|
);
|
|
|
|
CREATE TABLE "table_settings_general" (
|
|
|
|
`ip` TEXT NOT NULL,
|
|
|
|
`port` INTEGER NOT NULL,
|
|
|
|
`base_url` TEXT,
|
2017-10-18 19:37:23 +00:00
|
|
|
`path_mapping` TEXT,
|
2017-10-28 01:41:24 +00:00
|
|
|
`log_level` TEXT,
|
|
|
|
`branch` TEXT,
|
|
|
|
`auto_update` INTEGER
|
2017-10-16 23:27:19 +00:00
|
|
|
);
|
2017-11-16 02:07:21 +00:00
|
|
|
INSERT INTO `table_settings_general` (ip,port,base_url,path_mapping,log_level, branch, auto_update) VALUES ('0.0.0.0',6767,'/',Null,'INFO','master','True');
|
2017-10-16 23:27:19 +00:00
|
|
|
CREATE TABLE "table_history" (
|
|
|
|
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
|
|
|
|
`action` INTEGER NOT NULL,
|
|
|
|
`sonarrSeriesId` INTEGER NOT NULL,
|
|
|
|
`sonarrEpisodeId` INTEGER NOT NULL,
|
|
|
|
`timestamp` INTEGER NOT NULL,
|
|
|
|
`description` TEXT NOT NULL
|
|
|
|
);
|
|
|
|
CREATE TABLE "table_episodes" (
|
|
|
|
`sonarrSeriesId` INTEGER NOT NULL,
|
|
|
|
`sonarrEpisodeId` INTEGER NOT NULL UNIQUE,
|
|
|
|
`title` TEXT NOT NULL,
|
2018-02-22 03:09:27 +00:00
|
|
|
`path` TEXT NOT NULL,
|
2017-10-16 23:27:19 +00:00
|
|
|
`season` INTEGER NOT NULL,
|
|
|
|
`episode` INTEGER NOT NULL,
|
|
|
|
`subtitles` TEXT,
|
|
|
|
`missing_subtitles` TEXT
|
|
|
|
);
|
|
|
|
COMMIT;
|