34 [
'addTable',
'user_autocreate_serial',
'patch-user_autocreate_serial.sql' ],
35 [
'modifyField',
'ipblocks_restrictions',
'ir_ipb_id',
'patch-ipblocks_restrictions-ir_ipb_id.sql' ],
36 [
'modifyField',
'ipblocks',
'ipb_id',
'patch-ipblocks-ipb_id.sql' ],
37 [
'modifyField',
'user',
'user_editcount',
'patch-user-user_editcount.sql' ],
38 [
'runMaintenance', MigrateRevisionActorTemp::class ],
39 [
'dropTable',
'revision_actor_temp' ],
40 [
'runMaintenance', UpdateRestrictions::class ],
41 [
'dropField',
'page',
'page_restrictions',
'patch-page-drop-page_restrictions.sql' ],
42 [
'migrateTemplatelinks' ],
43 [
'modifyField',
'templatelinks',
'tl_namespace',
'patch-templatelinks-tl_title-nullable.sql' ],
44 [
'dropField',
'templatelinks',
'tl_title',
'patch-templatelinks-drop-tl_title.sql' ],
47 [
'addField',
'externallinks',
'el_to_path',
'patch-externallinks-el_to_path.sql' ],
50 [
'addField',
'user',
'user_is_temp',
'patch-user-user_is_temp.sql' ],
51 [
'runMaintenance', MigrateRevisionCommentTemp::class ],
52 [
'dropTable',
'revision_comment_temp' ],
53 [
'runMaintenance', MigrateExternallinks::class ],
54 [
'modifyField',
'externallinks',
'el_to',
'patch-externallinks-el_to_default.sql' ],
55 [
'addField',
'pagelinks',
'pl_target_id',
'patch-pagelinks-target_id.sql' ],
56 [
'dropField',
'externallinks',
'el_to',
'patch-externallinks-drop-el_to.sql' ],
57 [
'runMaintenance', FixInconsistentRedirects::class ],
58 [
'modifyField',
'image',
'img_size',
'patch-image-img_size_to_bigint.sql' ],
59 [
'modifyField',
'filearchive',
'fa_size',
'patch-filearchive-fa_size_to_bigint.sql' ],
60 [
'modifyField',
'oldimage',
'oi_size',
'patch-oldimage-oi_size_to_bigint.sql' ],
61 [
'modifyField',
'uploadstash',
'us_size',
'patch-uploadstash-us_size_to_bigint.sql' ],
64 [
'addField',
'user_autocreate_serial',
'uas_year',
'patch-user_autocreate_serial-uas_year.sql' ],
65 [
'addTable',
'block_target',
'patch-block_target.sql' ],
66 [
'dropIndex',
'categorylinks',
'cl_collation_ext',
'patch-drop-cl_collation_ext.sql' ],
67 [
'runMaintenance', PopulateUserIsTemp::class ],
68 [
'dropIndex',
'sites',
'site_type',
'patch-sites-drop_indexes.sql' ],
69 [
'dropIndex',
'iwlinks',
'iwl_prefix_from_title',
'patch-iwlinks-drop-iwl_prefix_from_title.sql' ],
72 [
'migratePagelinks' ],
73 [
'modifyField',
'revision',
'rev_id',
'patch-revision-cleanup.sql' ],
74 [
'modifyField',
'recentchanges',
'rc_id',
'patch-recentchanges-rc_id-bigint.sql' ],
75 [
'modifyField',
'change_tag',
'ct_rc_id',
'patch-change_tag-ct_rc_id.sql' ],
76 [
'runMaintenance', \MigrateBlocks::class ],
77 [
'dropTable',
'ipblocks' ],
78 [
'dropField',
'pagelinks',
'pl_title',
'patch-pagelinks-drop-pl_title.sql' ],
79 [
'modifyField',
'page',
'page_links_updated',
'patch-page-page_links_updated-noinfinite.sql' ],
80 [
'addPostDatabaseUpdateMaintenance', FixAutoblockLogTitles::class ],
81 [
'changeTableOption',
'searchindex',
'CONVERT TO CHARACTER SET utf8mb4',
'utf8mb4' ],
82 [
'migrateSearchindex' ],
85 [
'addTable',
'file',
'patch-file.sql' ],
86 [
'addField',
'categorylinks',
'cl_target_id',
'patch-categorylinks-target_id.sql' ],
87 [
'addTable',
'collation',
'patch-collation.sql' ],
88 [
'dropTable',
'module_deps' ],
91 [
'addTable',
'existencelinks',
'patch-existencelinks.sql' ],
92 [
'runMaintenance', FixWrongPasswordPrefixes::class ],
93 [
'addIndex',
'categorylinks',
'cl_timestamp_id',
'patch-categorylinks-cl_timestamp_id.sql' ],
94 [
'migrateCategorylinks' ],
95 [
'normalizeCollation' ],
96 [
'modifyPrimaryKey',
'categorylinks', [
'cl_from',
'cl_target_id' ],
'patch-categorylinks-pk.sql' ],
97 [
'addIndex',
'recentchanges',
'rc_source_name_timestamp',
98 'patch-recentchanges-rc_source_name_timestamp.sql' ],
99 [
'addIndex',
'recentchanges',
'rc_name_source_patrolled_timestamp',
100 'patch-recentchanges-rc_name_source_patrolled_timestamp.sql' ],
101 [
'dropField',
'recentchanges',
'rc_new',
'patch-recentchanges-drop-rc_new.sql' ],
102 [
'dropField',
'categorylinks',
'cl_to',
'patch-categorylinks-drop-cl_to-cl_collation.sql' ],
105 [
'addTable',
'watchlist_label',
'patch-watchlist_label.sql' ],
112 'filearchive-fa_major_mime-patch-fa_major_mime-chemical.sql',
113 'image-img_major_mime-patch-img_major_mime-chemical.sql',
114 'oldimage-oi_major_mime-patch-oi_major_mime-chemical.sql',
115 'user_groups-ug_group-patch-ug_group-length-increase-255.sql',
116 'user_former_groups-ufg_group-patch-ufg_group-length-increase-255.sql',
117 'user_properties-up_property-patch-up_property.sql',
127 $vars[
'wgDBTableOptions'] = str_replace(
130 $vars[
'wgDBTableOptions']
144 $updateKey =
"$table-$field-dropDefault";
150 $info = $this->db->fieldInfo( $table, $field );
151 if ( $info && $info->defaultValue() !==
false ) {
152 $this->
output(
"Removing '$table.$field' default value.\n" );
153 $table = $this->db->tableName( $table );
154 $ret = $this->db->query(
"ALTER TABLE $table ALTER COLUMN $field DROP DEFAULT", __METHOD__ );
171 $info = $this->db->fieldInfo( $table, $field );
172 if ( $info && $info->defaultValue() !== $default ) {
173 $this->
output(
"Changing '$table.$field' default value.\n" );
174 $table = $this->db->tableName( $table );
176 "ALTER TABLE $table ALTER COLUMN $field SET DEFAULT "
177 . $this->db->addQuotes( $default ), __METHOD__
190 protected function changeTableOption(
string $table,
string $tableOption,
string $updateName ) {
191 $updateKey =
"$table-tableoption-$updateName";
196 $this->
output(
"Changing table options of '$table'.\n" );
197 $table = $this->db->tableName( $table );
198 $ret = $this->db->query(
199 "ALTER TABLE $table $tableOption",
209 $updateKey =
'searchindex-pk-titlelength';
214 $primaryIndexExists = $this->db->indexExists(
'searchindex',
'PRIMARY' );
216 $this->
output(
"...searchindex table has already been migrated.\n" );
223 $apply = $this->
applyPatch(
'patch-searchindex-pk-titlelength.sql',
false,
'...migrating searchindex table' );
232class_alias( MysqlUpdater::class,
'MysqlUpdater' );
Fix redirect pages with missing or incomplete row in the redirect table.
An error in a previous version of MediaWiki caused B type passwords to be written with an :A: prefix ...
Maintenance script that migrates externallinks data.
Maintenance script that merges the revision_actor_temp table into the revision table.
Maintenance script that Fills the user_is_temp column of the user table for users created before MW 1...
Maintenance script that updates page_restrictions table from old page_restriction column.
$wgDBTableOptions
Config variable stub for the DBTableOptions setting, for use by phpdoc and IDEs.