0
|
1 -- Updates from version 0.4-beta
|
|
2
|
|
3 CREATE TABLE tmp_users (
|
|
4 user_id integer NOT NULL PRIMARY KEY,
|
|
5 username varchar(128) NOT NULL default '',
|
|
6 mail_host varchar(128) NOT NULL default '',
|
|
7 alias varchar(128) NOT NULL default '',
|
|
8 created datetime NOT NULL default '0000-00-00 00:00:00',
|
|
9 last_login datetime NOT NULL default '0000-00-00 00:00:00',
|
|
10 language varchar(5),
|
|
11 preferences text NOT NULL default ''
|
|
12 );
|
|
13
|
|
14 INSERT INTO tmp_users (user_id, username, mail_host, alias, created, last_login, language, preferences)
|
|
15 SELECT user_id, username, mail_host, alias, created, last_login, language, preferences FROM users;
|
|
16
|
|
17 DROP TABLE users;
|
|
18
|
|
19 CREATE TABLE users (
|
|
20 user_id integer NOT NULL PRIMARY KEY,
|
|
21 username varchar(128) NOT NULL default '',
|
|
22 mail_host varchar(128) NOT NULL default '',
|
|
23 alias varchar(128) NOT NULL default '',
|
|
24 created datetime NOT NULL default '0000-00-00 00:00:00',
|
|
25 last_login datetime DEFAULT NULL,
|
|
26 language varchar(5),
|
|
27 preferences text NOT NULL default ''
|
|
28 );
|
|
29
|
|
30 INSERT INTO users (user_id, username, mail_host, alias, created, last_login, language, preferences)
|
|
31 SELECT user_id, username, mail_host, alias, created, last_login, language, preferences FROM tmp_users;
|
|
32
|
|
33 CREATE INDEX ix_users_username ON users(username);
|
|
34 CREATE INDEX ix_users_alias ON users(alias);
|
|
35 DROP TABLE tmp_users;
|