node-pg-migrate-custom

JSON →
library 5.6.0-patch.6 ·javascript
verified Jun 7, 2026

A PostgreSQL-specific database migration tool for Node.js, built as a fork of the original node-pg-migrate with two extensions: prioritization of DATABASE_URL environment variable over JSON config, and a flag to skip tracking applied migrations (useful for migrating stored functions). Current stable version is 5.6.0-patch.6, released as a patch fork. The library provides a programmatic API and CLI to create and run migrations using a fluent builder pattern for SQL operations, automatically inferring down migrations. It supports ES modules and TypeScript types, and requires the pg peer dependency (>=4.3.0 <9.0.0). Unlike generic migration tools, it is built exclusively for PostgreSQL, offering full-featured PostgreSQL-specific operations without sacrificing simplicity.