Index: trunk/phase3/maintenance/sqlite/archives/patch-drop-user_options.sql |
— | — | @@ -1,31 +1,31 @@ |
2 | | -
|
3 | | -CREATE TABLE /*_*/user_tmp (
|
4 | | - user_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
5 | | - user_name varchar(255) binary NOT NULL default '',
|
6 | | - user_real_name varchar(255) binary NOT NULL default '',
|
7 | | - user_password tinyblob NOT NULL,
|
8 | | - user_newpassword tinyblob NOT NULL,
|
9 | | - user_newpass_time binary(14),
|
10 | | - user_email tinytext NOT NULL,
|
11 | | - user_touched binary(14) NOT NULL default '',
|
12 | | - user_token binary(32) NOT NULL default '',
|
13 | | - user_email_authenticated binary(14),
|
14 | | - user_email_token binary(32),
|
15 | | - user_email_token_expires binary(14),
|
16 | | - user_registration binary(14),
|
17 | | - user_editcount int
|
18 | | -) /*$wgDBTableOptions*/;
|
19 | | -
|
20 | | -INSERT INTO /*_*/user_tmp
|
21 | | - SELECT user_id, user_name, user_real_name, user_password, user_newpassword, user_newpass_time, user_email, user_touched,
|
22 | | - user_token, user_email_authenticated, user_email_token, user_email_token_expires, user_registration, user_editcount
|
23 | | - FROM /*_*/user;
|
24 | | -
|
25 | | -DROP TABLE /*_*/user;
|
26 | | -
|
27 | | -ALTER TABLE /*_*/user_tmp RENAME TO /*_*/user;
|
28 | | -
|
29 | | -CREATE UNIQUE INDEX /*i*/user_name ON /*_*/user (user_name);
|
30 | | -CREATE INDEX /*i*/user_email_token ON /*_*/user (user_email_token);
|
31 | | -CREATE INDEX /*i*/user_email ON /*_*/user (user_email(50));
|
| 2 | +-- Remove user_options field from user table |
| 3 | + |
| 4 | +CREATE TABLE /*_*/user_tmp ( |
| 5 | + user_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 6 | + user_name varchar(255) binary NOT NULL default '', |
| 7 | + user_real_name varchar(255) binary NOT NULL default '', |
| 8 | + user_password tinyblob NOT NULL, |
| 9 | + user_newpassword tinyblob NOT NULL, |
| 10 | + user_newpass_time binary(14), |
| 11 | + user_email tinytext NOT NULL, |
| 12 | + user_touched binary(14) NOT NULL default '', |
| 13 | + user_token binary(32) NOT NULL default '', |
| 14 | + user_email_authenticated binary(14), |
| 15 | + user_email_token binary(32), |
| 16 | + user_email_token_expires binary(14), |
| 17 | + user_registration binary(14), |
| 18 | + user_editcount int |
| 19 | +) /*$wgDBTableOptions*/; |
| 20 | + |
| 21 | +INSERT INTO /*_*/user_tmp |
| 22 | + SELECT user_id, user_name, user_real_name, user_password, user_newpassword, user_newpass_time, user_email, user_touched, |
| 23 | + user_token, user_email_authenticated, user_email_token, user_email_token_expires, user_registration, user_editcount |
| 24 | + FROM /*_*/user; |
| 25 | + |
| 26 | +DROP TABLE /*_*/user; |
| 27 | + |
| 28 | +ALTER TABLE /*_*/user_tmp RENAME TO /*_*/user; |
| 29 | + |
| 30 | +CREATE UNIQUE INDEX /*i*/user_name ON /*_*/user (user_name); |
| 31 | +CREATE INDEX /*i*/user_email_token ON /*_*/user (user_email_token); |
| 32 | +CREATE INDEX /*i*/user_email ON /*_*/user (user_email(50)); |
Property changes on: trunk/phase3/maintenance/sqlite/archives/patch-drop-user_options.sql |
___________________________________________________________________ |
Added: svn:eol-style |
32 | 33 | + native |