sql-migrate-up v4.2.1 is a simple SQL migration tool for Node.js with support for SQLite, PostgreSQL, and Snowflake. It provides a CLI and programmatic API (both fp-ts and Promise-based) for running, testing, and creating migrations. Key features: run-once vs. run-always migrations, schema/table configuration, parameter passing, and optional SQL syntax checking via sql-parser-cst. Released under MIT license, with stable release cadence on npm. Differentiates from other migration tools by its minimalism, first-class TypeScript support, and functional programming approach using fp-ts.
npm install sql-migrate-upNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures and runs the migration CLI programmatically using the Promise API. The example sets up schema, folder, and table, and implements select/execute/end callbacks with a database client.
Use a string like './migrations' or a function `(schema) => 'migrations/' + schema`.
Upgrade to v4+ and refactor config object. See migration guide in GitHub releases.
Use `parameters: ({ schema }) => TE.of({ schema })` (fp-ts) or `Promise.resolve({ schema })` (promise).Use `import { cli } from 'sql-migrate-up'`Install fp-ts: `npm install fp-ts`
Add `folder: './migrations'` to the config object
Set `"type": "module"` in package.json, or transpile with Babel/TypeScript