· 8 years ago · Aug 04, 2018, 01:06 AM
1--
2-- Struktura tabulky `a_ser_stream`
3--
4
5CREATE TABLE IF NOT EXISTS `a_ser_stream` (
6 `id` bigint(20) NOT NULL AUTO_INCREMENT,
7 `id_ser` bigint(20) NOT NULL,
8 `id_stream` mediumint(9) NOT NULL,
9 `hd` tinyint(4) NOT NULL,
10 `sign_lang` tinyint(4) NOT NULL,
11 `started` datetime DEFAULT NULL,
12 `end` datetime DEFAULT NULL,
13 PRIMARY KEY (`id`),
14 KEY `id_ser` (`id_ser`),
15 KEY `id_stream` (`id_stream`)
16) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
17
18-- --------------------------------------------------------
19
20--
21-- Struktura tabulky `a_ser_stream_lang`
22--
23
24CREATE TABLE IF NOT EXISTS `a_ser_stream_lang` (
25 `id_ser_stream` bigint(20) NOT NULL,
26 `id_lang` smallint(6) NOT NULL,
27 UNIQUE KEY `a_ser_stream_lang_uq` (`id_ser_stream`,`id_lang`),
28 KEY `id_ser_stream` (`id_ser_stream`),
29 KEY `id_lang` (`id_lang`)
30) ENGINE=InnoDB DEFAULT CHARSET=utf8;
31
32-- --------------------------------------------------------
33
34--
35-- Struktura tabulky `a_ser_stream_sub`
36--
37
38CREATE TABLE IF NOT EXISTS `a_ser_stream_sub` (
39 `id_ser_stream` bigint(20) NOT NULL,
40 `id_lang` smallint(6) NOT NULL,
41 UNIQUE KEY `a_ser_stream_subt_uq` (`id_ser_stream`,`id_lang`),
42 KEY `id_ser_stream` (`id_ser_stream`),
43 KEY `id_lang` (`id_lang`)
44) ENGINE=InnoDB DEFAULT CHARSET=utf8;
45
46-- --------------------------------------------------------
47
48--
49-- Struktura tabulky `a_stream`
50--
51
52CREATE TABLE IF NOT EXISTS `a_stream` (
53 `id` mediumint(9) NOT NULL AUTO_INCREMENT,
54 `id_producer` mediumint(9) DEFAULT NULL,
55 `code` varchar(30) NOT NULL,
56 `public` tinyint(4) DEFAULT NULL,
57 `en_name` varchar(100) NOT NULL,
58 `localized_name` varchar(100) NOT NULL,
59 `type` tinyint(4) NOT NULL COMMENT '1=tv,2=net',
60 `country` smallint(6) DEFAULT NULL,
61 PRIMARY KEY (`id`),
62 KEY `country` (`country`),
63 KEY `id_producer` (`id_producer`)
64) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
65
66-- --------------------------------------------------------
67
68--
69-- Struktura tabulky `a_stream_event`
70--
71
72CREATE TABLE IF NOT EXISTS `a_stream_event` (
73 `id` bigint(20) NOT NULL,
74 `id_stream` mediumint(9) NOT NULL,
75 `id_ser_stream` bigint(20) NOT NULL,
76 `id_ser` bigint(20) NOT NULL,
77 `id_season` bigint(20) NOT NULL,
78 `id_episode` bigint(20) NOT NULL,
79 `start` datetime NOT NULL,
80 `end` datetime NOT NULL,
81 `wp` tinyint(4) DEFAULT NULL,
82 PRIMARY KEY (`id`),
83 KEY `id_stream` (`id_stream`),
84 KEY `id_ser_stream` (`id_ser_stream`),
85 KEY `id_ser` (`id_ser`),
86 KEY `id_season` (`id_season`),
87 KEY `id_episode` (`id_episode`)
88) ENGINE=InnoDB DEFAULT CHARSET=utf8;