MediaWiki master
SqliteUpdater.php
Go to the documentation of this file.
1<?php
2
10
11namespace MediaWiki\Installer;
12
13use CleanupWatchlistTemporaryAccountRows;
14use FixWrongPasswordPrefixes;
15use MediaWiki\Maintenance\FixAutoblockLogTitles;
16use PopulateUserIsTemp;
17
26
28 protected function getCoreUpdateList() {
29 return [
30 // 1.42
31 [ 'addField', 'user_autocreate_serial', 'uas_year', 'patch-user_autocreate_serial-uas_year.sql' ],
32 [ 'addTable', 'block_target', 'patch-block_target.sql' ],
33 [ 'dropIndex', 'categorylinks', 'cl_collation_ext', 'patch-drop-cl_collation_ext.sql' ],
34 [ 'runMaintenance', PopulateUserIsTemp::class ],
35 [ 'dropIndex', 'sites', 'site_type', 'patch-sites-drop_indexes.sql' ],
36 [ 'dropIndex', 'iwlinks', 'iwl_prefix_from_title', 'patch-iwlinks-drop-iwl_prefix_from_title.sql' ],
37
38 // 1.43
39 [ 'migratePagelinks' ],
40 [ 'modifyField', 'change_tag', 'ct_rc_id', 'patch-change_tag-ct_rc_id.sql' ],
41 [ 'runMaintenance', \MigrateBlocks::class ],
42 [ 'dropTable', 'ipblocks' ],
43 [ 'dropField', 'pagelinks', 'pl_title', 'patch-pagelinks-drop-pl_title.sql' ],
44 [ 'addPostDatabaseUpdateMaintenance', FixAutoblockLogTitles::class ],
45
46 // 1.44
47 [ 'addTable', 'file', 'patch-file.sql' ],
48 [ 'addField', 'categorylinks', 'cl_target_id', 'patch-categorylinks-target_id.sql' ],
49 [ 'addTable', 'collation', 'patch-collation.sql' ],
50 [ 'dropTable', 'module_deps' ],
51
52 // 1.45
53 [ 'addTable', 'existencelinks', 'patch-existencelinks.sql' ],
54 [ 'runMaintenance', FixWrongPasswordPrefixes::class ],
55 [ 'addIndex', 'categorylinks', 'cl_timestamp_id', 'patch-categorylinks-cl_timestamp_id.sql' ],
56 [ 'migrateCategorylinks' ],
57 [ 'normalizeCollation' ],
58 [ 'modifyPrimaryKey', 'categorylinks', [ 'cl_from', 'cl_target_id' ], 'patch-categorylinks-pk.sql' ],
59 [ 'addIndex', 'recentchanges', 'rc_source_name_timestamp',
60 'patch-recentchanges-rc_source_name_timestamp.sql' ],
61 [ 'addIndex', 'recentchanges', 'rc_name_source_patrolled_timestamp',
62 'patch-recentchanges-rc_name_source_patrolled_timestamp.sql' ],
63 [ 'dropField', 'recentchanges', 'rc_new', 'patch-recentchanges-drop-rc_new.sql' ],
64 [ 'dropField', 'categorylinks', 'cl_to', 'patch-categorylinks-drop-cl_to-cl_collation.sql' ],
65
66 // 1.46
67 [ 'addTable', 'watchlist_label', 'patch-watchlist_label.sql' ],
68 [ 'dropField', 'recentchanges', 'rc_type', 'patch-recentchanges-drop-rc_type.sql' ],
69 [ 'dropField', 'archive', 'ar_sha1', 'patch-archive-drop-ar_sha1.sql' ],
70 [ 'dropField', 'revision', 'rev_sha1', 'patch-revision-drop-rev_sha1.sql' ],
71 [ 'dropField', 'objectcache', 'modtoken', 'patch-objectcache-drop-modtoken.sql' ],
72 [ 'addField', 'imagelinks', 'il_target_id', 'patch-imagelinks-add-il_target_id.sql' ],
73 [ 'migrateImagelinks' ],
74 [ 'modifyPrimaryKey', 'imagelinks', [ 'il_from', 'il_target_id' ], 'patch-imagelinks-pk.sql' ],
75 [ 'addMissingTalkPageWatchlistLabels' ],
76 [ 'dropField', 'imagelinks', 'il_to', 'patch-imagelinks-drop-il_to.sql' ],
77
78 // 1.47
79 [ 'addField', 'site_stats', 'ss_temp_users', 'patch-site_stats-temp_users.sql' ],
80 [ 'addIndex', 'file', 'file_type_name', 'patch-file-file_type_name.sql' ],
81
82 // 1.48
83 [ 'addTable', 'user_editcount', 'patch-user_editcount.sql' ],
84 [ 'addTable', 'device_bound_session', 'patch-device_bound_session.sql' ],
85
86 [ 'runMaintenance', CleanupWatchlistTemporaryAccountRows::class ],
87 ];
88 }
89
91 protected function getInitialUpdateKeys() {
92 return [
93 'filearchive-fa_major_mime-patch-fa_major_mime-chemical.sql',
94 'image-img_major_mime-patch-img_major_mime-chemical.sql',
95 'oldimage-oi_major_mime-patch-oi_major_mime-chemical.sql',
96 'user_groups-ug_group-patch-ug_group-length-increase-255.sql',
97 'user_former_groups-ufg_group-patch-ufg_group-length-increase-255.sql',
98 'user_properties-up_property-patch-up_property.sql',
99 ];
100 }
101}
Apply database changes after updating MediaWiki.
getInitialUpdateKeys()
Get an array of update keys to insert into the updatelog table after a new installation....
getCoreUpdateList()
Get an array of updates to perform on the database.Should return a multidimensional array....