Show HN: Flag Postgres migrations that lock tables before merge
Table-rewrite migrations silently stall production writes. Standard linters miss lock-acquisition hazards a live schema introduces under concurrent load. MigrationLock parses raw SQL ASTs—zero database connections, zero runtime overhead, single Go binary—and gates unsafe ALTER TABLE calls before merge.
Last month we merged a harmless-looking ALTER TABLE migration on a 14M-row orders table and stalled checkout for 40 seconds. EXPLAIN ANALYZE checks query speed, not table locks. I wrote a small Go CLI that reads SQL files in a pull request and warns on ACCESS EXCLUSIVE locks or missing CONCURRENTLY indexes offline. Limits: Postgres 14–17 only, and it does not track custom PL/pgSQL functions.