forked from stuporglue/mailreader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb.sql
19 lines (17 loc) · 865 Bytes
/
db.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- Here's my DB structure
CREATE TABLE IF NOT EXISTS emails (
id int(255) NOT NULL AUTO_INCREMENT,
fromaddr varchar(255) COLLATE utf8_unicode_ci NOT NULL,
subject varchar(255) COLLATE utf8_unicode_ci NOT NULL,
body text COLLATE utf8_unicode_ci NOT NULL,
maildate timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
CREATE TABLE IF NOT EXISTS files (
id int(255) NOT NULL AUTO_INCREMENT,
email_id int(255) NOT NULL,
filename varchar(255) COLLATE utf8_unicode_ci NOT NULL,
mailsize varchar(20) COLLATE utf8_unicode_ci NOT NULL,
mime varchar(100) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;