-- 136_procedural_events_additive (down) — Slice B.1, t-paliad-273
--
-- Safe to run at any point in B.1's lifetime. Up does NOT touch
-- paliad.deadline_rules, so dropping the new tables + columns loses no
-- application data — every source row in deadline_rules is intact and
-- authoritative through the dual-write window.
--
-- Reverse order: drop indexes implicitly via DROP TABLE, drop the two
-- deadlines link columns first (their FKs target procedural_events +
-- sequencing_rules), then drop the three new tables in FK-safe order
-- (sequencing_rules → procedural_events → legal_sources).

ALTER TABLE paliad.deadlines
    DROP COLUMN IF EXISTS procedural_event_id,
    DROP COLUMN IF EXISTS sequencing_rule_id;

DROP TABLE IF EXISTS paliad.sequencing_rules;
DROP TABLE IF EXISTS paliad.procedural_events;
DROP TABLE IF EXISTS paliad.legal_sources;
