Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 125 lines (98 sloc) 3.442 kB
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
1 -- RoundCube Webmail initial database structure
2 -- Version 0.1a
3 --
4
5 -- --------------------------------------------------------
6
7 --
8 -- Table structure for table `cache`
9 --
10
11 CREATE TABLE cache (
12 cache_id integer NOT NULL PRIMARY KEY,
13 user_id integer NOT NULL default 0,
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
14 session_id varchar(40) default NULL,
79fe17f @thomascube Added SQLite supprt and MySQL update script
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 );
19
20 CREATE INDEX ix_cache_user_id ON cache(user_id);
21 CREATE INDEX ix_cache_cache_key ON cache(cache_key);
22 CREATE INDEX ix_cache_session_id ON cache(session_id);
23
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
24
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
25 -- --------------------------------------------------------
26
27 --
28 -- Table structure for table contacts
29 --
30
31 CREATE TABLE contacts (
32 contact_id integer NOT NULL PRIMARY KEY,
33 user_id integer NOT NULL default '0',
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
34 created datetime NOT NULL default '0000-00-00 00:00:00',
35 del tinyint NOT NULL default '0',
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
36 name varchar(128) NOT NULL default '',
37 email varchar(128) NOT NULL default '',
38 firstname varchar(128) NOT NULL default '',
39 surname varchar(128) NOT NULL default '',
40 vcard text NOT NULL default ''
41 );
42
43 CREATE INDEX ix_contacts_user_id ON contacts(user_id);
44
45 -- --------------------------------------------------------
46
47 --
48 -- Table structure for table identities
49 --
50
51 CREATE TABLE identities (
52 identity_id integer NOT NULL PRIMARY KEY,
53 user_id integer NOT NULL default '0',
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
54 del tinyint NOT NULL default '0',
55 standard tinyint NOT NULL default '0',
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
56 name varchar(128) NOT NULL default '',
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
57 organization varchar(128) default '',
79fe17f @thomascube Added SQLite supprt and MySQL update script
thomascube authored
58 email varchar(128) NOT NULL default '',
59 "reply-to" varchar(128) NOT NULL default '',
60 bcc varchar(128) NOT NULL default '',
61 signature text NOT NULL default ''
62 );
63
64 CREATE INDEX ix_identities_user_id ON identities(user_id);
65
66
67 -- --------------------------------------------------------
68
69 --
70 -- Table structure for table users
71 --
72
73 CREATE TABLE users (
74 user_id integer NOT NULL PRIMARY KEY,
75 username varchar(128) NOT NULL default '',
76 mail_host varchar(128) NOT NULL default '',
77 alias varchar(128) NOT NULL default '',
78 created datetime NOT NULL default '0000-00-00 00:00:00',
79 last_login datetime NOT NULL default '0000-00-00 00:00:00',
80 language varchar(5) NOT NULL default 'en',
81 preferences text NOT NULL default ''
82 );
1cded85 @thomascube Re-design of caching (new database table added\!); some bugfixes; Pos…
thomascube authored
83
84
85 -- --------------------------------------------------------
86
87 --
88 -- Table structure for table session
89 --
90
91 CREATE TABLE session (
92 sess_id varchar(40) NOT NULL PRIMARY KEY,
93 created datetime NOT NULL default '0000-00-00 00:00:00',
94 changed datetime NOT NULL default '0000-00-00 00:00:00',
95 ip varchar(15) NOT NULL default '',
96 vars text NOT NULL
97 );
98
99
100 -- --------------------------------------------------------
101
102 --
103 -- Table structure for table messages
104 --
105
106 CREATE TABLE messages (
107 message_id integer NOT NULL PRIMARY KEY,
108 user_id integer NOT NULL default '0',
109 del tinyint NOT NULL default '0',
110 cache_key varchar(128) NOT NULL default '',
111 idx integer NOT NULL default '0',
112 uid integer 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 integer NOT NULL default '0',
119 headers text NOT NULL,
120 body text
121 );
122
123 CREATE INDEX ix_messages_user_id ON messages(user_id);
124 CREATE INDEX ix_messages_cache_key ON messages(cache_key);
Something went wrong with that request. Please try again.