1.0.1 • Published 2 years ago

@learningalbum/knex-migrations-check v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Knex migration check command

This library provide a command to check if knex migrations are pending or not.

how to use

After install it add a new line on your package.json under scripts file:

  ...
  "scripts": {
    "kmc": "kmc ./knexfile"
  },

kmc command require a parameter, the path to your knexfile without it's extension. knexfile needs to follow the standard Knex.Config model. Also required for the command is a migrations folder on main root of the project. Refer to the Knex documentation for more information about migrations.

kmc command will return an exit 1 if migrations are pending and exit 0 if not.