Index: trunk/phase3/maintenance/sqlite/archives/initial-indexes.sql |
— | — | @@ -41,6 +41,7 @@ |
42 | 42 | user_newpassword tinyblob NOT NULL, |
43 | 43 | user_newpass_time binary(14), |
44 | 44 | user_email tinytext NOT NULL, |
| 45 | + user_options blob NOT NULL, |
45 | 46 | user_touched binary(14) NOT NULL default '', |
46 | 47 | user_token binary(32) NOT NULL default '', |
47 | 48 | user_email_authenticated binary(14), |
Index: trunk/phase3/maintenance/sqlite/archives/patch-drop-user_options.sql |
— | — | @@ -0,0 +1,31 @@ |
| 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));
|
Index: trunk/phase3/tests/phpunit/includes/db/sqlite/tables-1.13.sql |
— | — | @@ -8,6 +8,7 @@ |
9 | 9 | user_newpassword tinyblob , |
10 | 10 | user_newpass_time BLOB, |
11 | 11 | user_email tinytext , |
| 12 | + user_options blob , |
12 | 13 | user_touched BLOB default '', |
13 | 14 | user_token BLOB default '', |
14 | 15 | user_email_authenticated BLOB, |
Index: trunk/phase3/tests/phpunit/includes/db/sqlite/tables-1.15.sql |
— | — | @@ -10,6 +10,7 @@ |
11 | 11 | user_newpassword tinyblob NOT NULL, |
12 | 12 | user_newpass_time binary(14), |
13 | 13 | user_email tinytext NOT NULL, |
| 14 | + user_options blob NOT NULL, |
14 | 15 | user_touched binary(14) NOT NULL default '', |
15 | 16 | user_token binary(32) NOT NULL default '', |
16 | 17 | user_email_authenticated binary(14), |
Index: trunk/phase3/tests/phpunit/includes/db/sqlite/tables-1.16.sql |
— | — | @@ -10,6 +10,7 @@ |
11 | 11 | user_newpassword tinyblob NOT NULL, |
12 | 12 | user_newpass_time binary(14), |
13 | 13 | user_email tinytext NOT NULL, |
| 14 | + user_options blob NOT NULL, |
14 | 15 | user_touched binary(14) NOT NULL default '', |
15 | 16 | user_token binary(32) NOT NULL default '', |
16 | 17 | user_email_authenticated binary(14), |
Index: trunk/phase3/tests/phpunit/includes/db/sqlite/tables-1.17.sql |
— | — | @@ -10,6 +10,7 @@ |
11 | 11 | user_newpassword tinyblob NOT NULL, |
12 | 12 | user_newpass_time binary(14), |
13 | 13 | user_email tinytext NOT NULL, |
| 14 | + user_options blob NOT NULL, |
14 | 15 | user_touched binary(14) NOT NULL default '', |
15 | 16 | user_token binary(32) NOT NULL default '', |
16 | 17 | user_email_authenticated binary(14), |
Index: trunk/phase3/tests/phpunit/includes/db/DatabaseSqliteTest.php |
— | — | @@ -196,7 +196,6 @@ |
197 | 197 | // Mismatches for these columns we can safely ignore |
198 | 198 | $ignoredColumns = array( |
199 | 199 | 'user_newtalk.user_last_timestamp', // r84185 |
200 | | - 'user.user_options', |
201 | 200 | ); |
202 | 201 | |
203 | 202 | $currentDB = new DatabaseSqliteStandalone( ':memory:' ); |
Index: trunk/phase3/includes/installer/SqliteUpdater.php |
— | — | @@ -64,6 +64,7 @@ |
65 | 65 | array( 'addTable', 'config', 'patch-config.sql' ), |
66 | 66 | array( 'addIndex', 'logging', 'type_action', 'patch-logging-type-action-index.sql'), |
67 | 67 | array( 'doMigrateUserOptions' ), |
| 68 | + array( 'dropField', 'user', 'user_options', 'patch-drop-user_options.sql' ), |
68 | 69 | ); |
69 | 70 | } |
70 | 71 | |