-- t-paliad-165 follow-up down: remove jurisdiction column + restore the
-- old one-default-per-concept index. The added jurisdictional default
-- rows are kept (harmless without the index), but this isn't an
-- expected operation in production.

DROP INDEX IF EXISTS paliad.deadline_concept_event_types_one_default_per_jur;

ALTER TABLE paliad.deadline_concept_event_types
    DROP COLUMN IF EXISTS jurisdiction;

CREATE UNIQUE INDEX IF NOT EXISTS deadline_concept_event_types_one_default
    ON paliad.deadline_concept_event_types (concept_id)
    WHERE is_default = true;
