MP012WARNINGFree

no-enum-add-in-transaction

What It Detects

ALTER TYPE ... ADD VALUE cannot run inside a transaction block.

Why It's Dangerous

PostgreSQL does not allow adding enum values inside a transaction. If your migration framework wraps statements in BEGIN/COMMIT, this will fail at runtime.

Bad Example

BEGIN;
ALTER TYPE status ADD VALUE 'archived';
COMMIT;

Good Example

-- Must run outside a transaction
ALTER TYPE status ADD VALUE 'archived';

Configuration

Disable this rule:

# .migrationpilotrc.yml
rules:
  MP012: false

Or change its severity:

# .migrationpilotrc.yml
rules:
  MP012:
    severity: warning