Merge "Drop MysqlUpdater::doRestrictionsUpdate() and its related sql file."

This commit is contained in:
jenkins-bot 2021-03-12 19:39:54 +00:00 committed by Gerrit Code Review
commit 118631d369
2 changed files with 0 additions and 49 deletions

View file

@ -443,35 +443,6 @@ class MysqlUpdater extends DatabaseUpdater {
} }
} }
/**
* Adding page_restrictions table, obsoleting page.page_restrictions.
* Migrating old restrictions to new table
* -- Andrew Garrett, January 2007.
*/
protected function doRestrictionsUpdate() {
if ( $this->db->tableExists( 'page_restrictions', __METHOD__ ) ) {
$this->output( "...page_restrictions table already exists.\n" );
return;
}
$this->applyPatch(
'patch-page_restrictions.sql',
false,
'Creating page_restrictions table (1/2)'
);
$this->applyPatch(
'patch-page_restrictions_sortkey.sql',
false,
'Creating page_restrictions table (2/2)'
);
$this->output( "done.\n" );
$this->output( "Migrating old restrictions to new table...\n" );
$task = $this->maintenance->runChild( UpdateRestrictions::class );
$task->execute();
}
protected function doCategorylinksIndicesUpdate() { protected function doCategorylinksIndicesUpdate() {
if ( !$this->indexHasField( 'categorylinks', 'cl_sortkey', 'cl_from' ) ) { if ( !$this->indexHasField( 'categorylinks', 'cl_sortkey', 'cl_from' ) ) {
$this->applyPatch( 'patch-categorylinksindex.sql', false, "Updating categorylinks Indices" ); $this->applyPatch( 'patch-categorylinksindex.sql', false, "Updating categorylinks Indices" );

View file

@ -1,20 +0,0 @@
--- Used for storing page restrictions (i.e. protection levels)
CREATE TABLE /*$wgDBprefix*/page_restrictions (
-- Page to apply restrictions to (Foreign Key to page).
pr_page int NOT NULL,
-- The protection type (edit, move, etc)
pr_type varbinary(60) NOT NULL,
-- The protection level (Sysop, autoconfirmed, etc)
pr_level varbinary(60) NOT NULL,
-- Whether or not to cascade the protection down to pages transcluded.
pr_cascade tinyint NOT NULL,
-- Field for future support of per-user restriction.
pr_user int NULL,
-- Field for time-limited protection.
pr_expiry varbinary(14) NULL,
PRIMARY KEY pr_pagetype (pr_page,pr_type),
KEY pr_typelevel (pr_type,pr_level),
KEY pr_level (pr_level),
KEY pr_cascade (pr_cascade)
) /*$wgDBTableOptions*/;