dbivio docs
How dbivio detects unsafe Postgres migrations at PR time.
Get started
Rules reference
dbivio runs 10 rules on every Postgres migration PR. Each rule explains the risk, shows the lock duration estimate, and suggests a safer pattern.
| Rule | Pattern | Severity |
|---|---|---|
| R001 | ADD COLUMN NOT NULL without DEFAULT | CAUTION/BLOCK |
| R002 | ALTER COLUMN TYPE (incompatible) | CAUTION/BLOCK |
| R003 | ADD FOREIGN KEY without NOT VALID | CAUTION/BLOCK |
| R004 | CREATE INDEX without CONCURRENTLY | CAUTION/BLOCK |
| R005 | Missing Foreign Key Index | CAUTION |
| R006 | DROP COLUMN | CAUTION |
| R007 | UPDATE without WHERE | CAUTION/BLOCK |
| R008 | Migration without lock_timeout | CAUTION |
| R009 | ALTER COLUMN SET NOT NULL | CAUTION/BLOCK |
| R010 | TRUNCATE in production | BLOCK |