In 2007 (MW 1.10), the page_restrictions table was introduced. Rows in this table take precedence over the old page.page_restrictions field (r19095).
Later that year, a maintenance script was introduced to migrate old values (28df3d07e6, r21455).
Today, 12 years later, we still require an extra query to page.page_restrictions when calling Title::getRestrictions(), in addition to the page_restrictions table.
Let's finished this forgotten migration and kill off that field.
Plan
- Verify that the maintenance script still works. And update it to modern standards as needed in order to make it suitable for running on large WMF wikis.
- Ensure the updater is automatically run by the database updater.
- Run the maintenance script on all WMF wikis.
- Remove all code for queries to the old field. This, in addition to an improved update script that nulls out the column, should fix T30751.
- Add schema update that removes the field. (core: T35334, wmf: T60674)
I'm not suggesting we drop the column in prod as it seems low priority. The page tables are very large, and the maintenance script will already null-out this field. However, DBAs can decide what they want to do here.