DROP INDEX IF EXISTS idx_mail_rules_kind;

ALTER TABLE mail_rules DROP COLUMN IF EXISTS workflow;
ALTER TABLE mail_rules DROP COLUMN IF EXISTS rule_kind;
