wiki.techinc.nl/maintenance/archives/patch-categorylinks-cl_to-varbinary.sql
Amir Sarabadani 1476e3b5b5 Migrate categorylinks to abstract schema
To get MySQL/SQLite migrated, changing type of cl_to and
cl_sortkey_prefix from "varchar() binary" to varbinary

For Postgres:
 - Dropping foreign key on cl_from
 - Setting proper default for cl_from, cl_to, cl_sortkey, cl_collation
 - Set cl_sortkey to not nullable
 - Dropping unique index cl_from which in turn should become PK
 - Adding several missing indexes
 - Fixing columns of cl_sortkey

Bug: T230428
Bug: T164898
Change-Id: I83043ef41f9c753734f1e4b51237d979031dd71a
2020-12-03 07:43:02 +00:00

2 lines
172 B
SQL

ALTER TABLE /*_*/categorylinks MODIFY cl_to VARBINARY(255) DEFAULT '' NOT NULL;
ALTER TABLE /*_*/categorylinks MODIFY cl_sortkey_prefix VARBINARY(255) DEFAULT '' NOT NULL;