Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 62 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| SqliteUpdater | |
0.00% |
0 / 62 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| getCoreUpdateList | |
0.00% |
0 / 54 |
|
0.00% |
0 / 1 |
2 | |||
| getInitialUpdateKeys | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Sqlite-specific updater. |
| 5 | * |
| 6 | * @license GPL-2.0-or-later |
| 7 | * @file |
| 8 | * @ingroup Installer |
| 9 | */ |
| 10 | |
| 11 | namespace MediaWiki\Installer; |
| 12 | |
| 13 | use FixInconsistentRedirects; |
| 14 | use FixWrongPasswordPrefixes; |
| 15 | use MediaWiki\Maintenance\FixAutoblockLogTitles; |
| 16 | use MigrateExternallinks; |
| 17 | use MigrateRevisionCommentTemp; |
| 18 | use PopulateUserIsTemp; |
| 19 | |
| 20 | /** |
| 21 | * Class for handling updates to Sqlite databases. |
| 22 | * |
| 23 | * @ingroup Installer |
| 24 | * @since 1.17 |
| 25 | * @property \Wikimedia\Rdbms\DatabaseSqlite $db |
| 26 | */ |
| 27 | class SqliteUpdater extends DatabaseUpdater { |
| 28 | |
| 29 | /** @inheritDoc */ |
| 30 | protected function getCoreUpdateList() { |
| 31 | return [ |
| 32 | // 1.40 |
| 33 | [ 'addField', 'externallinks', 'el_to_path', 'patch-externallinks-el_to_path.sql' ], |
| 34 | |
| 35 | // 1.41 |
| 36 | [ 'addField', 'user', 'user_is_temp', 'patch-user-user_is_temp.sql' ], |
| 37 | [ 'runMaintenance', MigrateRevisionCommentTemp::class ], |
| 38 | [ 'dropTable', 'revision_comment_temp' ], |
| 39 | [ 'runMaintenance', MigrateExternallinks::class ], |
| 40 | [ 'modifyField', 'externallinks', 'el_to', 'patch-externallinks-el_to_default.sql' ], |
| 41 | [ 'addField', 'pagelinks', 'pl_target_id', 'patch-pagelinks-target_id.sql' ], |
| 42 | [ 'dropField', 'externallinks', 'el_to', 'patch-externallinks-drop-el_to.sql' ], |
| 43 | [ 'runMaintenance', FixInconsistentRedirects::class ], |
| 44 | [ 'modifyField', 'image', 'img_size', 'patch-image-img_size_to_bigint.sql' ], |
| 45 | [ 'modifyField', 'filearchive', 'fa_size', 'patch-filearchive-fa_size_to_bigint.sql' ], |
| 46 | [ 'modifyField', 'oldimage', 'oi_size', 'patch-oldimage-oi_size_to_bigint.sql' ], |
| 47 | [ 'modifyField', 'uploadstash', 'us_size', 'patch-uploadstash-us_size_to_bigint.sql' ], |
| 48 | |
| 49 | // 1.42 |
| 50 | [ 'addField', 'user_autocreate_serial', 'uas_year', 'patch-user_autocreate_serial-uas_year.sql' ], |
| 51 | [ 'addTable', 'block_target', 'patch-block_target.sql' ], |
| 52 | [ 'dropIndex', 'categorylinks', 'cl_collation_ext', 'patch-drop-cl_collation_ext.sql' ], |
| 53 | [ 'runMaintenance', PopulateUserIsTemp::class ], |
| 54 | [ 'dropIndex', 'sites', 'site_type', 'patch-sites-drop_indexes.sql' ], |
| 55 | [ 'dropIndex', 'iwlinks', 'iwl_prefix_from_title', 'patch-iwlinks-drop-iwl_prefix_from_title.sql' ], |
| 56 | |
| 57 | // 1.43 |
| 58 | [ 'migratePagelinks' ], |
| 59 | [ 'modifyField', 'change_tag', 'ct_rc_id', 'patch-change_tag-ct_rc_id.sql' ], |
| 60 | [ 'runMaintenance', \MigrateBlocks::class ], |
| 61 | [ 'dropTable', 'ipblocks' ], |
| 62 | [ 'dropField', 'pagelinks', 'pl_title', 'patch-pagelinks-drop-pl_title.sql' ], |
| 63 | [ 'addPostDatabaseUpdateMaintenance', FixAutoblockLogTitles::class ], |
| 64 | |
| 65 | // 1.44 |
| 66 | [ 'addTable', 'file', 'patch-file.sql' ], |
| 67 | [ 'addField', 'categorylinks', 'cl_target_id', 'patch-categorylinks-target_id.sql' ], |
| 68 | [ 'addTable', 'collation', 'patch-collation.sql' ], |
| 69 | [ 'dropTable', 'module_deps' ], |
| 70 | |
| 71 | // 1.45 |
| 72 | [ 'addTable', 'existencelinks', 'patch-existencelinks.sql' ], |
| 73 | [ 'runMaintenance', FixWrongPasswordPrefixes::class ], |
| 74 | [ 'addIndex', 'categorylinks', 'cl_timestamp_id', 'patch-categorylinks-cl_timestamp_id.sql' ], |
| 75 | [ 'migrateCategorylinks' ], |
| 76 | [ 'normalizeCollation' ], |
| 77 | [ 'modifyPrimaryKey', 'categorylinks', [ 'cl_from', 'cl_target_id' ], 'patch-categorylinks-pk.sql' ], |
| 78 | [ 'addIndex', 'recentchanges', 'rc_source_name_timestamp', |
| 79 | 'patch-recentchanges-rc_source_name_timestamp.sql' ], |
| 80 | [ 'addIndex', 'recentchanges', 'rc_name_source_patrolled_timestamp', |
| 81 | 'patch-recentchanges-rc_name_source_patrolled_timestamp.sql' ], |
| 82 | [ 'dropField', 'recentchanges', 'rc_new', 'patch-recentchanges-drop-rc_new.sql' ], |
| 83 | [ 'dropField', 'categorylinks', 'cl_to', 'patch-categorylinks-drop-cl_to-cl_collation.sql' ], |
| 84 | |
| 85 | // 1.46 |
| 86 | [ 'addTable', 'watchlist_label', 'patch-watchlist_label.sql' ], |
| 87 | [ 'dropField', 'recentchanges', 'rc_type', 'patch-recentchanges-drop-rc_type.sql' ], |
| 88 | [ 'dropField', 'archive', 'ar_sha1', 'patch-archive-drop-ar_sha1.sql' ], |
| 89 | [ 'dropField', 'revision', 'rev_sha1', 'patch-revision-drop-rev_sha1.sql' ], |
| 90 | [ 'dropField', 'objectcache', 'modtoken', 'patch-objectcache-drop-modtoken.sql' ], |
| 91 | [ 'addField', 'imagelinks', 'il_target_id', 'patch-imagelinks-add-il_target_id.sql' ], |
| 92 | [ 'migrateImagelinks' ], |
| 93 | [ 'modifyPrimaryKey', 'imagelinks', [ 'il_from', 'il_target_id' ], 'patch-imagelinks-pk.sql' ], |
| 94 | [ 'addMissingTalkPageWatchlistLabels' ], |
| 95 | [ 'dropField', 'imagelinks', 'il_to', 'patch-imagelinks-drop-il_to.sql' ], |
| 96 | |
| 97 | // 1.47 |
| 98 | [ 'addField', 'site_stats', 'ss_temp_users', 'patch-site_stats-temp_users.sql' ], |
| 99 | ]; |
| 100 | } |
| 101 | |
| 102 | /** @inheritDoc */ |
| 103 | protected function getInitialUpdateKeys() { |
| 104 | return [ |
| 105 | 'filearchive-fa_major_mime-patch-fa_major_mime-chemical.sql', |
| 106 | 'image-img_major_mime-patch-img_major_mime-chemical.sql', |
| 107 | 'oldimage-oi_major_mime-patch-oi_major_mime-chemical.sql', |
| 108 | 'user_groups-ug_group-patch-ug_group-length-increase-255.sql', |
| 109 | 'user_former_groups-ufg_group-patch-ufg_group-length-increase-255.sql', |
| 110 | 'user_properties-up_property-patch-up_property.sql', |
| 111 | ]; |
| 112 | } |
| 113 | } |