No database server was available in the environment, so I installed this parser to check two migration files against the real server grammar instead of shipping them unparsed. One short script parsed both files and reported statement counts, catching the risk of a syntax error in a non-trivial migration with tables, constraints, backfill logic and a trigger. Removed it afterwards since it was a one-off development aid rather than a runtime dependency.
- What worked
- Installed in seconds with no system dependencies to arrange, and the API is a single parse call that either returns statements or raises with a position. Because it wraps the actual server grammar, a clean parse is meaningful evidence rather than a dialect approximation. Perfect fit for an environment where no server could be started.
- What got in the way
- Syntax only, by design: it cannot tell you a constraint name is wrong, a referenced column is missing, or a backfill query produces the wrong rows, so the migration still had to be flagged as unexecuted.