Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 126 lines (105 sloc) 3.775 kb
4e17e6c @thomascube Initial revision
thomascube authored
1 -- RoundCube Webmail initial database structure
ac26b96 @thomascube Optimize database schema; get rid of unnecessary indexes
thomascube authored
2 -- Version 0.1
4e17e6c @thomascube Initial revision
thomascube authored
3 --
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',
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Postgr...
thomascube authored
14 `session_id` varchar(40) default NULL,
4e17e6c @thomascube Initial revision
thomascube authored
15 `cache_key` varchar(128) NOT NULL default '',
16 `created` datetime NOT NULL default '0000-00-00 00:00:00',
17 `data` longtext NOT NULL,
18 PRIMARY KEY (`cache_id`),
ac26b96 @thomascube Optimize database schema; get rid of unnecessary indexes
thomascube authored
19 INDEX `user_cache_index` (`user_id`,`cache_key`)
535da27 @thomascube Updated installation instructions
thomascube authored
20 );
4e17e6c @thomascube Initial revision
thomascube authored
21
22 -- --------------------------------------------------------
23
24 --
25 -- Table structure for table `contacts`
26 --
27
28 CREATE TABLE `contacts` (
29 `contact_id` int(10) unsigned NOT NULL auto_increment,
30 `user_id` int(10) unsigned NOT NULL default '0',
e447cb0 @thomascube Added 'changed' col to contacts table and support for 160-bit session ha...
thomascube authored
31 `changed` datetime NOT NULL default '0000-00-00 00:00:00',
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Postgr...
thomascube authored
32 `del` tinyint(1) NOT NULL default '0',
4e17e6c @thomascube Initial revision
thomascube authored
33 `name` varchar(128) NOT NULL default '',
34 `email` varchar(128) NOT NULL default '',
64009eb @thomascube Reverted files to r305
thomascube authored
35 `firstname` varchar(128) NOT NULL default '',
36 `surname` varchar(128) NOT NULL default '',
4e17e6c @thomascube Initial revision
thomascube authored
37 `vcard` text NOT NULL,
38 PRIMARY KEY (`contact_id`),
39 KEY `user_id` (`user_id`)
535da27 @thomascube Updated installation instructions
thomascube authored
40 );
4e17e6c @thomascube Initial revision
thomascube authored
41
42 -- --------------------------------------------------------
43
44 --
45 -- Table structure for table `identities`
46 --
47
48 CREATE TABLE `identities` (
49 `identity_id` int(10) unsigned NOT NULL auto_increment,
50 `user_id` int(10) unsigned NOT NULL default '0',
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Postgr...
thomascube authored
51 `del` tinyint(1) NOT NULL default '0',
52 `standard` tinyint(1) NOT NULL default '0',
d7f3d79 @alecpl -Fixed Mysql DDL for default identities creation (#1485070)
alecpl authored
53 `name` varchar(128) NOT NULL,
4e17e6c @thomascube Initial revision
thomascube authored
54 `organization` varchar(128) NOT NULL default '',
d7f3d79 @alecpl -Fixed Mysql DDL for default identities creation (#1485070)
alecpl authored
55 `email` varchar(128) NOT NULL,
4e17e6c @thomascube Initial revision
thomascube authored
56 `reply-to` varchar(128) NOT NULL default '',
57 `bcc` varchar(128) NOT NULL default '',
f18911a @alecpl - #1485120 (text column can't have a default value)
alecpl authored
58 `signature` text,
a0109c4 Initial TinyMCE editor support (still need to work on spellcheck and ski...
svncommit authored
59 `html_signature` tinyint(1) NOT NULL default '0',
4e17e6c @thomascube Initial revision
thomascube authored
60 PRIMARY KEY (`identity_id`),
61 KEY `user_id` (`user_id`)
535da27 @thomascube Updated installation instructions
thomascube authored
62 );
4e17e6c @thomascube Initial revision
thomascube authored
63
64 -- --------------------------------------------------------
65
66 --
67 -- Table structure for table `session`
68 --
69
70 CREATE TABLE `session` (
e0ddd4e @thomascube Added 'changed' col to contacts table and support for 160-bit session ha...
thomascube authored
71 `sess_id` varchar(40) NOT NULL default '',
4e17e6c @thomascube Initial revision
thomascube authored
72 `created` datetime NOT NULL default '0000-00-00 00:00:00',
73 `changed` datetime NOT NULL default '0000-00-00 00:00:00',
84d06ed @thomascube IPv6 Compatability
thomascube authored
74 `ip` VARCHAR(40) NOT NULL default '',
4e17e6c @thomascube Initial revision
thomascube authored
75 `vars` text NOT NULL,
76 PRIMARY KEY (`sess_id`)
535da27 @thomascube Updated installation instructions
thomascube authored
77 );
4e17e6c @thomascube Initial revision
thomascube authored
78
79 -- --------------------------------------------------------
80
81 --
82 -- Table structure for table `users`
83 --
84
85 CREATE TABLE `users` (
86 `user_id` int(10) unsigned NOT NULL auto_increment,
87 `username` varchar(128) NOT NULL default '',
42b1135 @thomascube Several bugfixes and feature improvements
thomascube authored
88 `mail_host` varchar(128) NOT NULL default '',
89 `alias` varchar(128) NOT NULL default '',
4e17e6c @thomascube Initial revision
thomascube authored
90 `created` datetime NOT NULL default '0000-00-00 00:00:00',
91 `last_login` datetime NOT NULL default '0000-00-00 00:00:00',
92 `language` varchar(5) NOT NULL default 'en',
112bff6 @thomascube Set prefs field in user table to null (#1484386)
thomascube authored
93 `preferences` text,
6cb7786 @alecpl #1484854
alecpl authored
94 PRIMARY KEY (`user_id`),
95 INDEX `username_index` (`username`),
96 INDEX `alias_index` (`alias`)
535da27 @thomascube Updated installation instructions
thomascube authored
97 );
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Postgr...
thomascube authored
98
99 -- --------------------------------------------------------
100
101 --
102 -- Table structure for table `messages`
103 --
104
105 CREATE TABLE `messages` (
106 `message_id` int(11) unsigned NOT NULL auto_increment,
107 `user_id` int(11) unsigned NOT NULL default '0',
108 `del` tinyint(1) NOT NULL default '0',
109 `cache_key` varchar(128) NOT NULL default '',
c6e808e fixed mysql SQL scripts for new created column
svncommit authored
110 `created` datetime NOT NULL default '0000-00-00 00:00:00',
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Postgr...
thomascube authored
111 `idx` int(11) unsigned NOT NULL default '0',
112 `uid` int(11) unsigned NOT NULL default '0',
113 `subject` varchar(255) NOT NULL default '',
114 `from` varchar(255) NOT NULL default '',
115 `to` varchar(255) NOT NULL default '',
116 `cc` varchar(255) NOT NULL default '',
117 `date` datetime NOT NULL default '0000-00-00 00:00:00',
118 `size` int(11) unsigned NOT NULL default '0',
119 `headers` text NOT NULL,
f7bfec9 @thomascube Finalized new message parsing. Attention: changes in database schema
thomascube authored
120 `structure` text,
ac26b96 @thomascube Optimize database schema; get rid of unnecessary indexes
thomascube authored
121 PRIMARY KEY (`message_id`),
43a42dc @thomascube Use user_id for unique key in messages table (closes #1484074)
thomascube authored
122 UNIQUE `uniqueness` (`user_id`, `cache_key`, `uid`)
535da27 @thomascube Updated installation instructions
thomascube authored
123 );
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Postgr...
thomascube authored
124
125
Something went wrong with that request. Please try again.