comparison SQL/sqlite.initial.sql @ 8:bf99236cc5cd default tip

try to recover from upgrade fail
author Charlie Root
date Sat, 29 Dec 2018 07:07:34 -0500
parents 4681f974d28b
children
comparison
equal deleted inserted replaced
7:65fd7d441cf1 8:bf99236cc5cd
70 user_id integer NOT NULL PRIMARY KEY, 70 user_id integer NOT NULL PRIMARY KEY,
71 username varchar(128) NOT NULL default '', 71 username varchar(128) NOT NULL default '',
72 mail_host varchar(128) NOT NULL default '', 72 mail_host varchar(128) NOT NULL default '',
73 created datetime NOT NULL default '0000-00-00 00:00:00', 73 created datetime NOT NULL default '0000-00-00 00:00:00',
74 last_login datetime DEFAULT NULL, 74 last_login datetime DEFAULT NULL,
75 failed_login datetime DEFAULT NULL,
76 failed_login_counter integer DEFAULT NULL,
75 language varchar(5), 77 language varchar(5),
76 preferences text NOT NULL default '' 78 preferences text NOT NULL default ''
77 ); 79 );
78 80
79 CREATE UNIQUE INDEX ix_users_username ON users(username, mail_host); 81 CREATE UNIQUE INDEX ix_users_username ON users(username, mail_host);
82 -- Table structure for table session 84 -- Table structure for table session
83 -- 85 --
84 86
85 CREATE TABLE session ( 87 CREATE TABLE session (
86 sess_id varchar(128) NOT NULL PRIMARY KEY, 88 sess_id varchar(128) NOT NULL PRIMARY KEY,
87 created datetime NOT NULL default '0000-00-00 00:00:00',
88 changed datetime NOT NULL default '0000-00-00 00:00:00', 89 changed datetime NOT NULL default '0000-00-00 00:00:00',
89 ip varchar(40) NOT NULL default '', 90 ip varchar(40) NOT NULL default '',
90 vars text NOT NULL 91 vars text NOT NULL
91 ); 92 );
92 93
123 -- 124 --
124 125
125 CREATE TABLE cache ( 126 CREATE TABLE cache (
126 user_id integer NOT NULL default 0, 127 user_id integer NOT NULL default 0,
127 cache_key varchar(128) NOT NULL default '', 128 cache_key varchar(128) NOT NULL default '',
128 created datetime NOT NULL default '0000-00-00 00:00:00',
129 expires datetime DEFAULT NULL, 129 expires datetime DEFAULT NULL,
130 data text NOT NULL 130 data text NOT NULL,
131 ); 131 PRIMARY KEY (user_id, cache_key)
132 132 );
133 CREATE INDEX ix_cache_user_cache_key ON cache(user_id, cache_key); 133
134 CREATE INDEX ix_cache_expires ON cache(expires); 134 CREATE INDEX ix_cache_expires ON cache(expires);
135 135
136 -- 136 --
137 -- Table structure for table cache_shared 137 -- Table structure for table cache_shared
138 -- 138 --
139 139
140 CREATE TABLE cache_shared ( 140 CREATE TABLE cache_shared (
141 cache_key varchar(255) NOT NULL, 141 cache_key varchar(255) NOT NULL,
142 created datetime NOT NULL default '0000-00-00 00:00:00',
143 expires datetime DEFAULT NULL, 142 expires datetime DEFAULT NULL,
144 data text NOT NULL 143 data text NOT NULL,
145 ); 144 PRIMARY KEY (cache_key)
146 145 );
147 CREATE INDEX ix_cache_shared_cache_key ON cache_shared(cache_key); 146
148 CREATE INDEX ix_cache_shared_expires ON cache_shared(expires); 147 CREATE INDEX ix_cache_shared_expires ON cache_shared(expires);
149 148
150 -- 149 --
151 -- Table structure for table cache_index 150 -- Table structure for table cache_index
152 -- 151 --
199 CREATE TABLE system ( 198 CREATE TABLE system (
200 name varchar(64) NOT NULL PRIMARY KEY, 199 name varchar(64) NOT NULL PRIMARY KEY,
201 value text NOT NULL 200 value text NOT NULL
202 ); 201 );
203 202
204 INSERT INTO system (name, value) VALUES ('roundcube-version', '2015030800'); 203 INSERT INTO system (name, value) VALUES ('roundcube-version', '2016112200');