summaryrefslogtreecommitdiff
path: root/plugin.video.mediathekview/resources/sql/filmliste-sqlite-v1.sql
diff options
context:
space:
mode:
authorLeo Moll <leo.moll@dtms.de>2018-01-11 12:16:45 +0100
committerMartijn Kaijser <martijn@xbmc.org>2018-01-15 18:48:50 +0100
commite5d0f50b8d39ab7fd745b8f384ec622f6b0df5d9 (patch)
tree330896b0ec477109bcf87798feb7076a65588c45 /plugin.video.mediathekview/resources/sql/filmliste-sqlite-v1.sql
parent7614cf25cf45728579713777796a41bed914fe05 (diff)
[plugin.video.mediathekview] 0.3.4
Diffstat (limited to 'plugin.video.mediathekview/resources/sql/filmliste-sqlite-v1.sql')
-rw-r--r--plugin.video.mediathekview/resources/sql/filmliste-sqlite-v1.sql104
1 files changed, 104 insertions, 0 deletions
diff --git a/plugin.video.mediathekview/resources/sql/filmliste-sqlite-v1.sql b/plugin.video.mediathekview/resources/sql/filmliste-sqlite-v1.sql
new file mode 100644
index 0000000..8e7ee09
--- /dev/null
+++ b/plugin.video.mediathekview/resources/sql/filmliste-sqlite-v1.sql
@@ -0,0 +1,104 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server : Kodi MediathekView
+ Source Server Type : SQLite
+ Source Server Version : 3012001
+ Source Database : main
+
+ Target Server Type : SQLite
+ Target Server Version : 3012001
+ File Encoding : utf-8
+
+ Date: 12/27/2017 23:56:51 PM
+*/
+
+PRAGMA foreign_keys = false;
+
+-- ----------------------------
+-- Table structure for channel
+-- ----------------------------
+DROP TABLE IF EXISTS "channel";
+CREATE TABLE "channel" (
+ "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
+ "dtCreated" integer(11,0) NOT NULL DEFAULT 0,
+ "touched" integer(1,0) NOT NULL DEFAULT 1,
+ "channel" TEXT(255,0) NOT NULL
+);
+
+-- ----------------------------
+-- Table structure for film
+-- ----------------------------
+DROP TABLE IF EXISTS "film";
+CREATE TABLE "film" (
+ "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
+ "dtCreated" integer(11,0) NOT NULL DEFAULT 0,
+ "touched" integer(1,0) NOT NULL DEFAULT 1,
+ "channelid" INTEGER(11,0) NOT NULL,
+ "showid" INTEGER(11,0) NOT NULL,
+ "title" TEXT(255,0) NOT NULL,
+ "search" TEXT(255,0) NOT NULL,
+ "aired" integer(11,0),
+ "duration" integer(11,0),
+ "size" integer(11,0),
+ "description" TEXT(2048,0),
+ "website" TEXT(384,0),
+ "url_sub" TEXT(384,0),
+ "url_video" TEXT(384,0),
+ "url_video_sd" TEXT(384,0),
+ "url_video_hd" TEXT(384,0),
+ CONSTRAINT "FK_FilmShow" FOREIGN KEY ("showid") REFERENCES "show" ("id") ON DELETE CASCADE,
+ CONSTRAINT "FK_FilmChannel" FOREIGN KEY ("channelid") REFERENCES "channel" ("id") ON DELETE CASCADE
+);
+
+-- ----------------------------
+-- Table structure for show
+-- ----------------------------
+DROP TABLE IF EXISTS "show";
+CREATE TABLE "show" (
+ "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
+ "dtCreated" integer(11,0) NOT NULL DEFAULT 0,
+ "touched" integer(1,0) NOT NULL DEFAULT 1,
+ "channelid" INTEGER(11,0) NOT NULL DEFAULT 0,
+ "show" TEXT(255,0) NOT NULL,
+ "search" TEXT(255,0) NOT NULL,
+ CONSTRAINT "FK_ShowChannel" FOREIGN KEY ("channelid") REFERENCES "channel" ("id") ON DELETE CASCADE
+);
+
+-- ----------------------------
+-- Table structure for status
+-- ----------------------------
+DROP TABLE IF EXISTS "status";
+CREATE TABLE "status" (
+ "modified" integer(11,0),
+ "status" TEXT(32,0),
+ "lastupdate" integer(11,0),
+ "filmupdate" integer(11,0),
+ "fullupdate" integer(1,0),
+ "add_chn" integer(11,0),
+ "add_shw" integer(11,0),
+ "add_mov" integer(11,0),
+ "del_chm" integer(11,0),
+ "del_shw" integer(11,0),
+ "del_mov" integer(11,0),
+ "tot_chn" integer(11,0),
+ "tot_shw" integer(11,0),
+ "tot_mov" integer(11,0)
+);
+
+-- ----------------------------
+-- Indexes structure for table film
+-- ----------------------------
+CREATE INDEX "dupecheck" ON film ("channelid", "showid", "url_video");
+CREATE INDEX "index_1" ON film ("channelid", "title" COLLATE NOCASE);
+CREATE INDEX "index_2" ON film ("showid", "title" COLLATE NOCASE);
+
+-- ----------------------------
+-- Indexes structure for table show
+-- ----------------------------
+CREATE INDEX "category" ON show ("category");
+CREATE INDEX "search" ON show ("search");
+CREATE INDEX "combined_1" ON show ("channelid", "search");
+CREATE INDEX "combined_2" ON show ("channelid", "show");
+
+PRAGMA foreign_keys = true;