[c5c522c] | 1 | #mysql_objects-4.1.sql: |
---|
| 2 | create database dspamdb; |
---|
| 3 | use dspamdb; |
---|
| 4 | |
---|
| 5 | create 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 | ) type=MyISAM PACK_KEYS=1; |
---|
| 12 | |
---|
| 13 | create unique index id_token_data_01 on dspam_token_data(uid,token); |
---|
| 14 | |
---|
| 15 | create 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 | ) type=MyISAM max_rows=2500000 avg_row_length=8096; |
---|
| 22 | |
---|
| 23 | create unique index id_signature_data_01 on dspam_signature_data(uid,signature); |
---|
| 24 | create index id_signature_data_02 on dspam_signature_data(created_on); |
---|
| 25 | |
---|
| 26 | create 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 | ) type=MyISAM; |
---|
| 37 | |
---|
| 38 | create table dspam_preferences ( |
---|
| 39 | uid smallint unsigned not null, |
---|
| 40 | preference varchar(32) not null, |
---|
| 41 | value varchar(64) not null |
---|
| 42 | ) type=MyISAM; |
---|
| 43 | |
---|
| 44 | create unique index id_preferences_01 on dspam_preferences(uid, preference); |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | #virtual_users.sql: |
---|
| 48 | create table dspam_virtual_uids ( |
---|
| 49 | uid smallint unsigned primary key AUTO_INCREMENT, |
---|
| 50 | username varchar(128) |
---|
| 51 | ) type=MyISAM; |
---|
| 52 | |
---|
| 53 | create unique index id_virtual_uids_01 on dspam_virtual_uids(username); |
---|
| 54 | |
---|
| 55 | |
---|
| 56 | #de global user: |
---|
| 57 | INSERT INTO `dspam_virtual_uids` VALUES (1,'global'); |
---|
| 58 | |
---|