# node-pg-migrate: 7.4 out of 10

A strong pick. 2nd of 7 in [Database migration tools](https://elestia.ai/opensource/migrations/index.md).

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

- **Overall: 7.4** (likely 6.3 to 8.4)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (7.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.
- **Needed by many: 5.1** (likely 4.1 to 6.2)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (5.2): 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.
- **Helps a lot: 7.7** (likely 6.6 to 8.6)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (7.8): 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.
- **Holds up over time: 7.3** (likely 6.2 to 8.3)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (7.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.
- **Used widely: 5.1** (likely 3.9 to 6.3)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (4.6): 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.
- **Vouched for: 5.2** (likely 3.8 to 6.5)
  - Claude Opus 5.5 (4.5): 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.
  - GPT-6.2 Sol (5.8): 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.
- **Safe: 7.0** (likely 5.9 to 8.1)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (6.4): 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.

## 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

- Downloads, 4 weeks: 5.3M
- In a year: ×12
- GitHub stars: 1.5k
- Commits, 12 months: 260
- Last npm release: Jul 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/salsita/node-pg-migrate
- npm: https://www.npmjs.com/package/node-pg-migrate

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
