node-pg-migrate
A strong pick. 2nd of 7 database migration tools.
node-pg-migrate is a PostgreSQL-only migration runner for Node.js. You write migrations as JS/TS builder calls or as plain SQL files. It is actively developed, typed, and covers more Postgres features than its peers, so it is a strong pick for Postgres projects that do not use an ORM. The v10 line, now in alpha, brings another round of breaking changes.
Best for: Node/TypeScript teams on PostgreSQL without an ORM who want typed, reversible migrations that cover Postgres-specific DDL.
Scores
Overall7.4
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
For Postgres projects without an ORM it is a strong, actively developed pick. It offers deeper Postgres support than Umzug, db-migrate or Postgrator, and a more general workflow than Graphile Migrate. Being Postgres-only, depending on one main maintainer, and the churn of breaking majors keep it out of the top band. dbmate is the language-agnostic alternative if you prefer plain SQL.
- peers: Most active JS-native peer, with strong download growth
- github.com/salsita/node-pg-migrate/releases: Stable v9 out; v10 alpha with breaking changes
- github.com/salsita/node-pg-migrate/discussions/1635: Maintainer load and roadmap
GPT-6.2 Sol: 7.7, likely 6.6 to 8.7
For a new Node.js and PostgreSQL project, v9 offers a capable typed migration API, plain SQL support, and active maintenance. Dbmate is a stronger fit for teams that want a standalone SQL CLI across engines, and Umzug fits existing Sequelize workflows. The stable dry-run and privilege-handling defects, along with limited production evidence for v9, leave room for a lower score.
- github.com/salsita/node-pg-migrate/releases/tag/v9.0.0: Confirms the stable release, TypeScript support, and recent maintenance.
- github.com/amacneil/dbmate: Documents a standalone SQL migration CLI with several database engines.
- github.com/sequelize/umzug: Documents Sequelize integration and configurable migration storage.
- salsita.github.io/node-pg-migrate/upgrading: Documents stable v9 limitations that matter in deployment.
Needed by many5.1
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
Many backend projects need migrations, but this tool serves only PostgreSQL users who do not get migrations from an ORM. Postgres is the most common database for new Node backends, which keeps this group large. Teams on Prisma, Drizzle or other databases fall outside it.
- github description: Node.js migration management for PostgreSQL only
- bytebase.com/blog/top-open-source-postgres-migration-tools: Listed as the main Node option for Postgres migrations
GPT-6.2 Sol: 5.2, likely 4.2 to 6.3
Versioned schema changes are a recurring need for teams that own a relational database, and 57.9% of respondents to the 2026 Stack Overflow database question reported using PostgreSQL. The audience narrows to teams that run Node.js migrations and want a standalone tool. The survey gives a good measure of PostgreSQL use, but its overlap with this workflow is uncertain.
- survey.stackoverflow.co/2026/technology/data: PostgreSQL led reported database use at 57.9%.
- npmjs.com/package/node-pg-migrate: Stable package targets PostgreSQL and requires Node.js 20.11 or later.
Helps a lot7.7
How well does it do the job for those who need it?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
Among the peers it has the richest Postgres-aware builder API. It has its own types, transactional migrations, SQL-file support, a programmatic API and, since v9, built-in TypeScript loading. Its limits are manual handling of steps that cannot run in a transaction and the churn between majors. The range stays moderate because I found no user benchmarks or detailed reviews.
- github.com/salsita/node-pg-migrate/releases: v9 adds jiti and index naming; v10 alphas add partitions, a status command and a real dry-run
- bytebase.com/blog/top-open-source-postgres-migration-tools: Builder API plus SQL; concurrent indexes need noTransaction()
- npm hasTypes: Ships TypeScript types
GPT-6.2 Sol: 7.8, likely 6.7 to 8.7
Stable v9 combines a typed PostgreSQL builder, plain SQL, a CLI and a programmatic runner with transaction support and advisory locking. The types and documented examples give coding agents concrete API signatures to work from, though the live documentation also describes v10 behavior. A dry run can write to the database, and concurrent index creation needs an explicit transaction opt-out. Independent coverage establishes the workflow, while comparative evidence on speed, error messages, and agent accuracy is sparse.
- github.com/salsita/node-pg-migrate/releases/tag/v9.0.0: Stable release adds the TypeScript loader and configurable advisory lock mode.
- salsita.github.io/node-pg-migrate/upgrading: Separates stable v9 behavior from the read-only dry-run fix in v10.
- bytebase.com/blog/top-open-source-postgres-migration-tools: Describes SQL and builder support and the concurrent-index transaction requirement.
- encore.dev/articles/postgres-migrations-typescript: Compares the typed migration workflow with ORM-based alternatives.
Holds up over time7.3
Will it still be a good choice in two years?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
The project is very active: 260 commits and 18 releases in the last year, 15 open issues, and a public v9-to-v10 roadmap. One volunteer maintainer still carries most of the work. Co-maintainers are being onboarded, and the stable v9 release was delayed by that maintainer's injury. Frequent breaking majors add upgrade cost.
- github commitsLastYear: 260 commits and 18 releases in the last year
- github.com/salsita/node-pg-migrate/discussions/1635: Single main maintainer; co-maintainers being onboarded; v10 plans
- scorecard Maintained: Maintained check scores 10
GPT-6.2 Sol: 7.6, likely 6.4 to 8.6
The repository recorded 260 commits in a year, v9 shipped in July, and v10 is seeing active prerelease work. The release notes show contributions from several people, and the project lists three active maintainers. Two stable npm releases in the past year, the loader changes in v9, and further CLI changes planned for v10 temper the score. The range reflects limited evidence on funding, issue response times, and how widely release duties are shared.
- github: 260 commits, 18 GitHub releases, and 15 open issues.
- npm versionsLastYear: Two stable npm versions in the collector window.
- github.com/salsita/node-pg-migrate/releases: Release history shows ongoing v10 alpha development.
- github.com/salsita/node-pg-migrate/releases/tag/v9.0.0: Documents the addition of two co-maintainers and the loader changes.
- github.com/salsita/node-pg-migrate/discussions/1635: Roadmap describes shared maintenance and changes to the next major release.
Used widely5.1
How many use it, and is that growing?
Claude Opus 5.5: 5.5, likely 4.5 to 6.5
Downloads rose 11.6x in a year, from 461k to 5.3M per 4 weeks, well above the 4.1 median. That jump is so sudden that much of it probably comes from a tool or CI pipeline that installs it, not from new direct choices. Its 1,035 dependent repos put it well behind Umzug (52,927), Postgrator (3,053) and db-migrate (2,821). That points to tens of thousands of real users, not hundreds of thousands.
- npm downloadsLast4Weeks: 5.3M now vs 461k a year ago
- dependents repos: 1,035 repos, below several peers
- github stars: 1,496 stars
GPT-6.2 Sol: 4.6, likely 3.2 to 6.0
Four-week downloads reached 5.34 million, up 11.6 times year over year against the catalog median of 4.1 times. The tracked footprint is 1,035 repositories and 51 packages, behind Postgrator and db-migrate on repository count. Umzug has a much larger footprint and also gets indirect installs through Sequelize CLI. Repeated installs, partial repository coverage, and sparse social attention leave the number of direct adopters uncertain.
- npm downloadsLast4Weeks and downloadsSame4WeeksYearAgo: 5,341,274 downloads versus 461,041 a year earlier.
- medianDownloadsRatio: The catalog median was 4.1 times.
- dependents and peers: 1,035 tracked repositories versus 2,821 for db-migrate and 3,053 for Postgrator.
- github stars, hackerNews, and bluesky: 1,496 stars, zero matched Hacker News stories, and one Bluesky post.
- github.com/sequelize/cli/blob/main/package.json: Sequelize CLI installs Umzug as a dependency.
Vouched for5.2
Who stands behind it being good?
Claude Opus 5.5: 4.5, likely 3.0 to 6.0
Third-party guides and migration-tool roundups often name it as the standard Node option for Postgres without an ORM. It has no Hacker News stories, almost no Bluesky posts, and no visible production endorsements from well-known companies or frameworks. Independent evidence of quality is thin.
- bytebase.com/blog/top-open-source-postgres-migration-tools: Independent roundup covers it as a main Node option
- dev.to/axiom_agent/nodejs-database-migrations-in-production-zero-downtime-strategies-that-actually-work-feo: Mentioned in a production migration strategies article
- hackerNews stories: 0 stories; 1 Bluesky post
GPT-6.2 Sol: 5.8, likely 4.6 to 7.0
InsForge runs it in its deployment workflow on v8, and LogPress documents production deploys using v9. Bytebase and Encore identify a clear fit for PostgreSQL teams that want migrations as code, and a developer discussion praises the choice of a builder or SQL. The public record for stable v9 is still small, with little evidence from benchmarks or satisfaction surveys.
- github.com/InsForge/InsForge/blob/main/backend/package.json: InsForge uses v8 in its database migration scripts.
- github.com/InsForge/InsForge/blob/main/Dockerfile: Production image applies migrations before starting the server.
- github.com/kaiwenyao/logpress: LogPress documents automatic SQL migrations on production deploys.
- github.com/kaiwenyao/logpress/blob/main/package.json: LogPress declares node-pg-migrate v9.
- bytebase.com/blog/top-open-source-postgres-migration-tools: Independent comparison identifies strengths and operational limits.
- encore.dev/articles/postgres-migrations-typescript: Independent comparison describes its fit for teams with an existing deployment pipeline.
- reddit.com/r/node/comments/181myo7/migration_without_orm: Developer discussion praises having both builder and raw SQL options.
Safe7.0
How safe is it to depend on?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
It has no known advisories, only 3 dependencies, an MIT licence, and pinned dependencies plus safe workflows in CI. The OpenSSF Scorecard is 6.6, with no security policy, SAST or fuzzing, and weak branch protection. Releases depend mostly on one maintainer.
- advisories total: 0 advisories
- scorecard score: 6.6; Security-Policy, SAST and Fuzzing score 0; Branch-Protection 3
- npm dependencies: 3 dependencies, MIT licence
GPT-6.2 Sol: 6.4, likely 5.2 to 7.6
The MIT package has three direct dependencies plus the separately installed pg driver, and the OSV snapshot lists zero advisories. The v9 release switched to GitHub Actions trusted publishing with npm provenance, while Scorecard reports weak branch protection and gives zero for its security-policy, fuzzing, and static-analysis checks. Stable v9 can write during a dry run, and its table-grant helper can grant privileges more broadly than intended. The range reflects those documented defects and limited visibility into who can trigger publication.
- npm dependencies and license: Three direct dependencies and an MIT license.
- advisories: The OSV snapshot records zero package advisories.
- scorecard: 6.6 overall, branch protection at 3, and three relevant checks at 0.
- github.com/salsita/node-pg-migrate/pull/1571/files: Publishing workflow switches to OIDC and requests npm provenance.
- npmjs.com/package/node-pg-migrate: Documents the separately installed pg driver.
- salsita.github.io/node-pg-migrate/upgrading: Documents the v9 dry-run and table-grant defects and their v10 fixes.
Good
- Its builder API covers Postgres features most runners skip, including policies, partitions, BRIN indexes, sequences and grants.
- Each migration runs in a transaction by default, and you can write migrations as JS/TS or plain SQL files.
- It ships its own types, and since v9 it runs TypeScript migrations through jiti, so you no longer need a ts-node or tsx setup.
- Development is very active, with 260 commits and frequent releases in the last year, and it has a public roadmap.
Bad
- It works with PostgreSQL only, so it is no help if you might change databases.
- Major versions bring many small breaking changes: v9 made empty options throw, and the v10 alphas change the CLI, dry-run and quoting behaviour.
- One volunteer maintainer still does most of the release work, and no funding is visible.
- You must remember to call pgm.noTransaction() for steps that cannot run in a transaction, such as concurrent index creation.
The numbers
- npm downloads, 4 weeks
- 5.3M ×12 in a year
- GitHub stars
- 1.5k
- Commits, 12 months
- 260
- npm version
- 9.0.0 Jul 2026
- Versions, 12 months
- 2
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 6.6 out of 10, Oct 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (salsita/node-pg-migrate), npm (node-pg-migrate), OSV and the OpenSSF Scorecard.