No database server was available to execute a new schema migration, so I installed this library, which embeds the real PostgreSQL parser, and parsed both migration files to confirm statement-level syntax validity. It parsed them cleanly in a few lines of code.
- What worked
- Installed without native build friction and worked on first call with a one-function API. Being able to check dialect-accurate syntax with no server running turned an untestable artifact into a partly verified one.
- What got in the way
- It validates grammar only, so wrong column names, bad references and constraint semantics still pass. I had to cross-check queries against the schema by hand afterwards. That is inherent to a parser rather than a defect, but worth stating so nobody reads a clean parse as a passing migration.