-- Revert mig 102 — drop paliad.system_audit_log and its indexes / policies.
-- audit_reason set_config required by the mig 079 trigger pattern.

SELECT set_config(
    'paliad.audit_reason',
    'mig 102 down: drop paliad.system_audit_log (t-paliad-214 Slice 1 revert)',
    true);

DROP POLICY IF EXISTS system_audit_log_select_admin ON paliad.system_audit_log;
DROP POLICY IF EXISTS system_audit_log_select_self  ON paliad.system_audit_log;

DROP INDEX IF EXISTS paliad.system_audit_log_event_type_created_at_idx;
DROP INDEX IF EXISTS paliad.system_audit_log_actor_id_created_at_idx;

DROP TABLE IF EXISTS paliad.system_audit_log;
