-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.sql
50 lines (45 loc) · 1.37 KB
/
install.sql
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
--
-- テーブルの構造 `channels`
--
CREATE TABLE IF NOT EXISTS `channels` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`service` varchar(255) NOT NULL,
`serviceChannelId` varchar(255) NOT NULL,
`title` varchar(255) NOT NULL,
`description` text NOT NULL,
`keywords` text NOT NULL,
`createdAt` datetime NOT NULL,
`modifiedAt` datetime DEFAULT NULL,
`crawledAt` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `serviceChannelId` (`serviceChannelId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- テーブルの構造 `logs`
--
CREATE TABLE IF NOT EXISTS `logs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`kind` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`message` text NOT NULL,
`createdAt` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- テーブルの構造 `videos`
--
CREATE TABLE IF NOT EXISTS `videos` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`channelId` int(11) NOT NULL,
`serviceVideoId` varchar(255) NOT NULL,
`title` varchar(255) NOT NULL,
`description` text NOT NULL,
`filename` varchar(255) DEFAULT NULL,
`filesize` int(11) DEFAULT NULL,
`retryCount` int(11) NOT NULL,
`createdAt` datetime NOT NULL,
`downloadedAt` datetime DEFAULT NULL,
`deletedAt` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `serviceVideoId` (`serviceVideoId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;