-- This file is automatically generated using maintenance/generateSchemaChangeSql.php.
-- Source: sql/abstractSchemaChanges/patch-categorylinks-pk.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
ALTER TABLE categorylinks
  DROP CONSTRAINT categorylinks_pkey;

ALTER TABLE categorylinks
  ALTER cl_target_id
SET
  NOT NULL;

ALTER TABLE categorylinks
  ADD PRIMARY KEY (cl_from, cl_target_id);
