-- 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 UNSIGNED DEFAULT 0 NOT NULL,
  ADD cl_target_id BIGINT UNSIGNED DEFAULT NULL;

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