43 [
'addField',
'mwuser',
'user_password_expires',
'patch-user_password_expires.sql' ],
46 [
'addField',
'page',
'page_lang',
'patch-page_page_lang.sql' ],
49 [
'dropTable',
'hitcounter' ],
50 [
'dropField',
'site_stats',
'ss_total_views',
'patch-drop-ss_total_views.sql' ],
51 [
'dropField',
'page',
'page_counter',
'patch-drop-page_counter.sql' ],
55 [
'updateSchema',
'categorylinks',
'cl_type-category_types-ck',
56 'patch-categorylinks-constraints.sql' ],
57 [
'updateSchema',
'filearchive',
'fa_major_mime-major_mime-ck',
58 'patch-filearchive-constraints.sql' ],
59 [
'updateSchema',
'oldimage',
'oi_major_mime-major_mime-ck',
60 'patch-oldimage-constraints.sql' ],
61 [
'updateSchema',
'image',
'img_major_mime-major_mime-ck',
'patch-image-constraints.sql' ],
62 [
'updateSchema',
'uploadstash',
'us_media_type-media_type-ck',
63 'patch-uploadstash-constraints.sql' ],
65 [
'modifyField',
'image',
'img_major_mime',
66 'patch-img_major_mime-chemical.sql' ],
67 [
'modifyField',
'oldimage',
'oi_major_mime',
68 'patch-oi_major_mime-chemical.sql' ],
69 [
'modifyField',
'filearchive',
'fa_major_mime',
70 'patch-fa_major_mime-chemical.sql' ],
73 [
'dropTable',
'msg_resource_links' ],
74 [
'dropTable',
'msg_resource' ],
75 [
'addField',
'watchlist',
'wl_id',
'patch-watchlist-wl_id.sql' ],
76 [
'dropField',
'mwuser',
'user_options',
'patch-drop-user_options.sql' ],
77 [
'addTable',
'bot_passwords',
'patch-bot_passwords.sql' ],
78 [
'addField',
'pagelinks',
'pl_from_namespace',
'patch-pl_from_namespace.sql' ],
79 [
'addField',
'templatelinks',
'tl_from_namespace',
'patch-tl_from_namespace.sql' ],
80 [
'addField',
'imagelinks',
'il_from_namespace',
'patch-il_from_namespace.sql' ],
81 [
'dropIndex',
'categorylinks',
'cl_collation',
'patch-kill-cl_collation_index.sql' ],
82 [
'addIndex',
'categorylinks',
'cl_collation_ext',
83 'patch-add-cl_collation_ext_index.sql' ],
84 [
'dropField',
'recentchanges',
'rc_cur_time',
'patch-drop-rc_cur_time.sql' ],
85 [
'addField',
'page_props',
'pp_sortkey',
'patch-pp_sortkey.sql' ],
86 [
'updateSchema',
'oldimage',
'oldimage varchar',
'patch-oldimage-schema.sql' ],
87 [
'updateSchema',
'filearchive',
'filearchive varchar',
'patch-filearchive-schema.sql' ],
88 [
'updateSchema',
'image',
'image varchar',
'patch-image-schema.sql' ],
89 [
'updateSchema',
'recentchanges',
'recentchanges-drop-fks',
90 'patch-recentchanges-drop-fks.sql' ],
91 [
'updateSchema',
'logging',
'logging-drop-fks',
'patch-logging-drop-fks.sql' ],
92 [
'updateSchema',
'archive',
'archive-drop-fks',
'patch-archive-drop-fks.sql' ],
95 [
'addIndex',
'recentchanges',
'rc_name_type_patrolled_timestamp',
96 'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
97 [
'addField',
'change_tag',
'ct_id',
'patch-change_tag-ct_id.sql' ],
100 [
'addField',
'externallinks',
'el_index_60',
'patch-externallinks-el_index_60.sql' ],
101 [
'dropIndex',
'oldimage',
'oi_name_archive_name',
102 'patch-alter-table-oldimage.sql' ],
105 [
'modifyField',
'image',
'img_media_type',
'patch-add-3d.sql' ],
106 [
'addIndex',
'site_stats',
'PRIMARY',
'patch-site_stats-pk.sql' ],
109 [
'addTable',
'comment',
'patch-comment-table.sql' ],
111 [
'addField',
'image',
'img_description_id',
'patch-image-img_description_id.sql' ],
113 [
'migrateComments' ],
116 [
'addTable',
'slot_roles',
'patch-slot_roles.sql' ],
117 [
'addTable',
'content_models',
'patch-content_models.sql' ],
118 [
'addTable',
'content',
'patch-content.sql' ],
119 [
'addTable',
'slots',
'patch-slots.sql' ],
120 [
'addField',
'slots',
'slot_origin',
'patch-slot-origin.sql' ],
121 [
'migrateArchiveText' ],
122 [
'addTable',
'actor',
'patch-actor-table.sql' ],
124 [
'modifyField',
'revision',
'rev_text_id',
'patch-rev_text_id-default.sql' ],
125 [
'modifyTable',
'site_stats',
'patch-site_stats-modify.sql' ],
126 [
'populateArchiveRevId' ],
127 [
'modifyField',
'recentchanges',
'rc_patrolled',
'patch-rc_patrolled_type.sql' ],
128 [
'addIndex',
'recentchanges',
'rc_namespace_title_timestamp',
129 'patch-recentchanges-nttindex.sql' ],
132 [
'addTable',
'change_tag_def',
'patch-change_tag_def.sql' ],
133 [
'populateExternallinksIndex60' ],
134 [
'modifyfield',
'externallinks',
'el_index_60',
135 'patch-externallinks-el_index_60-drop-default.sql' ],
136 [
'runMaintenance', DeduplicateArchiveRevId::class,
'maintenance/deduplicateArchiveRevId.php' ],
137 [
'addField',
'change_tag',
'ct_tag_id',
'patch-change_tag-tag_id.sql' ],
138 [
'addIndex',
'archive',
'ar_revid_uniq',
'patch-archive-ar_rev_id-unique.sql' ],
139 [
'populateContentTables' ],
140 [
'addIndex',
'logging',
'log_type_action',
'patch-logging-log-type-action-index.sql' ],
141 [
'dropIndex',
'logging',
'type_action',
'patch-logging-drop-type-action-index.sql' ],
142 [
'addIndex',
'interwiki',
'PRIMARY',
'patch-interwiki-pk.sql' ],
143 [
'addIndex',
'protected_titles',
'PRIMARY',
'patch-protected_titles-pk.sql' ],
144 [
'addIndex',
'page_props',
'PRIMARY',
'patch-page_props-pk.sql' ],
145 [
'addIndex',
'site_identifiers',
'PRIMARY',
'patch-site_identifiers-pk.sql' ],
146 [
'addIndex',
'recentchanges',
'rc_this_oldid',
'patch-recentchanges-rc_this_oldid-index.sql' ],
147 [
'dropTable',
'transcache' ],
148 [
'runMaintenance', PopulateChangeTagDef::class,
'maintenance/populateChangeTagDef.php' ],
149 [
'addIndex',
'change_tag',
'change_tag_rc_tag_id',
150 'patch-change_tag-change_tag_rc_tag_id.sql' ],
151 [
'addField',
'ipblocks',
'ipb_sitewide',
'patch-ipb_sitewide.sql' ],
152 [
'addTable',
'ipblocks_restrictions',
'patch-ipblocks_restrictions-table.sql' ],
153 [
'migrateImageCommentTemp' ],
156 [
'dropField',
'change_tag',
'ct_tag',
'patch-drop-ct_tag.sql' ],
157 [
'dropTable',
'valid_tag' ],
158 [
'dropTable',
'tag_summary' ],
159 [
'dropField',
'protected_titles',
'pt_reason',
'patch-drop-comment-fields.sql' ],
163 protected function applyPatch( $path, $isFullPath =
false, $msg =
null ) {
164 $prevScroll = $this->db->scrollableCursor(
false );
165 $prevPrep = $this->db->prepareStatements(
false );
166 parent::applyPatch( $path, $isFullPath, $msg );
167 $this->db->scrollableCursor( $prevScroll );
168 $this->db->prepareStatements( $prevPrep );
184 protected function updateSchema( $table, $updatekey, $patch, $fullpath =
false ) {
185 if ( !$this->db->tableExists( $table, __METHOD__ ) ) {
186 $this->
output(
"...$table table does not exist, skipping schema update patch.\n" );
188 $this->
output(
"...$table already had schema updated by $patch.\n" );
190 $apply = $this->
applyPatch( $patch, $fullpath,
"Updating schema of table $table" );
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
Class for handling database updates.
updateRowExists( $key)
Helper function: check if the given key is present in the updatelog table.
output( $str)
Output some text.
insertUpdateRow( $key, $val=null)
Helper function: Add a key to the updatelog table Obviously, only use this for updates that occur aft...
Class for setting up the MediaWiki database using Microsoft SQL Server.
updateSchema( $table, $updatekey, $patch, $fullpath=false)
General schema update for a table that touches more than one field or requires destructive actions (s...
applyPatch( $path, $isFullPath=false, $msg=null)
Applies a SQL patch.
getCoreUpdateList()
Get an array of updates to perform on the database.