Followup r103685
authorSam Reed <reedy@users.mediawiki.org>
Sat, 19 Nov 2011 17:21:55 +0000 (17:21 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 19 Nov 2011 17:21:55 +0000 (17:21 +0000)
Not sure why I reinvented the wheel. Oh well, doing it properly now

includes/installer/DatabaseUpdater.php
includes/installer/MysqlUpdater.php
includes/installer/OracleUpdater.php
includes/installer/SqliteUpdater.php

index 907c00f..36ed5c6 100644 (file)
@@ -666,18 +666,4 @@ abstract class DatabaseUpdater {
                $cl->execute();
                $this->output( "Rebuilding localisation cache done.\n" );
        }
-
-       /**
-        * Increases the length of the user_group field
-        */
-       protected function doIncreaseUserGroupLength() {
-               $this->output( 'Increasing the length of the user_group...' );
-               if ( $this->updateRowExists( 'user_groups_length' ) ) {
-                       $this->output( "...user_groups field is already long enough.\n" );
-                       return;
-               }
-               $this->applyPatch( 'patch-ug_group-length-increase.sql' );
-               $this->insertUpdateRow( 'user_groups_length' );
-               $this->output( "done.\n" );
-       }
 }
index f89fc71..c664044 100644 (file)
@@ -190,7 +190,7 @@ class MysqlUpdater extends DatabaseUpdater {
                        array( 'addField', 'revision',      'rev_sha1',         'patch-rev_sha1.sql' ),
                        array( 'addField', 'archive',       'ar_sha1',          'patch-ar_sha1.sql' ),
                        array( 'addIndex', 'page', 'page_redirect_namespace_len', 'patch-page_redirect_namespace_len.sql' ),
-                       array( 'doIncreaseUserGroupLength' ),
+                       array( 'modifyField', 'user', 'ug_group', 'patch-ug_group-length-increase.sql' ),
                );
        }
 
index d1006b2..1e6e4d2 100644 (file)
@@ -47,7 +47,7 @@ class OracleUpdater extends DatabaseUpdater {
                        array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1_field.sql' ),
                        array( 'doRemoveNotNullEmptyDefaults2' ),
                        array( 'addIndex', 'page', 'i03', 'patch-page_redirect_namespace_len.sql' ),
-                       array( 'doIncreaseUserGroupLength' ),
+                       array( 'modifyField', 'user', 'ug_group', 'patch-ug_group-length-increase.sql' ),
 
                        // till 2.0 i guess
                        array( 'doRebuildDuplicateFunction' ),
index 34f866b..dbca725 100644 (file)
@@ -68,7 +68,7 @@ class SqliteUpdater extends DatabaseUpdater {
                        array( 'addField', 'revision',      'rev_sha1',         'patch-rev_sha1.sql' ),
                        array( 'addField', 'archive',       'ar_sha1',          'patch-ar_sha1.sql' ),
                        array( 'addIndex', 'page', 'page_redirect_namespace_len', 'patch-page_redirect_namespace_len.sql' ),
-                       array( 'doIncreaseUserGroupLength' ),
+                       array( 'modifyField', 'user', 'ug_group', 'patch-ug_group-length-increase.sql' ),
 
                );
        }