0
|
1 |
CREATE TABLE snippets(
|
|
2 |
snippet_id int(12) NOT NULL auto_increment,
|
|
3 |
snippet_code varchar(32) NOT NULL DEFAULT '',
|
|
4 |
snippet_text text,
|
|
5 |
snippet_channels text,
|
|
6 |
PRIMARY KEY ( snippet_id )
|
|
7 |
);
|
|
8 |
|
|
9 |
CREATE TABLE irclog (
|
|
10 |
id int(11) NOT NULL auto_increment,
|
|
11 |
channel varchar(30) default NULL,
|
|
12 |
day char(10) default NULL,
|
|
13 |
nick varchar(40) default NULL,
|
|
14 |
timestamp int(11) default NULL,
|
|
15 |
line text,
|
|
16 |
spam tinyint(1) default '0',
|
|
17 |
PRIMARY KEY (id)
|
|
18 |
);
|
|
19 |
|
20
|
20 |
--
|
|
21 |
-- NEW - Late October '08 modifications
|
|
22 |
--
|
|
23 |
|
|
24 |
CREATE TABLE stats_messages (
|
|
25 |
message_id int(21) NOT NULL auto_increment,
|
|
26 |
channel varchar(30) NOT NULL DEFAULT '',
|
|
27 |
nick varchar(40) NOT NULL DEFAULT '',
|
|
28 |
time int(11) NOT NULL DEFAULT 0,
|
|
29 |
PRIMARY KEY ( message_id )
|
|
30 |
);
|
|
31 |
|
|
32 |
CREATE TABLE stats_anon (
|
|
33 |
nick varchar(40) NOT NULL DEFAULT '',
|
|
34 |
PRIMARY KEY ( nick )
|
|
35 |
);
|
|
36 |
|
|
37 |
CREATE TABLE stats_count_cache (
|
|
38 |
cache_id int(21) NOT NULL auto_increment,
|
|
39 |
channel varchar(30) NOT NULL DEFAULT '',
|
|
40 |
time_min int(11) NOT NULL DEFAULT 0,
|
|
41 |
time_max int(11) NOT NULL DEFAULT 0,
|
|
42 |
message_count int(11) NOT NULL DEFAULT 0,
|
|
43 |
PRIMARY KEY ( cache_id )
|
|
44 |
);
|
|
45 |
|
|
46 |
--
|
|
47 |
-- ADDED November 15 2008
|
|
48 |
--
|
|
49 |
|
|
50 |
CREATE TABLE ip_log (
|
|
51 |
entry_id int(21) NOT NULL auto_increment,
|
|
52 |
nick varchar(40) NOT NULL,
|
|
53 |
basenick varchar(40) NOT NULL,
|
|
54 |
ip varchar(39) NOT NULL,
|
|
55 |
hostname varchar(80) NOT NULL,
|
|
56 |
channel varchar(20) NOT NULL,
|
|
57 |
time int(12) unsigned NOT NULL DEFAULT 0,
|
|
58 |
PRIMARY KEY ( entry_id )
|
|
59 |
);
|
|
60 |
|
|
61 |
-- Also added Nov. 15 (this DRAMATICALLY speeds things up)
|
|
62 |
CREATE INDEX stats_time_idx USING BTREE ON stats_messages (time);
|
|
63 |
|