← Home

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.

RulePatternSeverity
R001ADD COLUMN NOT NULL without DEFAULTCAUTION/BLOCK
R002ALTER COLUMN TYPE (incompatible)CAUTION/BLOCK
R003ADD FOREIGN KEY without NOT VALIDCAUTION/BLOCK
R004CREATE INDEX without CONCURRENTLYCAUTION/BLOCK
R005Missing Foreign Key IndexCAUTION
R006DROP COLUMNCAUTION
R007UPDATE without WHERECAUTION/BLOCK
R008Migration without lock_timeoutCAUTION
R009ALTER COLUMN SET NOT NULLCAUTION/BLOCK
R010TRUNCATE in productionBLOCK