Lines 1-52
Link Here
|
1 |
--- sql_scripts/create_sguildb.sql.orig 2007-03-17 02:43:37.000000000 +0000 |
1 |
--- sql_scripts/create_sguildb.sql.orig 2012-10-12 21:39:20.000000000 +0000 |
2 |
+++ sql_scripts/create_sguildb.sql 2011-08-09 22:21:09.000000000 +0000 |
2 |
+++ sql_scripts/create_sguildb.sql 2012-10-12 21:53:42.000000000 +0000 |
3 |
@@ -52,10 +52,10 @@ |
3 |
@@ -3,7 +3,7 @@ |
|
|
4 |
-- CREATE DATABASE IF NOT EXISTS sguildb; |
5 |
-- USE sguildb; |
6 |
|
7 |
--- Depreciated for MRG_MyISAM tables |
8 |
+-- Deprecated for MRG_MyISAM tables |
9 |
-- CREATE TABLE event |
10 |
-- ( |
11 |
-- sid INT UNSIGNED NOT NULL, |
12 |
@@ -52,7 +52,7 @@ |
4 |
-- INDEX status (status), |
13 |
-- INDEX status (status), |
5 |
-- INDEX abuse_queue (abuse_queue), |
14 |
-- INDEX abuse_queue (abuse_queue), |
6 |
-- INDEX abuse_sent (abuse_sent) |
15 |
-- INDEX abuse_sent (abuse_sent) |
7 |
---); |
16 |
--- ); |
8 |
+-- ); |
17 |
+-- )ENGINE=MyISAM; |
9 |
|
18 |
|
10 |
---CREATE TABLE tcphdr |
19 |
-- CREATE TABLE tcphdr |
11 |
---( |
20 |
-- ( |
12 |
+-- CREATE TABLE tcphdr |
21 |
@@ -66,7 +66,8 @@ |
13 |
+-- ( |
22 |
-- tcp_win SMALLINT UNSIGNED, |
14 |
-- sid INT UNSIGNED NOT NULL, |
23 |
-- tcp_csum SMALLINT UNSIGNED, |
15 |
-- cid INT UNSIGNED NOT NULL, |
|
|
16 |
-- tcp_seq INT UNSIGNED, |
17 |
@@ -68,16 +68,16 @@ |
18 |
-- tcp_urp SMALLINT UNSIGNED, |
24 |
-- tcp_urp SMALLINT UNSIGNED, |
19 |
-- PRIMARY KEY (sid,cid)); |
25 |
--- PRIMARY KEY (sid,cid)); |
|
|
26 |
+-- PRIMARY KEY (sid,cid) |
27 |
+-- )ENGINE=MyISAM; |
20 |
-- |
28 |
-- |
21 |
---CREATE TABLE udphdr |
29 |
-- CREATE TABLE udphdr |
22 |
---( |
30 |
-- ( |
23 |
+-- CREATE TABLE udphdr |
31 |
@@ -74,7 +75,8 @@ |
24 |
+-- ( |
|
|
25 |
-- sid INT UNSIGNED NOT NULL, |
26 |
-- cid INT UNSIGNED NOT NULL, |
32 |
-- cid INT UNSIGNED NOT NULL, |
27 |
-- udp_len SMALLINT UNSIGNED, |
33 |
-- udp_len SMALLINT UNSIGNED, |
28 |
-- udp_csum SMALLINT UNSIGNED, |
34 |
-- udp_csum SMALLINT UNSIGNED, |
29 |
-- PRIMARY KEY (sid,cid)); |
35 |
--- PRIMARY KEY (sid,cid)); |
|
|
36 |
+-- PRIMARY KEY (sid,cid) |
37 |
+-- )ENGINE=MyISAM; |
30 |
-- |
38 |
-- |
31 |
---CREATE TABLE icmphdr |
39 |
-- CREATE TABLE icmphdr |
32 |
---( |
40 |
-- ( |
33 |
+-- CREATE TABLE icmphdr |
41 |
@@ -83,14 +85,16 @@ |
34 |
+-- ( |
|
|
35 |
-- sid INT UNSIGNED NOT NULL, |
36 |
-- cid INT UNSIGNED NOT NULL, |
37 |
-- icmp_csum SMALLINT UNSIGNED, |
42 |
-- icmp_csum SMALLINT UNSIGNED, |
38 |
@@ -85,8 +85,8 @@ |
43 |
-- icmp_id SMALLINT UNSIGNED, |
39 |
-- icmp_seq SMALLINT UNSIGNED, |
44 |
-- icmp_seq SMALLINT UNSIGNED, |
40 |
-- PRIMARY KEY (sid,cid)); |
45 |
--- PRIMARY KEY (sid,cid)); |
|
|
46 |
+-- PRIMARY KEY (sid,cid) |
47 |
+-- )ENGINE=MyISAM; |
41 |
-- |
48 |
-- |
42 |
---CREATE TABLE data |
49 |
-- CREATE TABLE data |
43 |
---( |
50 |
-- ( |
44 |
+-- CREATE TABLE data |
|
|
45 |
+-- ( |
46 |
-- sid INT UNSIGNED NOT NULL, |
51 |
-- sid INT UNSIGNED NOT NULL, |
47 |
-- cid INT UNSIGNED NOT NULL, |
52 |
-- cid INT UNSIGNED NOT NULL, |
48 |
-- data_payload TEXT, |
53 |
-- data_payload TEXT, |
49 |
@@ -101,13 +101,13 @@ |
54 |
--- PRIMARY KEY (sid,cid)); |
|
|
55 |
+-- PRIMARY KEY (sid,cid) |
56 |
+-- )ENGINE=MyISAM; |
57 |
|
58 |
CREATE TABLE sensor |
59 |
( |
60 |
@@ -101,13 +105,13 @@ |
50 |
interface VARCHAR(255), |
61 |
interface VARCHAR(255), |
51 |
description TEXT, |
62 |
description TEXT, |
52 |
bpf_filter TEXT, |
63 |
bpf_filter TEXT, |
Lines 58-157
Link Here
|
58 |
PRIMARY KEY (sid), |
69 |
PRIMARY KEY (sid), |
59 |
INDEX hostname_idx (hostname) |
70 |
INDEX hostname_idx (hostname) |
60 |
-); |
71 |
-); |
61 |
+) ENGINE=MyISAM; |
72 |
+)ENGINE=MyISAM; |
62 |
|
73 |
|
63 |
CREATE TABLE portscan |
74 |
CREATE TABLE portscan |
64 |
( |
75 |
( |
65 |
@@ -119,7 +119,8 @@ |
76 |
@@ -119,9 +123,10 @@ |
66 |
dst_port INT UNSIGNED, |
77 |
dst_port INT UNSIGNED, |
67 |
data TEXT, |
78 |
data TEXT, |
68 |
INDEX ps_src_ip (src_ip), |
79 |
INDEX ps_src_ip (src_ip), |
69 |
- INDEX ps_timestamp (timestamp)); |
80 |
- INDEX ps_timestamp (timestamp)); |
70 |
+ INDEX ps_timestamp (timestamp) |
81 |
+ INDEX ps_timestamp (timestamp) |
71 |
+) ENGINE=MyISAM; |
82 |
+)ENGINE=MyISAM; |
72 |
|
83 |
|
73 |
-- Depreciated |
84 |
--- Depreciated |
74 |
-- CREATE TABLE sessions ( |
85 |
+-- Deprecated |
75 |
@@ -150,7 +151,7 @@ |
86 |
-- CREATE TABLE sessions ( |
|
|
87 |
-- sid INT UNSIGNED NOT NULL, |
88 |
-- xid BIGINT UNSIGNED NOT NULL, |
89 |
@@ -142,7 +147,8 @@ |
90 |
-- INDEX server (src_ip), |
91 |
-- INDEX client (dst_ip), |
92 |
-- INDEX sport (src_port), |
93 |
--- INDEX cport (dst_port)); |
94 |
+-- INDEX cport (dst_port) |
95 |
+-- )ENGINE=MyISAM; |
96 |
|
97 |
CREATE TABLE status |
98 |
( |
99 |
@@ -150,7 +156,7 @@ |
76 |
description VARCHAR(255) NOT NULL, |
100 |
description VARCHAR(255) NOT NULL, |
77 |
long_desc VARCHAR(255), |
101 |
long_desc VARCHAR(255), |
78 |
PRIMARY KEY (status_id) |
102 |
PRIMARY KEY (status_id) |
79 |
-); |
103 |
-); |
80 |
+) ENGINE=MyISAM; |
104 |
+)ENGINE=MyISAM; |
81 |
|
105 |
|
82 |
CREATE TABLE history |
106 |
CREATE TABLE history |
83 |
( |
107 |
( |
84 |
@@ -161,7 +162,7 @@ |
108 |
@@ -161,7 +167,7 @@ |
85 |
status SMALLINT UNSIGNED NOT NULL, |
109 |
status SMALLINT UNSIGNED NOT NULL, |
86 |
comment VARCHAR(255), |
110 |
comment VARCHAR(255), |
87 |
INDEX log_time (timestamp) |
111 |
INDEX log_time (timestamp) |
88 |
-); |
112 |
-); |
89 |
+) ENGINE=MyISAM; |
113 |
+)ENGINE=MyISAM; |
90 |
|
114 |
|
91 |
CREATE TABLE user_info |
115 |
CREATE TABLE user_info |
92 |
( |
116 |
( |
93 |
@@ -169,7 +170,7 @@ |
117 |
@@ -170,7 +176,7 @@ |
94 |
username VARCHAR(16) NOT NULL, |
118 |
last_login DATETIME, |
95 |
last_login DATETIME NOT NULL, |
119 |
password VARCHAR(42), |
96 |
PRIMARY KEY (uid) |
120 |
PRIMARY KEY (uid) |
97 |
-); |
121 |
-); |
98 |
+) ENGINE=MyISAM; |
122 |
+)ENGINE=MyISAM; |
99 |
|
123 |
|
100 |
CREATE TABLE nessus_data |
124 |
CREATE TABLE nessus_data |
101 |
( |
125 |
( |
102 |
@@ -178,7 +179,8 @@ |
126 |
@@ -179,7 +185,8 @@ |
103 |
nessus_id INT UNSIGNED, |
127 |
nessus_id INT UNSIGNED, |
104 |
level VARCHAR(20), |
128 |
level VARCHAR(20), |
105 |
description TEXT, |
129 |
description TEXT, |
106 |
- INDEX rid (rid)); |
130 |
- INDEX rid (rid)); |
107 |
+ INDEX rid (rid) |
131 |
+ INDEX rid (rid) |
108 |
+) ENGINE=MyISAM; |
132 |
+)ENGINE=MyISAM; |
109 |
|
133 |
|
110 |
CREATE TABLE nessus |
134 |
CREATE TABLE nessus |
111 |
( |
135 |
( |
112 |
@@ -188,7 +190,8 @@ |
136 |
@@ -189,7 +196,8 @@ |
113 |
timestart DATETIME, |
137 |
timestart DATETIME, |
114 |
timeend DATETIME, |
138 |
timeend DATETIME, |
115 |
PRIMARY KEY (rid), |
139 |
PRIMARY KEY (rid), |
116 |
- INDEX ip (ip)); |
140 |
- INDEX ip (ip)); |
117 |
+ INDEX ip (ip) |
141 |
+ INDEX ip (ip) |
118 |
+) ENGINE=MyISAM; |
142 |
+)ENGINE=MyISAM; |
119 |
|
143 |
|
120 |
CREATE TABLE IF NOT EXISTS `pads` |
144 |
CREATE TABLE IF NOT EXISTS `pads` |
121 |
( |
145 |
( |
122 |
@@ -203,12 +206,12 @@ |
146 |
@@ -204,10 +212,10 @@ |
123 |
application VARCHAR(255) NOT NULL, |
147 |
application VARCHAR(255) NOT NULL, |
124 |
hex_payload VARCHAR(255), |
148 |
hex_payload VARCHAR(255), |
125 |
PRIMARY KEY (sid,asset_id) |
149 |
PRIMARY KEY (sid,asset_id) |
126 |
-); |
150 |
-); |
127 |
+) ENGINE=MyISAM; |
151 |
+)ENGINE=MyISAM; |
128 |
|
152 |
|
129 |
-- |
153 |
-- |
130 |
-- Depreciated for MERGE tables |
154 |
--- Depreciated for MERGE tables |
131 |
---CREATE TABLE sancp |
155 |
+-- Deprecated for MERGE tables |
132 |
---( |
156 |
-- CREATE TABLE sancp |
133 |
+-- CREATE TABLE sancp |
157 |
-- ( |
134 |
+-- ( |
|
|
135 |
-- sid INT UNSIGNED NOT NULL, |
158 |
-- sid INT UNSIGNED NOT NULL, |
136 |
-- sancpid BIGINT UNSIGNED NOT NULL, |
159 |
@@ -232,7 +240,7 @@ |
137 |
-- start_time DATETIME NOT NULL, |
|
|
138 |
@@ -231,8 +234,8 @@ |
139 |
-- INDEX dst_port (dst_port), |
160 |
-- INDEX dst_port (dst_port), |
140 |
-- INDEX src_port (src_port), |
161 |
-- INDEX src_port (src_port), |
141 |
-- INDEX start_time (start_time) |
162 |
-- INDEX start_time (start_time) |
142 |
---); |
163 |
--- ); |
143 |
--- |
164 |
+-- )ENGINE=MyISAM; |
144 |
+-- ); |
165 |
-- |
145 |
+-- |
166 |
|
146 |
|
|
|
147 |
INSERT INTO status (status_id, description, long_desc) VALUES (0, "New", "Real Time Event"); |
167 |
INSERT INTO status (status_id, description, long_desc) VALUES (0, "New", "Real Time Event"); |
148 |
INSERT INTO status (status_id, description, long_desc) VALUES (1, "No Further Action Required", "No Further Action Required"); |
168 |
@@ -251,7 +259,7 @@ |
149 |
@@ -250,7 +253,7 @@ |
|
|
150 |
( |
169 |
( |
151 |
version VARCHAR(32), |
170 |
version VARCHAR(32), |
152 |
installed DATETIME |
171 |
installed DATETIME |
153 |
-); |
172 |
-); |
154 |
+) ENGINE=MyISAM; |
173 |
+)ENGINE=MyISAM; |
155 |
|
174 |
|
156 |
INSERT INTO version (version, installed) VALUES ("0.12", now()); |
175 |
INSERT INTO version (version, installed) VALUES ("0.13", now()); |
157 |
|
176 |
|