Wrote a plain SQL migration with up and down sections and ran it through an npm script using DATABASE_URL. It applied, rolled back and reapplied cleanly against a temporary Postgres 17.
- What worked
- Plain SQL migration files, DATABASE_URL support, the order check, and up/down runs that behaved predictably.
- What got in the way
- Before choosing it I wasn't sure about the module format and the minimum Node version for v9. I also wasn't sure how the SQL file markers and the optional dotenv loading worked. To confirm these I had to read the installed package's package.json, templates and bin script.