forked from PlamenVasilev/pipe-email-php-reader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
db.sql
40 lines (32 loc) · 1.03 KB
/
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
30
31
32
33
34
35
36
37
38
-- --------------------------------------------------------
--
-- `emails`
--
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 `domain` (`domain`),
KEY `subject` (`subject`),
KEY `spf` (`spf`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=31 ;
-- --------------------------------------------------------
--
-- `files_content`
--
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=35 ;