Merge "(bug 27395) Write PHPUnit test suite for CSSJanus"
[lhc/web/wiklou.git] / includes / installer / MysqlUpdater.php
index e92e31c..e453b01 100644 (file)
@@ -2,6 +2,21 @@
 /**
  * MySQL-specific updater.
  *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @file
  * @ingroup Deployment
  */
@@ -182,17 +197,22 @@ class MysqlUpdater extends DatabaseUpdater {
                        array( 'addTable', 'user_former_groups',                'patch-user_former_groups.sql'),
 
                        // 1.19
-                       array( 'addTable', 'config',                            'patch-config.sql' ),
                        array( 'addIndex', 'logging',       'type_action',      'patch-logging-type-action-index.sql'),
                        array( 'doMigrateUserOptions' ),
                        array( 'dropField', 'user',         'user_options', 'patch-drop-user_options.sql' ),
                        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( 'modifyField', 'user', 'ug_group', 'patch-ug_group-length-increase.sql' ),
+                       array( 'modifyField', 'user_groups', 'ug_group', 'patch-ug_group-length-increase.sql' ),
                        array( 'addField',      'uploadstash',  'us_chunk_inx',         'patch-uploadstash_chunk.sql' ),
                        array( 'addfield', 'job',           'job_timestamp',    'patch-jobs-add-timestamp.sql' ),
-                       array( 'dropAncientTables' ),
+                       array( 'modifyField', 'user_former_groups', 'ufg_group', 'patch-ufg_group-length-increase.sql' ),
+
+                       // 1.20
+                       array( 'addTable', 'config',                            'patch-config.sql' ),
+                       array( 'addIndex', 'revision', 'page_user_timestamp', 'patch-revision-user-page-index.sql' ),
+                       array( 'addField', 'ipblocks',      'ipb_parent_block_id',           'patch-ipb-parent-block-id.sql' ),
+                       array( 'addIndex', 'ipblocks',      'ipb_parent_block_id',           'patch-ipb-parent-block-id-index.sql' ),
                );
        }
 
@@ -854,25 +874,4 @@ class MysqlUpdater extends DatabaseUpdater {
                $this->applyPatch( 'patch-user-newtalk-timestamp-null.sql' );
                $this->output( "done.\n" );
        }
-
-       protected function dropAncientTables() {
-               $ancientTables = array(
-                       'blobs', // 1.4
-                       'brokenlinks', // 1.4
-                       'cur', // 1.4
-                       'ip_blocks_old', // Temporary in 1.6
-                       'links', // 1.4
-                       'linkscc', // 1.4
-                       'old', // 1.4
-                       'trackback', // 1.19
-                       'user_rights', // 1.5
-                       'validate', // 1.6
-               );
-
-               foreach( $ancientTables as $table ) {
-                       if ( $this->db->tableExists( $table, __METHOD__ ) ) {
-                               $this->db->dropTable( $table, __METHOD__ );
-                       }
-               }
-       }
 }