Followup r98339
authorSam Reed <reedy@users.mediawiki.org>
Wed, 28 Sep 2011 19:28:19 +0000 (19:28 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 28 Sep 2011 19:28:19 +0000 (19:28 +0000)
Don't try and remove the user_options column in SQLite

Added 'user.user_options' to ignores

includes/installer/SqliteUpdater.php
maintenance/sqlite/archives/initial-indexes.sql
tests/phpunit/includes/db/DatabaseSqliteTest.php

index a5fba27..d43e409 100644 (file)
@@ -67,7 +67,6 @@ class SqliteUpdater extends DatabaseUpdater {
                        array( 'addTable', 'globalnamespaces', 'patch-globalnamespaces.sql' ),
                        array( 'addTable', 'globalinterwiki', 'patch-globalinterwiki.sql' ),
                        array( 'doMigrateUserOptions' ),
-                       array( 'dropField', 'user',         'user_options', 'patch-drop-user_options.sql' ),
                );
        }
 
index 2573ca1..0c0cef8 100644 (file)
@@ -3,7 +3,7 @@
 -- Unique indexes need to be handled with INSERT SELECT since just running
 -- the CREATE INDEX statement will fail if there are duplicate values.
 --
--- Ignore duplicates, several tables will have them (e.g. bug 16966) but in 
+-- Ignore duplicates, several tables will have them (e.g. bug 16966) but in
 -- most cases it's harmless to discard them.
 
 --------------------------------------------------------------------------------
@@ -41,7 +41,6 @@ CREATE TABLE /*_*/user_tmp (
   user_newpassword tinyblob NOT NULL,
   user_newpass_time binary(14),
   user_email tinytext NOT NULL,
-  user_options blob NOT NULL,
   user_touched binary(14) NOT NULL default '',
   user_token binary(32) NOT NULL default '',
   user_email_authenticated binary(14),
@@ -218,7 +217,7 @@ CREATE TABLE /*_*/math_tmp (
   math_outputhash varbinary(16) NOT NULL,
   math_html_conservativeness tinyint NOT NULL,
   math_html text,
-  math_mathml text  
+  math_mathml text
 );
 
 CREATE UNIQUE INDEX /*i*/math_inputhash ON /*_*/math_tmp (math_inputhash);
index 914ab27..c6c71ce 100644 (file)
@@ -98,7 +98,7 @@ class DatabaseSqliteTest extends MediaWikiTestCase {
                $this->assertEquals( 'sqlite_master', $db->tableName( 'sqlite_master' ) );
                $this->assertEquals( 'foobar', $db->tableName( 'bar' ) );
        }
-       
+
        public function testDuplicateTableStructure() {
                $db = new DatabaseSqliteStandalone( ':memory:' );
                $db->query( 'CREATE TABLE foo(foo, barfoo)' );
@@ -119,7 +119,7 @@ class DatabaseSqliteTest extends MediaWikiTestCase {
                        'Create a temporary duplicate only'
                );
        }
-       
+
        public function testDuplicateTableStructureVirtual() {
                $db = new DatabaseSqliteStandalone( ':memory:' );
                if ( $db->getFulltextSearchModule() != 'FTS3' ) {
@@ -196,8 +196,9 @@ class DatabaseSqliteTest extends MediaWikiTestCase {
                // Mismatches for these columns we can safely ignore
                $ignoredColumns = array(
                        'user_newtalk.user_last_timestamp', // r84185
+                       'user.user_options',
                );
-                       
+
                $currentDB = new DatabaseSqliteStandalone( ':memory:' );
                $currentDB->sourceFile( "$IP/maintenance/tables.sql" );
                $currentTables = $this->getTables( $currentDB );
@@ -254,7 +255,7 @@ class DatabaseSqliteTest extends MediaWikiTestCase {
                        $maint = new FakeMaintenance();
                        $maint->loadParamsAndArgs( null, array( 'quiet' => 1 ) );
                }
-               
+
                $db = new DatabaseSqliteStandalone( ':memory:' );
                $db->sourceFile( dirname( __FILE__ ) . "/sqlite/tables-$version.sql" );
                $updater = DatabaseUpdater::newForDB( $db, false, $maint );