@astrocoders/migrathor
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Usage

Create a migrathorconfig.js file in the root directory of your project. For example:

require('dotenv').config()

module.exports = {
  host: process.env.PG_HOST,
  port: Number(process.env.PG_PORT),
  user: process.env.PG_USER,
  database: process.env.PG_DATABASE,
  password: process.env.PG_PASSWORD,
  databaseConfigFolder: 'pgSql',
}

So you can use yarn migrathor <cmd>

Commands

migration - create a new migration file in ${databaseConfigFolder}/migrations

migrate - run the latest migration

rollback - undoes the last migration

Readme

Keywords

none

Package Sidebar

Install

npm i @astrocoders/migrathor

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

14.8 kB

Total Files

10

Last publish

Collaborators

  • luizmoratelli
  • yurijean
  • lucasbesen
  • eliabejr
  • medson10
  • gabrielrubens
  • georgelima
  • guilhermedecampo