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.
Description
Details
- Reference
- bz33334
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
schema: Drop legacy page_restrictions in page table | mediawiki/core | master | +287 -16 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Ladsgroup | T60674 Drop page.page_restrictions column from Wikimedia wikis | |||
Declined | None | T30751 prop=info&inprop=protection sometimes shows protection multiple times | |||
Open | None | T251411 page_restrictions field incomplete in current and historical dumps | |||
Resolved | Ladsgroup | T35334 Remove database column page.page_restrictions from MediaWiki core | |||
Resolved | Ladsgroup | T218446 Remove use of legacy page.page_restrictions field | |||
Resolved | Reedy | T166184 Run updateRestrictions.php on WMF wikis | |||
Resolved | Marostegui | T248333 Schema change: Make page.page_restrictions column NULL |
Event Timeline
I think it should be fairly easy to remove page.page_restrictions. It just requires a few schema patches, as I recall.
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
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.
Read queries should be removed before the schema patch, preferably in a separate patch.
Change 798445 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):
[mediawiki/core@master] schema: Drop legacy page_restrictions in page table
Change 798445 merged by jenkins-bot:
[mediawiki/core@master] schema: Drop legacy page_restrictions in page table
Sorry about that. Will fix it. I'm sure we didn't have any data loss, it's just fatals.