-
Notifications
You must be signed in to change notification settings - Fork 0
/
SQL
98 lines (86 loc) · 2.79 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-- --------------------------------------------------------
--
-- Table structure for table `archives`
--
CREATE TABLE IF NOT EXISTS `archives` (
`id` bigint(20) NOT NULL auto_increment,
`keyword` varchar(30) NOT NULL,
`description` varchar(250) NOT NULL,
`tags` varchar(250) NOT NULL,
`screen_name` varchar(50) NOT NULL,
`user_id` varchar(50) NOT NULL,
`count` bigint(20) NOT NULL,
`create_time` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `keyword` (`keyword`),
KEY `description` (`description`),
KEY `tags` (`tags`),
KEY `screen_name` (`screen_name`),
KEY `create_time` (`create_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `processes`
--
CREATE TABLE IF NOT EXISTS `processes` (
`process` varchar(50) NOT NULL,
`pid` int(11) NOT NULL,
`last_ping` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `processes`
--
INSERT INTO `processes` (`process`, `pid`, `last_ping`) VALUES
('yourtwapperkeeper_crawl.php', 0, 0),
('yourtwapperkeeper_stream.php', 0, 0),
('yourtwapperkeeper_stream_process.php', 0, 0);
-- --------------------------------------------------------
--
-- Table structure for table `rawstream`
--
CREATE TABLE IF NOT EXISTS `rawstream` (
`flag` varchar(20) NOT NULL,
`text` varchar(300) NOT NULL,
`to_user_id` varchar(100) NOT NULL,
`from_user` varchar(100) NOT NULL,
`id` varchar(100) NOT NULL,
`from_user_id` varchar(100) NOT NULL,
`iso_language_code` varchar(10) NOT NULL,
`source` varchar(250) NOT NULL,
`profile_image_url` varchar(250) NOT NULL,
`geo_type` varchar(30) NOT NULL,
`geo_coordinates_0` double NOT NULL,
`geo_coordinates_1` double NOT NULL,
`created_at` varchar(50) NOT NULL,
`time` int(11) NOT NULL,
KEY `from_user` (`from_user`),
KEY `iso_language_code` (`iso_language_code`),
KEY `geo_type` (`geo_type`),
KEY `id` (`id`),
KEY `time` (`time`),
KEY `flag` (`flag`),
FULLTEXT KEY `full` (`text`),
FULLTEXT KEY `text` (`text`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `saved_archives`
--
CREATE TABLE IF NOT EXISTS `saved_archives` (
`id` bigint(20) NOT NULL,
`keyword` varchar(30) NOT NULL,
`description` varchar(250) NOT NULL,
`tags` varchar(250) NOT NULL,
`screen_name` varchar(50) NOT NULL,
`user_id` varchar(50) NOT NULL,
`count` bigint(20) NOT NULL,
`create_time` datetime NOT NULL,
`save_time` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `keyword` (`keyword`),
KEY `description` (`description`),
KEY `tags` (`tags`),
KEY `screen_name` (`screen_name`),
KEY `create_time` (`create_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;