0
|
1 -- Updates from version 0.8
|
|
2
|
|
3 DROP TABLE cache;
|
|
4 CREATE TABLE cache (
|
|
5 user_id integer NOT NULL default 0,
|
|
6 cache_key varchar(128) NOT NULL default '',
|
|
7 created datetime NOT NULL default '0000-00-00 00:00:00',
|
|
8 data text NOT NULL
|
|
9 );
|
|
10
|
|
11 CREATE INDEX ix_cache_user_cache_key ON cache(user_id, cache_key);
|
|
12 CREATE INDEX ix_cache_created ON cache(created);
|
|
13
|
|
14 CREATE TABLE tmp_users (
|
|
15 user_id integer NOT NULL PRIMARY KEY,
|
|
16 username varchar(128) NOT NULL default '',
|
|
17 mail_host varchar(128) NOT NULL default '',
|
|
18 created datetime NOT NULL default '0000-00-00 00:00:00',
|
|
19 last_login datetime DEFAULT NULL,
|
|
20 language varchar(5),
|
|
21 preferences text NOT NULL default ''
|
|
22 );
|
|
23
|
|
24 INSERT INTO tmp_users (user_id, username, mail_host, created, last_login, language, preferences)
|
|
25 SELECT user_id, username, mail_host, created, last_login, language, preferences FROM users;
|
|
26
|
|
27 DROP TABLE users;
|
|
28
|
|
29 CREATE TABLE users (
|
|
30 user_id integer NOT NULL PRIMARY KEY,
|
|
31 username varchar(128) NOT NULL default '',
|
|
32 mail_host varchar(128) NOT NULL default '',
|
|
33 created datetime NOT NULL default '0000-00-00 00:00:00',
|
|
34 last_login datetime DEFAULT NULL,
|
|
35 language varchar(5),
|
|
36 preferences text NOT NULL default ''
|
|
37 );
|
|
38
|
|
39 INSERT INTO users (user_id, username, mail_host, created, last_login, language, preferences)
|
|
40 SELECT user_id, username, mail_host, created, last_login, language, preferences FROM tmp_users;
|
|
41
|
|
42 CREATE UNIQUE INDEX ix_users_username ON users(username, mail_host);
|
|
43
|
|
44 CREATE INDEX ix_identities_email ON identities(email, del);
|