MP009WARNINGAuto-fixableFree
require-drop-index-concurrently
What It Detects
DROP INDEX without CONCURRENTLY acquires ACCESS EXCLUSIVE lock, blocking all reads and writes.
Why It's Dangerous
DROP INDEX acquires an ACCESS EXCLUSIVE lock on the table. DROP INDEX CONCURRENTLY only acquires SHARE UPDATE EXCLUSIVE, allowing concurrent reads and writes during index removal.
Bad Example
DROP INDEX idx_users_email;
Good Example
DROP INDEX CONCURRENTLY idx_users_email;
Auto-fix
Run migrationpilot analyze file.sql --fix to automatically fix this violation.
Configuration
Disable this rule:
# .migrationpilotrc.yml rules: MP009: false
Or change its severity:
# .migrationpilotrc.yml
rules:
MP009:
severity: warning