MP022WARNINGFree

no-drop-cascade

What It Detects

DROP ... CASCADE silently drops all dependent objects.

Why It's Dangerous

CASCADE silently drops views, indexes, constraints, and other objects that depend on the dropped object. This can cause unexpected data loss and application failures.

Bad Example

DROP TABLE users CASCADE;

Good Example

-- Drop dependents explicitly first
DROP VIEW IF EXISTS active_users;
DROP TABLE users;

Configuration

Disable this rule:

# .migrationpilotrc.yml
rules:
  MP022: false

Or change its severity:

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