-- looks fine in review, locks your busiest table in prod: ALTER TABLE users ALTER COLUMN email SET NOT NULL ; -- same result, no outage: ALTER TABLE users ADD CONSTRAINT users_email_nn CHECK ( email IS NOT NULL ) NOT VALID ; ALTER TABLE users VALIDATE CONSTRAINT users_email_nn ; ALTER TABLE user...
Source: [Dev.to](https://dev.to/technical_turtle/the-postgres-migration-that-locks-your-table-at-3am-and-how-to-catch-it-in-review-17pa)