/**
* Sqlite-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( 'addTable', 'globaltemplatelinks', 'patch-globaltemplatelinks.sql' ),
- array( 'addTable', 'globalnamespaces', 'patch-globalnamespaces.sql' ),
- array( 'addTable', 'globalinterwiki', 'patch-globalinterwiki.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_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( 'modifyField', 'user_former_groups', 'ufg_group', 'patch-ug_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' ),
+
+ // 1.WD
+ array( 'addField', 'revision', 'rev_content_format', 'patch-revision-rev_content_format.sql' ),
+ array( 'addField', 'revision', 'rev_content_model', 'patch-revision-rev_content_model.sql' ),
+ array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),
+ array( 'addField', 'archive', 'ar_content_model', 'patch-archive-ar_content_model.sql' ),
+ array( 'addField', 'page', 'page_content_model', 'patch-page-page_content_model.sql' ),
);
}
protected function sqliteInitialIndexes() {
// initial-indexes.sql fails if the indexes are already present, so we perform a quick check if our database is newer.
- if ( $this->updateRowExists( 'initial_indexes' ) || $this->db->indexExists( 'user', 'user_name' ) ) {
+ if ( $this->updateRowExists( 'initial_indexes' ) || $this->db->indexExists( 'user', 'user_name', __METHOD__ ) ) {
$this->output( "...have initial indexes\n" );
return;
}