pg-mig

0.0.8 • Public • Published

pg-mig

A dead simple tool to manage PostgreSQL database migrations

This is a very simple tool to manage database migrations. No code required, just install it through npm and use the commands belov to get started.

If you are looking for a way to generate SQL from code, then keep looking, this is just a simple command to manage migrations you write yourself.

Commands

pg-mig init - run this to get everything set up in your project. You also need to configure your database configuration before you do anything. See the Configration section of this document.

pg-mig add - run this to add a new migration. It will be placed in the "migrations" folder.

pg-mig test - run this to test your migiration; it will create a new schema in your database, run the migrations, and then delete it.

pg-mig migrate - run this to apply the migrations to your database

Configuration

You need to set a database connection string like this one postgres://username:password@host:5432/database either in the .dbconfig file or a enviornment variable called DBCONFIG.

Readme

Keywords

none

Package Sidebar

Install

npm i pg-mig

Weekly Downloads

1

Version

0.0.8

License

MIT

Last publish

Collaborators

  • ehjertnes