-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdb.sql
30 lines (26 loc) · 948 Bytes
/
db.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
CREATE TABLE IF NOT EXISTS `emails` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`from` varchar(250) NOT NULL,
`domain` varchar(255) NOT NULL,
`subject` varchar(255) NOT NULL,
`body` text NOT NULL,
`spf` tinyint(1) NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `from` (`from`),
KEY `from_2` (`from`),
KEY `domain` (`domain`),
KEY `subject` (`subject`),
KEY `spf` (`spf`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=31 ;
CREATE TABLE IF NOT EXISTS `files_content` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`email_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL DEFAULT 'Untitled.txt',
`mime` varchar(50) NOT NULL DEFAULT 'text/plain',
`size` int(20) unsigned NOT NULL DEFAULT '0',
`data` mediumblob NOT NULL,
PRIMARY KEY (`id`),
KEY `email_id` (`email_id`),
KEY `email_id_2` (`email_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=35 ;