Skip to content
SPECIFICTION
Get listed

node-pg-migrate

salsita.github.io

APISelf-hosted

Spec sheet

Purpose
node-pg-migrate manages database migrations for PostgreSQL from Node.js.Read 11 Oct 2026 · github.com
License
The project is released under the MIT License.Read 4 Oct 2026 · salsita.github.io
Maker
The repository lists Salsita Software among the project's former maintainers.Read 4 Oct 2026 · github.com
Automatic rollback
Reversible operations can infer down migrations when a migration omits a down function.Read 4 Oct 2026 · salsita.github.io
Database requirement
The project documents PostgreSQL 14 or higher as a precondition; lower versions may work but are not officially supported.Read 4 Oct 2026 · salsita.github.io
Database scope
The project says it targets PostgreSQL and has also been tested with CockroachDB.Read 11 Oct 2026 · github.com
Dependency
The getting-started guide says to install the pg library if it is not already present.Read 11 Oct 2026 · salsita.github.io
Deployment safeguards
Pending migrations run in one transaction under an advisory lock, and an order check rejects out-of-sequence migrations.Read 4 Oct 2026 · salsita.github.io
Distribution
The project is released under the MIT License.Read 11 Oct 2026 · github.com
Dry runs
The CLI's up --dry-run prints the SQL without applying it and runs in a read-only transaction.Read 4 Oct 2026 · salsita.github.io
Dry-run safety
Dry runs use a read-only database transaction and apply none of the migration SQL.Read 11 Oct 2026 · salsita.github.io
Execution
Migrations can be run from the command line or through the programmatic runner API.Read 11 Oct 2026 · salsita.github.io
Generated SQL
The tool can print the SQL a real run would execute with the --dry-run option.Read 11 Oct 2026 · salsita.github.io
Installation
The package can be installed with npm, pnpm, yarn, or bun and adds a runnable file to node_modules/.bin.Read 4 Oct 2026 · salsita.github.io
Interfaces
Migrations can be run with CLI commands or through the programmatic runner API.Read 4 Oct 2026 · salsita.github.io
Limit
The project says it only targets PostgreSQL, rather than supporting multiple database systems.Read 11 Oct 2026 · salsita.github.io
Maker background
Salsita says it was founded in Prague in 2010 and lists its headquarters in Prague, Czechia.Read 4 Oct 2026 · salsita.ai
Migration languages
Migrations can be written in JavaScript, TypeScript, or SQL.Read 11 Oct 2026 · salsita.github.io
PostgreSQL coverage
The pgm API includes operations for database objects such as tables, indexes, functions, triggers, policies, roles, and extensions.Read 11 Oct 2026 · salsita.github.io
PostgreSQL operations
The pgm API includes operations for tables, indexes, functions, triggers, policies, roles, extensions, grants, and other PostgreSQL objects.Read 4 Oct 2026 · salsita.github.io
Requirements
The documented prerequisites are Node.js 22.12.0 or higher and PostgreSQL 14 or higher; lower PostgreSQL versions are not officially supported.Read 11 Oct 2026 · salsita.github.io
Rollback
Reversible operations can have their down migrations inferred when a migration omits down.Read 11 Oct 2026 · salsita.github.io
Runtime requirement
The project documents Node.js 22 or higher as a precondition.Read 4 Oct 2026 · salsita.github.io
Support and contributions
The repository welcomes contributors, and the documentation links to troubleshooting guidance.Read 11 Oct 2026 · github.com
Transactions and locking
Pending migrations run in a shared transaction by default, and the runner uses an advisory lock unless locking is disabled.Read 11 Oct 2026 · salsita.github.io

Where Specifiction places it

Alternatives to node-pg-migrateAll alternatives →