bazarr/create_db.sql

82 lines
2 KiB
MySQL
Raw Normal View History

2017-10-17 07:27:19 +08: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,
`audio_language` "text",
`sortTitle` "text",
2017-10-17 07:27:19 +08:00
PRIMARY KEY(`tvdbId`)
);
CREATE TABLE "table_settings_providers" (
`name` TEXT NOT NULL UNIQUE,
`enabled` INTEGER,
`username` "text",
`password` "text",
2017-10-17 07:27:19 +08:00
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_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,
`path` TEXT NOT NULL,
2017-10-17 07:27:19 +08:00
`season` INTEGER NOT NULL,
`episode` INTEGER NOT NULL,
`subtitles` TEXT,
`missing_subtitles` TEXT,
`scene_name` TEXT,
2018-08-30 07:02:18 +08:00
`monitored` TEXT,
`failedAttempts` "text"
);
CREATE TABLE "table_movies" (
`tmdbId` TEXT NOT NULL UNIQUE,
`title` TEXT NOT NULL,
`path` TEXT NOT NULL UNIQUE,
`languages` TEXT,
`subtitles` TEXT,
`missing_subtitles` TEXT,
`hearing_impaired` TEXT,
`radarrId` INTEGER NOT NULL UNIQUE,
`overview` TEXT,
`poster` TEXT,
`fanart` TEXT,
`audio_language` "text",
`sceneName` TEXT,
2018-08-30 07:39:16 +08:00
`monitored` TEXT,
`failedAttempts` "text",
PRIMARY KEY(`tmdbId`)
);
CREATE TABLE "table_history_movie" (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
`action` INTEGER NOT NULL,
`radarrId` INTEGER NOT NULL,
`timestamp` INTEGER NOT NULL,
`description` TEXT NOT NULL
);
CREATE TABLE "system" (
`configured` TEXT,
`updated` TEXT
2017-10-17 07:27:19 +08:00
);
INSERT INTO `system` (configured, updated) VALUES ('0', '0');
2017-10-17 07:27:19 +08:00
COMMIT;