A PostgreSQL migration library for Node.js (v0.0.8) based on ThomWright's postgres-migrations, adding support for custom schema and migration table names. Migrations are defined in sequential SQL files (starting at 0_) and run in order with no down migrations. Requires Node >10.17.0 and supports PostgreSQL 9.4+. Ships TypeScript types. Key differentiator vs alternatives: simple file-based ordering, no timestamp reliance, and ability to run in custom schema/table.
npm install pg-node-migrationsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage of migrate() with custom schema/table, using database config object.
Explicitly set `ensureDatabaseExists: true` if you want the database to be created automatically.
Ensure file names follow the pattern: <number>_<description>.sql, starting from 0.
If using a client, create the database beforehand or use the config object instead.
Place only .sql files in the migration directory.
Rename files to ensure sequential order (e.g., 0_, 1_, 2_) with no missing numbers.
Remove ensureDatabaseExists from config when using client; the database must already exist.
Run `npm install pg` to install the peer dependency.