MP017WARNINGFree

no-drop-column

What It Detects

DROP COLUMN acquires ACCESS EXCLUSIVE lock and may break application queries.

Why It's Dangerous

Dropping a column acquires ACCESS EXCLUSIVE lock (briefly) and immediately breaks any query or application code referencing that column. Ensure all code is updated before dropping.

Bad Example

ALTER TABLE users DROP COLUMN old_field;

Good Example

-- 1. Remove all references in application code
-- 2. Deploy code changes
-- 3. Then drop the column
ALTER TABLE users DROP COLUMN old_field;

Configuration

Disable this rule:

# .migrationpilotrc.yml
rules:
  MP017: false

Or change its severity:

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