Page MenuHomePhabricator

Remove database column page.page_restrictions from MediaWiki core
Open, Stalled, NormalPublic

Description

The field of page_restrictions of page table is superseded by the page_restriction table. Please remove that field to keep the database schema clean. Thanks.

Details

Reference
bz33334

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 12:06 AM
bzimport set Reference to bz33334.

Yah, the table is called "page_restrictions", the same as the field in page table.

I think it should be fairly easy to remove page.page_restrictions. It just requires a few schema patches, as I recall.

Can I work on this?

I prepared the schema patches but I'm confused as to what is to be done with Title::loadRestrictionsFromRows which compiles page restrictions from both page table and page_restrictions table. There are many occurences of page_restrictions in WikiPage.php. Should all that be removed?

Change 108219 had a related patch set uploaded by Tinaj1234:
Removing page_restrictions from page table

https://gerrit.wikimedia.org/r/108219

Existing entries in page_restriction field should be migrated to the page_restriction table.

Tinaj1234 removed Tinaj1234 as the assignee of this task.Oct 1 2015, 11:17 AM
Tinaj1234 set Security to None.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 1 2015, 11:17 AM
Devirk added a subscriber: Devirk.Oct 1 2015, 11:38 AM
Devirk removed a subscriber: Devirk.Nov 21 2015, 2:48 PM
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptApr 29 2016, 10:25 PM

Existing entries in page_restriction field should be migrated to the page_restriction table.

There is a script for this, updateRestrictions.php, which is run by update.php.

It looks like the part not done already is removing the column, both as a patch and from tables.sql.

Krinkle changed the task status from Open to Stalled.Jul 18 2019, 9:40 PM
Krinkle added a subscriber: Krinkle.

Read queries should be removed before the schema patch, preferably in a separate patch.

Krinkle updated the task description. (Show Details)