[ 'addTable', 'updatelog', 'patch-updatelog.sql' ],
[ 'addTable', 'change_tag', 'patch-change_tag.sql' ],
[ 'addTable', 'tag_summary', 'patch-tag_summary.sql' ],
- [ 'addTable', 'valid_tag', 'patch-valid_tag.sql' ],
[ 'addTable', 'user_properties', 'patch-user_properties.sql' ],
[ 'addTable', 'log_search', 'patch-log_search.sql' ],
[ 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' ],
'patch-change_tag-change_tag_rc_tag_id.sql' ],
[ 'addPgField', 'ipblocks', 'ipb_sitewide', 'SMALLINT NOT NULL DEFAULT 1' ],
[ 'addTable', 'ipblocks_restrictions', 'patch-ipblocks_restrictions-table.sql' ],
+ [ 'migrateImageCommentTemp' ],
+ [ 'dropPgField', 'category', 'cat_hidden' ],
+ [ 'dropPgField', 'site_stats', 'ss_admins' ],
+ [ 'dropPgField', 'recentchanges', 'rc_cur_time' ],
+
+ // 1.33
+ [ 'dropField', 'change_tag', 'ct_tag', 'patch-drop-ct_tag.sql' ],
+ [ 'dropTable', 'valid_tag' ],
+ [ 'dropTable', 'tag_summary' ],
];
}
protected function changeNullableField( $table, $field, $null, $update = false ) {
$fi = $this->db->fieldInfo( $table, $field );
if ( is_null( $fi ) ) {
- $this->output( "...ERROR: expected column $table.$field to exist\n" );
- exit( 1 );
+ return;
}
if ( $fi->isNullable() ) {
# # It's NULL - does it need to be NOT NULL?
- if ( 'NOT NULL' === $null ) {
+ if ( $null === 'NOT NULL' ) {
$this->output( "Changing '$table.$field' to not allow NULLs\n" );
if ( $update ) {
$this->db->query( "UPDATE $table SET $field = DEFAULT WHERE $field IS NULL" );
}
} else {
# # It's NOT NULL - does it need to be NULL?
- if ( 'NULL' === $null ) {
+ if ( $null === 'NULL' ) {
$this->output( "Changing '$table.$field' to allow NULLs\n" );
$this->db->query( "ALTER TABLE $table ALTER $field DROP NOT NULL" );
} else {