Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 145 lines (113 sloc) 4.193 kb
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
1 -- RoundCube Webmail initial database structure
2
3 --
4 -- Table structure for table `cache`
5 --
6
7 CREATE TABLE cache (
8 cache_id integer NOT NULL PRIMARY KEY,
9 user_id integer NOT NULL default 0,
10 cache_key varchar(128) NOT NULL default '',
11 created datetime NOT NULL default '0000-00-00 00:00:00',
12 data longtext NOT NULL
13 );
14
ac26b96 @thomascube Optimize database schema; get rid of unnecessary indexes
thomascube authored
15 CREATE INDEX ix_cache_user_cache_key ON cache(user_id, cache_key);
e4d9f05 @alecpl - Added index on cache.created + small fixes in mssql DDL script
alecpl authored
16 CREATE INDEX ix_cache_created ON cache(created);
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
17
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
18
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
19 -- --------------------------------------------------------
20
21 --
a61bbb2 @thomascube Added basic contact groups feature
thomascube authored
22 -- Table structure for table contacts and related
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
23 --
24
25 CREATE TABLE contacts (
26 contact_id integer NOT NULL PRIMARY KEY,
27 user_id integer NOT NULL default '0',
58e3602 @thomascube Bugfixes for encoding and sending with attachments
thomascube authored
28 changed datetime NOT NULL default '0000-00-00 00:00:00',
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
29 del tinyint NOT NULL default '0',
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
30 name varchar(128) NOT NULL default '',
31 email varchar(128) NOT NULL default '',
32 firstname varchar(128) NOT NULL default '',
33 surname varchar(128) NOT NULL default '',
34 vcard text NOT NULL default ''
35 );
36
23b7656 @alecpl - use better index for contacts table
alecpl authored
37 CREATE INDEX ix_contacts_user_id ON contacts(user_id, email);
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
38
a61bbb2 @thomascube Added basic contact groups feature
thomascube authored
39
40 CREATE TABLE contactgroups (
41 contactgroup_id integer NOT NULL PRIMARY KEY,
42 user_id integer NOT NULL default '0',
43 changed datetime NOT NULL default '0000-00-00 00:00:00',
44 del tinyint NOT NULL default '0',
45 name varchar(128) NOT NULL default ''
46 );
47
48 CREATE INDEX ix_contactgroups_user_id ON contactgroups(user_id, del);
49
50
51 CREATE TABLE contactgroupmembers (
52 contactgroup_id integer NOT NULL,
53 contact_id integer NOT NULL default '0',
54 created datetime NOT NULL default '0000-00-00 00:00:00',
55 PRIMARY KEY (contactgroup_id, contact_id)
56 );
57
58
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
59 -- --------------------------------------------------------
60
61 --
62 -- Table structure for table identities
63 --
64
65 CREATE TABLE identities (
66 identity_id integer NOT NULL PRIMARY KEY,
67 user_id integer NOT NULL default '0',
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
68 del tinyint NOT NULL default '0',
69 standard tinyint NOT NULL default '0',
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
70 name varchar(128) NOT NULL default '',
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
71 organization varchar(128) default '',
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
72 email varchar(128) NOT NULL default '',
73 "reply-to" varchar(128) NOT NULL default '',
74 bcc varchar(128) NOT NULL default '',
a0109c4 Initial TinyMCE editor support (still need to work on spellcheck and …
svncommit authored
75 signature text NOT NULL default '',
76 html_signature tinyint NOT NULL default '0'
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
77 );
78
94fe9ca @alecpl - re-fix (#1486474) + require MySQL 4.0.8 + add index/update in ident…
alecpl authored
79 CREATE INDEX ix_identities_user_id ON identities(user_id, del);
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
80
81
82 -- --------------------------------------------------------
83
84 --
85 -- Table structure for table users
86 --
87
88 CREATE TABLE users (
89 user_id integer NOT NULL PRIMARY KEY,
90 username varchar(128) NOT NULL default '',
91 mail_host varchar(128) NOT NULL default '',
92 alias varchar(128) NOT NULL default '',
93 created datetime NOT NULL default '0000-00-00 00:00:00',
94 last_login datetime NOT NULL default '0000-00-00 00:00:00',
debdda0 @alecpl #1485420: remove default (and not null) for users.language column in DDL
alecpl authored
95 language varchar(5),
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
96 preferences text NOT NULL default ''
97 );
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
98
6cb7786 @alecpl #1484854
alecpl authored
99 CREATE INDEX ix_users_username ON users(username);
100 CREATE INDEX ix_users_alias ON users(alias);
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
101
102 -- --------------------------------------------------------
103
104 --
105 -- Table structure for table session
106 --
107
108 CREATE TABLE session (
109 sess_id varchar(40) NOT NULL PRIMARY KEY,
110 created datetime NOT NULL default '0000-00-00 00:00:00',
111 changed datetime NOT NULL default '0000-00-00 00:00:00',
84d06ed @thomascube IPv6 Compatability
thomascube authored
112 ip varchar(40) NOT NULL default '',
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
113 vars text NOT NULL
114 );
115
3e48d2e @alecpl - Increase speed of session destroy and garbage clean up
alecpl authored
116 CREATE INDEX ix_session_changed ON session (changed);
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
117
118 -- --------------------------------------------------------
119
120 --
121 -- Table structure for table messages
122 --
123
124 CREATE TABLE messages (
125 message_id integer NOT NULL PRIMARY KEY,
126 user_id integer NOT NULL default '0',
127 del tinyint NOT NULL default '0',
128 cache_key varchar(128) NOT NULL default '',
b594741 @thomascube Add created date to message cache
thomascube authored
129 created datetime NOT NULL default '0000-00-00 00:00:00',
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
130 idx integer NOT NULL default '0',
131 uid integer NOT NULL default '0',
132 subject varchar(255) NOT NULL default '',
133 "from" varchar(255) NOT NULL default '',
134 "to" varchar(255) NOT NULL default '',
ac26b96 @thomascube Optimize database schema; get rid of unnecessary indexes
thomascube authored
135 "cc" varchar(255) NOT NULL default '',
136 "date" datetime NOT NULL default '0000-00-00 00:00:00',
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
137 size integer NOT NULL default '0',
138 headers text NOT NULL,
f7bfec9 @thomascube Finalized new message parsing. Attention: changes in database schema
thomascube authored
139 structure text
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
140 );
141
3d601d2 @alecpl - added index in messages table
alecpl authored
142 CREATE UNIQUE INDEX ix_messages_user_cache_uid ON messages (user_id,cache_key,uid);
143 CREATE INDEX ix_messages_index ON messages (user_id,cache_key,idx);
c98f3b5 @alecpl #1485125: added index on messages.created
alecpl authored
144 CREATE INDEX ix_messages_created ON messages (created);
Something went wrong with that request. Please try again.