-- Add rule execution phase (pre/post unsubscribe)
CREATE TYPE "RulePhase" AS ENUM ('PRE_UNSUBSCRIBE', 'POST_UNSUBSCRIBE');

ALTER TABLE "Rule"
ADD COLUMN "phase" "RulePhase" NOT NULL DEFAULT 'POST_UNSUBSCRIBE';
