# salsita/node-pg-migrate

Node.js database migration management for PostgreSQL

Repository: https://github.com/salsita/node-pg-migrate
Canonical: https://ross.abutalabs.com/products/node-pg-migrate
Homepage: https://salsita.github.io/node-pg-migrate
Language: TypeScript
License: MIT
License Family: permissive
Topics: database, db, migrate, migration, migrations, migrator, db-migrate, pg, postgre, postgres, postgresql, sql, extensible, expandable, programatic, programable, api, cockroach, cockroachdb
Last push: 2026-08-26T18:09:47+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 81, longevity 100
- inputs: {"age_days": 4556, "days_push": 7, "days_rel": 47, "gap_med": 31.0, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1477, forks 195 (observed 2026-08-28T04:04:50.338917+00:00)

## What it is
node-pg-migrate is a Node.js/TypeScript database migration tool built exclusively for PostgreSQL (also compatible with CockroachDB). It provides both a CLI and a programmatic API for defining up/down schema migrations in JavaScript or TypeScript.

## Use cases
- manage postgresql schema migrations in node.js
- run up and down database migrations from the cli
- write migrations programmatically in typescript
- migrate cockroachdb schemas
- version control database schema changes
- create tables and alter schemas without raw sql

## When to choose
- your stack is Node.js/TypeScript with PostgreSQL or CockroachDB
- you want a programmatic migration API instead of raw SQL files
- you need CLI support for creating and running up/down migrations

## When to avoid
- you use MySQL, SQLite, or other non-PostgreSQL databases
- you need a language-agnostic migration tool usable outside Node.js
- you run an unsupported old PostgreSQL version (below 14)

## Facets
- artifact type: library
- maturity: active
- function: database, cli, developer-tools
- domain: databases, developer-tools, backend
- platform: cli, cross-platform
- tags: postgresql, database-migrations, schema-migration, cockroachdb, typescript, sql, nodejs

## Member repositories
- salsita/node-pg-migrate (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:50.338917+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:34:25.383135+00:00, confidence not recorded.
  - readme: https://github.com/salsita/node-pg-migrate (fetched 2026-08-28T04:04:50.338917+00:00, sha 780a8db552d1)
  - homepage: https://salsita.github.io/node-pg-migrate (fetched 2026-08-29T11:41:54.039987+00:00, sha 1e934165252b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
