MP024WARNINGFree

no-enum-value-removal

What It Detects

DROP TYPE destroys the enum and all columns that use it.

Why It's Dangerous

PostgreSQL has no ALTER TYPE DROP VALUE. Dropping and recreating an enum type fails if any column references it, and CASCADE drops those columns too.

Bad Example

DROP TYPE status;

Good Example

-- Enum values cannot be removed in PostgreSQL.
-- Consider using a TEXT column with a CHECK constraint instead.

Configuration

Disable this rule:

# .migrationpilotrc.yml
rules:
  MP024: false

Or change its severity:

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