commit | author | age
|
4e17e6
|
1 |
-- RoundCube Webmail initial database structure |
535da2
|
2 |
-- Version 0.1b |
4e17e6
|
3 |
-- |
T |
4 |
|
|
5 |
-- -------------------------------------------------------- |
|
6 |
|
|
7 |
-- |
|
8 |
-- Table structure for table `cache` |
|
9 |
-- |
|
10 |
|
|
11 |
CREATE TABLE `cache` ( |
|
12 |
`cache_id` int(10) unsigned NOT NULL auto_increment, |
|
13 |
`user_id` int(10) unsigned NOT NULL default '0', |
1cded8
|
14 |
`session_id` varchar(40) default NULL, |
4e17e6
|
15 |
`cache_key` varchar(128) NOT NULL default '', |
T |
16 |
`created` datetime NOT NULL default '0000-00-00 00:00:00', |
|
17 |
`data` longtext NOT NULL, |
|
18 |
PRIMARY KEY (`cache_id`), |
|
19 |
KEY `user_id` (`user_id`), |
|
20 |
KEY `cache_key` (`cache_key`), |
|
21 |
KEY `session_id` (`session_id`) |
535da2
|
22 |
); |
4e17e6
|
23 |
|
T |
24 |
-- -------------------------------------------------------- |
|
25 |
|
|
26 |
-- |
|
27 |
-- Table structure for table `contacts` |
|
28 |
-- |
|
29 |
|
|
30 |
CREATE TABLE `contacts` ( |
|
31 |
`contact_id` int(10) unsigned NOT NULL auto_increment, |
|
32 |
`user_id` int(10) unsigned NOT NULL default '0', |
e447cb
|
33 |
`changed` datetime NOT NULL default '0000-00-00 00:00:00', |
1cded8
|
34 |
`del` tinyint(1) NOT NULL default '0', |
4e17e6
|
35 |
`name` varchar(128) NOT NULL default '', |
T |
36 |
`email` varchar(128) NOT NULL default '', |
|
37 |
`firstname` varchar(128) NOT NULL default '', |
|
38 |
`surname` varchar(128) NOT NULL default '', |
|
39 |
`vcard` text NOT NULL, |
|
40 |
PRIMARY KEY (`contact_id`), |
|
41 |
KEY `user_id` (`user_id`) |
535da2
|
42 |
); |
4e17e6
|
43 |
|
T |
44 |
-- -------------------------------------------------------- |
|
45 |
|
|
46 |
-- |
|
47 |
-- Table structure for table `identities` |
|
48 |
-- |
|
49 |
|
|
50 |
CREATE TABLE `identities` ( |
|
51 |
`identity_id` int(10) unsigned NOT NULL auto_increment, |
|
52 |
`user_id` int(10) unsigned NOT NULL default '0', |
1cded8
|
53 |
`del` tinyint(1) NOT NULL default '0', |
T |
54 |
`standard` tinyint(1) NOT NULL default '0', |
4e17e6
|
55 |
`name` varchar(128) NOT NULL default '', |
T |
56 |
`organization` varchar(128) NOT NULL default '', |
|
57 |
`email` varchar(128) NOT NULL default '', |
|
58 |
`reply-to` varchar(128) NOT NULL default '', |
|
59 |
`bcc` varchar(128) NOT NULL default '', |
|
60 |
`signature` text NOT NULL, |
|
61 |
PRIMARY KEY (`identity_id`), |
|
62 |
KEY `user_id` (`user_id`) |
535da2
|
63 |
); |
4e17e6
|
64 |
|
T |
65 |
-- -------------------------------------------------------- |
|
66 |
|
|
67 |
-- |
|
68 |
-- Table structure for table `session` |
|
69 |
-- |
|
70 |
|
|
71 |
CREATE TABLE `session` ( |
e0ddd4
|
72 |
`sess_id` varchar(40) NOT NULL default '', |
4e17e6
|
73 |
`created` datetime NOT NULL default '0000-00-00 00:00:00', |
T |
74 |
`changed` datetime NOT NULL default '0000-00-00 00:00:00', |
42b113
|
75 |
`ip` VARCHAR(15) NOT NULL default '', |
4e17e6
|
76 |
`vars` text NOT NULL, |
T |
77 |
PRIMARY KEY (`sess_id`) |
535da2
|
78 |
); |
4e17e6
|
79 |
|
T |
80 |
-- -------------------------------------------------------- |
|
81 |
|
|
82 |
-- |
|
83 |
-- Table structure for table `users` |
|
84 |
-- |
|
85 |
|
|
86 |
CREATE TABLE `users` ( |
|
87 |
`user_id` int(10) unsigned NOT NULL auto_increment, |
|
88 |
`username` varchar(128) NOT NULL default '', |
42b113
|
89 |
`mail_host` varchar(128) NOT NULL default '', |
T |
90 |
`alias` varchar(128) NOT NULL default '', |
4e17e6
|
91 |
`created` datetime NOT NULL default '0000-00-00 00:00:00', |
T |
92 |
`last_login` datetime NOT NULL default '0000-00-00 00:00:00', |
|
93 |
`language` varchar(5) NOT NULL default 'en', |
15a9d1
|
94 |
`preferences` text NOT NULL default '', |
4e17e6
|
95 |
PRIMARY KEY (`user_id`) |
535da2
|
96 |
); |
1cded8
|
97 |
|
T |
98 |
-- -------------------------------------------------------- |
|
99 |
|
|
100 |
-- |
|
101 |
-- Table structure for table `messages` |
|
102 |
-- |
|
103 |
|
|
104 |
CREATE TABLE `messages` ( |
|
105 |
`message_id` int(11) unsigned NOT NULL auto_increment, |
|
106 |
`user_id` int(11) unsigned NOT NULL default '0', |
|
107 |
`del` tinyint(1) NOT NULL default '0', |
|
108 |
`cache_key` varchar(128) NOT NULL default '', |
c6e808
|
109 |
`created` datetime NOT NULL default '0000-00-00 00:00:00', |
1cded8
|
110 |
`idx` int(11) unsigned NOT NULL default '0', |
T |
111 |
`uid` int(11) unsigned NOT NULL default '0', |
|
112 |
`subject` varchar(255) NOT NULL default '', |
|
113 |
`from` varchar(255) NOT NULL default '', |
|
114 |
`to` varchar(255) NOT NULL default '', |
|
115 |
`cc` varchar(255) NOT NULL default '', |
|
116 |
`date` datetime NOT NULL default '0000-00-00 00:00:00', |
|
117 |
`size` int(11) unsigned NOT NULL default '0', |
|
118 |
`headers` text NOT NULL, |
|
119 |
`body` longtext, |
|
120 |
PRIMARY KEY (`message_id`), |
|
121 |
KEY `user_id` (`user_id`), |
|
122 |
KEY `cache_key` (`cache_key`), |
|
123 |
KEY `idx` (`idx`), |
|
124 |
KEY `uid` (`uid`) |
535da2
|
125 |
); |
1cded8
|
126 |
|
T |
127 |
|