source: subversion/trunk/roundcubemail/SQL/sqlite.initial.sql @ 22

Last change on this file since 22 was 22, checked in by roundcube, 8 years ago

Added SQLite supprt and MySQL update script

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1-- RoundCube Webmail initial database structure
2-- Version 0.1a
3--
4
5-- --------------------------------------------------------
6
7--
8-- Table structure for table `cache`
9--
10
11CREATE TABLE cache (
12  cache_id integer NOT NULL PRIMARY KEY,
13  user_id integer NOT NULL default 0,
14  session_id varchar(32) default NULL,
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
20CREATE INDEX ix_cache_user_id ON cache(user_id);
21CREATE INDEX ix_cache_cache_key ON cache(cache_key);
22CREATE INDEX ix_cache_session_id ON cache(session_id);
23
24-- --------------------------------------------------------
25
26--
27-- Table structure for table contacts
28--
29
30CREATE TABLE contacts (
31  contact_id integer NOT NULL PRIMARY KEY,
32  user_id integer NOT NULL default '0',
33  del integer NOT NULL default '0',
34  name varchar(128) NOT NULL default '',
35  email varchar(128) NOT NULL default '',
36  firstname varchar(128) NOT NULL default '',
37  surname varchar(128) NOT NULL default '',
38  vcard text NOT NULL default ''
39);
40
41CREATE INDEX ix_contacts_user_id ON contacts(user_id);
42
43-- --------------------------------------------------------
44
45--
46-- Table structure for table identities
47--
48
49CREATE TABLE identities (
50  identity_id integer NOT NULL PRIMARY KEY,
51  user_id integer NOT NULL default '0',
52  del integer NOT NULL default '0',
53  "default" integer NOT NULL default '0',
54  name varchar(128) NOT NULL default '',
55  organization varchar(128) NOT NULL default '',
56  email varchar(128) NOT NULL default '',
57  "reply-to" varchar(128) NOT NULL default '',
58  bcc varchar(128) NOT NULL default '',
59  signature text NOT NULL default ''
60);
61
62CREATE INDEX ix_identities_user_id ON identities(user_id);
63
64
65-- --------------------------------------------------------
66
67--
68-- Table structure for table users
69--
70
71CREATE TABLE users (
72  user_id integer NOT NULL PRIMARY KEY,
73  username varchar(128) NOT NULL default '',
74  mail_host varchar(128) NOT NULL default '',
75  alias varchar(128) NOT NULL default '',
76  created datetime NOT NULL default '0000-00-00 00:00:00',
77  last_login datetime NOT NULL default '0000-00-00 00:00:00',
78  language varchar(5) NOT NULL default 'en',
79  preferences text NOT NULL default ''
80);
Note: See TracBrowser for help on using the repository browser.