/**
* 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
*/
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( 'cleanupTextTable' ),
+ 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' ),
);
}
$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
- 'oldwatchlist', // pre 1.1?
- '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__ );
- }
- }
- }
-
- protected function cleanupTextTable() {
- $this->output( "Cleaning up text table\n" );
-
- /*$oldIndexes = array(
- 'old_namespace',
- 'old_timestamp',
- 'name_title_timestamp',
- 'user_timestamp',
- 'usertext_timestamp',
- );*/
- $this->dropIndex( 'text', 'old_namespace', 'patch-drop_old_text_indexes.sql' );
-
- /*$oldFields = array(
- 'old_namespace',
- 'old_title',
- 'old_comment',
- 'old_user',
- 'old_user_text',
- 'old_timestamp',
- 'old_minor_edit',
- 'inverse_timestamp',
- );*/
- $this->dropField( 'text', 'old_namespace', 'patch-drop_old_text_fields.sql' );
- }
-
}