-- This file is automatically generated using maintenance/generateSchemaChangeSql.php.
-- Source: sql/abstractSchemaChanges/patch-categorylinks-target_id.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
ALTER TABLE categorylinks
  ADD cl_collation_id SMALLINT DEFAULT 0 NOT NULL;

ALTER TABLE categorylinks
  ADD cl_target_id BIGINT DEFAULT NULL;

CREATE INDEX cl_sortkey_id ON categorylinks (
  cl_target_id, cl_type, cl_sortkey,
  cl_from
);
