source: npl/mailserver/dspam/initdb.sql @ 28afc38

gcc484perl-5.22
Last change on this file since 28afc38 was d36701a, checked in by Edwin Eefting <edwin@datux.nl>, 7 years ago

fix myisam syntax for initial db creation with newer mysql versions

  • Property mode set to 100644
File size: 1.6 KB
Line 
1#mysql_objects-4.1.sql:
2create database dspamdb;
3use dspamdb;
4
5create table dspam_token_data (
6  uid smallint unsigned not null,
7  token bigint unsigned not null,
8  spam_hits int not null,
9  innocent_hits int not null,
10  last_hit date not null
11) ENGINE=MyISAM PACK_KEYS=1;
12
13create unique index id_token_data_01 on dspam_token_data(uid,token);
14
15create table dspam_signature_data (
16  uid smallint unsigned not null,
17  signature char(32) not null,
18  data blob not null,
19  length smallint not null,
20  created_on date not null
21) ENGINE=MyISAM max_rows=2500000 avg_row_length=8096;
22
23create unique index id_signature_data_01 on dspam_signature_data(uid,signature);
24create index id_signature_data_02 on dspam_signature_data(created_on);
25
26create table dspam_stats (
27  uid smallint unsigned primary key,
28  spam_learned int not null,
29  innocent_learned int not null,
30  spam_misclassified int not null,
31  innocent_misclassified int not null,
32  spam_corpusfed int not null,
33  innocent_corpusfed int not null,
34  spam_classified int not null,
35  innocent_classified int not null
36) ENGINE=MyISAM;
37
38create table dspam_preferences (
39  uid smallint unsigned not null,
40  preference varchar(32) not null,
41  value varchar(64) not null
42) ENGINE=MyISAM;
43
44create unique index id_preferences_01 on dspam_preferences(uid, preference);
45
46
47#virtual_users.sql:
48create table dspam_virtual_uids (
49  uid smallint unsigned primary key AUTO_INCREMENT,
50  username varchar(128)
51) ENGINE=MyISAM;
52
53create unique index id_virtual_uids_01 on dspam_virtual_uids(username);
54
55
56#de global user:
57INSERT INTO `dspam_virtual_uids` VALUES (1,'global');
58
Note: See TracBrowser for help on using the repository browser.