aboutsummaryrefslogtreecommitdiffhomepage
path: root/create_db.sql
blob: f60878a46bd1a5849f10b6cd23f29b3e3760970b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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,
	`path_mapping`	TEXT,
	`log_level`	TEXT,
	`branch`	TEXT,
	`auto_update`	INTEGER
);
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');
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 UNIQUE,
	`season`	INTEGER NOT NULL,
	`episode`	INTEGER NOT NULL,
	`subtitles`	TEXT,
	`missing_subtitles`	TEXT
);
COMMIT;