Zero-Downtime DDL Migration Lock Linter
Audit Oracle, PostgreSQL, and MySQL schema migrations 100% locally in your browser before merging a Pull Request. Detect table-blocking locks, full heap rewrites, and unindexed Oracle Foreign Key deadlocks.
Zero-Downtime DDL Lock Reference (11 Patterns)
Oracle CREATE INDEX vs CREATE INDEX ... ONLINE
Building a standard Oracle index without ONLINE blocks all INSERT, UPDATE, and DELETE statements on the table for the full scan and sort duration.
Oracle - DANGEROracle Unindexed Foreign Key (TM Table Lock & ORA-00060 Deadlock)
In Oracle, adding a Foreign Key without indexing the child FK columns causes parent DELETE or PK UPDATE statements to lock the entire child table, triggering enq: TM - contention and ORA-00060 deadlocks.
Oracle - DANGEROracle DROP COLUMN vs SET UNUSED + CHECKPOINT
Physically dropping a column on a multi-million row Oracle table rewrites every data block, generates massive Undo/Redo, and blocks production DML.
Oracle - DANGEROracle ALTER TABLE MOVE vs MOVE ONLINE UPDATE INDEXES
Running ALTER TABLE MOVE offline locks the entire table and invalidates every index on the segment until manually rebuilt.
Oracle - CAUTIONOracle ADD COLUMN DEFAULT (11g+/12c+ Metadata Optimization)
Oracle 11g+ handles DEFAULT ... NOT NULL via dictionary metadata (and 12c+ extends this to nullable DEFAULTs), but still requires a brief exclusive DDL lock that fails with ORA-00054 on hot tables unless DDL_LOCK_TIMEOUT is set.
PostgreSQL - DANGERPostgreSQL CREATE INDEX vs CREATE INDEX CONCURRENTLY
Standard CREATE INDEX acquires a SHARE lock blocking every INSERT, UPDATE, and DELETE until the entire index finishes building.
PostgreSQL - DANGERPostgreSQL ALTER COLUMN TYPE (ACCESS EXCLUSIVE Rewrite)
Changing a column type (such as INT to BIGINT) forces PostgreSQL to rewrite every heap page and rebuild all indexes while blocking every query.
PostgreSQL - DANGERPostgreSQL ADD CONSTRAINT ... NOT VALID + VALIDATE
Adding a FOREIGN KEY or CHECK constraint without NOT VALID scans the entire table while blocking concurrent writes.
PostgreSQL - DANGERPostgreSQL SET NOT NULL Zero-Downtime Pattern
Calling SET NOT NULL directly scans every row while holding ACCESS EXCLUSIVE. On PostgreSQL 12+, adding and validating a CHECK (col IS NOT NULL) NOT VALID constraint first lets SET NOT NULL finish instantaneously.
PostgreSQL - CAUTIONPostgreSQL ADD COLUMN (Fast Default vs Volatile Default Rewrite)
PostgreSQL 11+ adds columns with constant defaults instantaneously in metadata, but volatile expressions like random() or gen_random_uuid() still rewrite the entire table under ACCESS EXCLUSIVE.
MySQL - CAUTIONMySQL InnoDB Online DDL (ALGORITHM=INSTANT / INPLACE, LOCK=NONE)
MySQL silently falls back to a write-blocking ALGORITHM=COPY table rebuild if an operation is unsupported online, unless you explicitly declare ALGORITHM and LOCK=NONE.