-- This file is automatically generated using maintenance/generateSchemaChangeSql.php.
-- Source: sql/abstractSchemaChanges/patch-imagelinks-add-il_target_id.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
ALTER TABLE imagelinks
  ADD il_target_id BIGINT DEFAULT NULL;

CREATE INDEX il_target_id ON imagelinks (il_target_id, il_from);

CREATE INDEX il_backlinks_namespace_target_id ON imagelinks (
  il_from_namespace, il_target_id,
  il_from
);
