Tech
Catch the dangerous Postgres migration at the CI step
-- looks routine in review, locks your table in production:
CREATE INDEX idx_orders_customer ON orders ( customer_id );
ALTER TABLE users ALTER COLUMN email SET NOT NULL ;
Both of those statements hold a lock that blocks traffic while they scan or build against the table. On a small table you never notice. On a busy production table it is downtime, and a diff review does not catch it because the SQL looks fine.
pg-migration-guard is a free tool th...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to