protected function getCoreUpdateList() {
return array(
+ array( 'disableContentHandlerUseDB' ),
+
// 1.2
array( 'addField', 'ipblocks', 'ipb_id', 'patch-ipblocks.sql' ),
array( 'addField', 'ipblocks', 'ipb_expiry', 'patch-ipb_expiry.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' ),
+ array( 'enableContentHandlerUseDB' ),
array( 'dropField', 'site_stats', 'ss_admins', 'patch-drop-ss_admins.sql' ),
array( 'dropField', 'recentchanges', 'rc_moved_to_title', 'patch-rc_moved.sql' ),
array( 'addTable', 'sites', 'patch-sites.sql' ),
'patch-iwlinks-from-title-index.sql' ),
array( 'addField', 'archive', 'ar_id', 'patch-archive-ar_id.sql' ),
array( 'addField', 'externallinks', 'el_id', 'patch-externallinks-el_id.sql' ),
+
+ // 1.23
array( 'addField', 'recentchanges', 'rc_source', 'patch-rc_source.sql' ),
);
}
* 1.4 betas were missing the 'binary' marker from logging.log_title,
* which causes a collation mismatch error on joins in MySQL 4.1.
*
- * @param string $table table name
- * @param string $field field name to check
- * @param string $patchFile path to the patch to correct the field
+ * @param string $table Table name
+ * @param string $field Field name to check
+ * @param string $patchFile Path to the patch to correct the field
+ * @return bool
*/
protected function checkBin( $table, $field, $patchFile ) {
if ( !$this->doTable( $table ) ) {
return true;
}
+ /** @var MySQLField $fieldInfo */
$fieldInfo = $this->db->fieldInfo( $table, $field );
if ( $fieldInfo->isBinary() ) {
$this->output( "...$table table has correct $field encoding.\n" );
/**
* Check whether an index contain a field
*
- * @param string $table table name
- * @param string $index index name to check
- * @param string $field field that should be in the index
- * @return Boolean
+ * @param string $table Table name
+ * @param string $index Index name to check
+ * @param string $field Field that should be in the index
+ * @return bool
*/
protected function indexHasField( $table, $index, $field ) {
if ( !$this->doTable( $table ) ) {
if ( !$this->db->tableExists( 'user_rights', __METHOD__ ) ) {
if ( $this->db->fieldExists( 'user', 'user_rights', __METHOD__ ) ) {
- $this->db->applyPatch(
+ $this->applyPatch(
'patch-user_rights.sql',
false,
'Upgrading from a 1.3 or older database? Breaking out user_rights for conversion'