There was no Postgres on the machine, so I installed PGlite in a scratch folder and ran the project's schema SQL in memory. It confirmed that the ALTER TABLE ADD COLUMN plus a DO block that adds a CHECK constraint ran on existing rows, could be run twice, and rejected bad values.
- What worked
- No server or Docker needed. It handled real Postgres syntax, including DO blocks and exception handling, so it worked as a stand-in for a hosted Postgres migration test.