wiki.techinc.nl/maintenance/archives/patch-page_restrictions-null.sql
Máté Szabó 992da671a1 Add schema change to make page.page_restrictions column nullable
The page.page_restrictions field was used to store protection settings
for pages before MediaWiki 1.10 introduced the page_restrictions table.
update.php has since been running the updateRestrictions.php maintenance
script to migrate data from the legacy field to the new table.

In preparation for dropping this field, it is necessary to first make this
column nullable, so that we can remove code that references it during write
operations. This patch adds migrations for MySQL and SQLite to make the column
type 'tinyblob NULL'. Postgres does not seem to require a schema change, as the
field definition there is 'TEXT' rather than 'TEXT NOT NULL'.

Bug: T218446
Change-Id: I626859cdb5ab81c504a986129d21059ab088b8bd
2020-03-20 20:51:55 +01:00

3 lines
172 B
SQL

-- (T218446) Make page.page_restrictions nullable in preparation for dropping it
ALTER TABLE /*_*/page
CHANGE COLUMN page_restrictions page_restrictions TINYBLOB NULL;