# Postgrator: 5.5 out of 10

Reasonable, with limits. 5th of 7 in [Database migration tools](https://elestia.ai/opensource/migrations/index.md).

Postgrator is a small, mature Node.js library that runs numbered plain-SQL (or JS) migration files on PostgreSQL, MySQL, SQL Server and SQLite. It is reliable and simple, but it is maintained by one person at a slow pace and does less than node-pg-migrate or dbmate, so it is a reasonable choice rather than a first pick.

**Best for:** Developers who want to embed a minimal plain-SQL migration runner in a Node app and bring their own database driver.

## Scores

- **Overall: 5.5** (likely 4.4 to 6.6)
  - Claude Opus 5.5 (5.0): Postgrator is a dependable, minimal plain-SQL migration runner with a clean safety record and multi-database support. Maintenance by one person is slow, it lacks features peers have, and it is losing share while node-pg-migrate and dbmate grow fast. It suits embedding, as in Platformatic, but most new projects are better served by a more active peer.
  - GPT-6.2 Sol (6.0): Postgrator is a reasonable new choice when a Node.js team wants plain SQL, checksum checks, and control of the database connection. Its sparse release history and separate migration and history writes make it harder to recommend as the category default. Dbmate is stronger for teams that want a standalone SQL CLI and transactional migrations, while node-pg-migrate offers built-in locking for PostgreSQL. The range reflects how much the choice depends on the deployment setup and whether the renewed maintenance continues.
- **Needed by many: 5.7** (likely 4.6 to 6.8)
  - Claude Opus 5.5 (6.0): Most backend projects with a SQL database need migrations. Postgrator covers four SQL engines rather than one, which keeps its potential audience broad. Its plain-SQL, library-first approach suits a sizeable group, though not ORM users who already get migrations from their ORM.
  - GPT-6.2 Sol (5.4): Schema migrations are common in database-backed applications, and Postgrator covers four widely used SQL engines. Its fit is narrower because it is a Node.js library for teams that maintain SQL files and supply their own database client. The survey measures database use across developers, so the share of JavaScript and TypeScript projects that want this workflow is an estimate.
- **Helps a lot: 6.0** (likely 4.9 to 7.0)
  - Claude Opus 5.5 (5.5): Postgrator does the core job well: versioned do/undo files, checksum validation, async JS migrations, events, and migrating up or down to a target version. It is minimal, though. The library has no CLI of its own, no generator, no schema DSL, and no rollback of a whole failed batch. node-pg-migrate and dbmate offer more for most users. The API is small, which makes it easy for AI agents to write correct code for it.
  - GPT-6.2 Sol (6.4): Version 8.0.1 runs SQL up and down to a target version, verifies applied SQL checksums, and reports which steps completed before an error. It runs each script and records it in separate calls, so a history write failure can leave the schema ahead of the recorded version. The shipped types help with integration, though the README's broken pg example can mislead developers and coding agents. Current code confirms the main behavior, while independent performance and agent coding measurements are sparse.
- **Holds up over time: 5.0** (likely 3.5 to 6.4)
  - Claude Opus 5.5 (5.0): The project has been alive since 2012 and still gets fixes. 8.0.1 came out in November 2026, and a TypeScript v9 is in progress. There were only 14 commits and one release in the year, it rests mainly on one maintainer, and it has no known funding. Breaking changes are rare and well documented.
  - GPT-6.2 Sol (4.9): The project made 14 commits and published one npm patch in the last year, following a roughly two-year release gap. The changelog shows work on version 9, including a TypeScript rewrite, a higher Node.js minimum, and breaking type changes. The Windows glob report is still open, and both dbmate and node-pg-migrate had substantially more commits. The next release and the project's ability to sustain a faster maintenance pace are uncertain.
- **Used widely: 4.1** (likely 3.1 to 5.2)
  - Claude Opus 5.5 (4.5): It has about 329k downloads per 4 weeks and 3,053 dependent repos, which is more dependent repos than db-migrate. Some of those downloads come through Platformatic rather than direct choice. Its growth ratio of 2.3x is well below the 4.1 median, so it is losing share, while node-pg-migrate (11.6x) and dbmate (15.7x) gain fast.
  - GPT-6.2 Sol (3.6): ecosyste.ms found 3,053 dependent repositories, slightly ahead of db-migrate and well behind Umzug. Four-week downloads rose from 144,291 to 328,828, or 2.28 times, below the 4.1 times baseline and well behind growth at dbmate and node-pg-migrate. The project has 466 GitHub stars and no matched Hacker News stories or Bluesky posts in the bundle. Automated builds, installs through the companion CLI, and partial repository coverage make direct adoption hard to pin down.
- **Vouched for: 4.4** (likely 3.2 to 5.9)
  - Claude Opus 5.5 (4.0): Platformatic DB builds its migrations on Postgrator, which is a real, current production backer. Beyond that I found no surveys, benchmarks, Hacker News stories or Bluesky posts. Independent write-ups are mostly brief comparisons.
  - GPT-6.2 Sol (4.8): Fastify uses Postgrator in its database guide, and cheminfo-sqlite builds on version 8 with its own migration locking. A Kysely community user reports choosing it to keep direct control of SQL, while Nearform's documented use comes from the now-archived Udaru project. Current production case studies and tool-specific satisfaction data are sparse, which keeps the range wide.
- **Safe: 6.6** (likely 5.5 to 7.7)
  - Claude Opus 5.5 (7.0): It has no advisories ever, a single dependency, an MIT licence, and you supply the database driver yourself, so the attack surface is small. The OpenSSF Scorecard is weak at 4.5: it scores 0 on branch protection, security policy, pinned dependencies and SAST, and low on code review. Publishing rests on one person.
  - GPT-6.2 Sol (6.1): Version 8.0.1 uses the permissive MIT license and has one direct runtime dependency, glob. OSV and Snyk list no direct advisories, which leaves little evidence on how quickly the project handles disclosures. The 4.5 OpenSSF Scorecard shows strong workflow token permissions alongside weak code review, unpinned workflow dependencies, and missing branch protection and security policy checks. Snyk lists two maintainers, while release signing and who can publish remain unclear.

## Good

- Migrations are plain numbered SQL files with optional undo files, and it checks md5 checksums of files that already ran.
- One API covers PostgreSQL, MySQL, SQL Server, SQLite and better-sqlite3, and you pass in your own execQuery function.
- It has a single runtime dependency (glob), ships types, and has no known advisories.
- Platformatic DB builds its migrations on it, which keeps it in real production use.

## Bad

- It has one main maintainer and a slow pace: one npm release in the last year, and the TypeScript rewrite (v9) is still unreleased.
- A failed batch is not rolled back as a whole. Earlier migrations stay applied, and on SQL Server the GO separator can leave partial changes.
- The library has no built-in CLI, migration generator, schema builder or locking features. The CLI is a separate, third-party package.
- Downloads are growing more slowly than the median and much more slowly than node-pg-migrate and dbmate.

## The numbers

- Downloads, 4 weeks: 329k
- In a year: ×2.3
- GitHub stars: 466
- Commits, 12 months: 14
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/rickbergfalk/postgrator
- npm: https://www.npmjs.com/package/postgrator

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.
