Node.js database migration management built exclusively for postgres. (But can also be used for other DBs conforming to SQL standard - e.g. CockroachDB.) Started by Theo Ephraim, now maintained by Salsita Software. Installing this module adds a runnable file into your node_modules/.bin directory. If installed globally (with the -g option), you can run node-pg-migrate and if not, you can run ./node_modules/.bin/node-pg-migrate. Add "migrate": "node-pg-migrate" to scripts section of package.json so you are able to quickly run commands. Run npm run migrate create my first migration. It will create file xxx_my-first-migration.js in migrations folder. Now you should put your DB connection string to DATABASE_URL environment variable and run npm run migrate up. (e.g. DATABASE_URL=postgres://test:test@localhost:5432/test npm run migrate up).

Features

  • Everything is async in node
  • Licensed under the MIT License (MIT)
  • Save migration files
  • Built exclusively for postgres
  • Quickly run command
  • Full docs are available

Project Samples

Project Activity

See All Activity >

Categories

Database

License

MIT License

Follow node-pg-migrate

node-pg-migrate Web Site

You Might Also Like
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of node-pg-migrate!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript Database Software

Registered

2022-07-27