šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

umzug-cli

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

umzug-cli

A cli factory for umzug, a migration library

3.1.1
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
Ā 
Created
Source

umzug-cli

A cli factory for umzug, a migration library.
Umzug now has a built-in library. So the use of this module is discouraged.

Usage

  • Create a executable migrate.js
#!/usr/bin/env node
const KnexUmzug = require('knex-umzug')

require('umzug-cli')({
  storage: new KnexUmzug({
    connection: knex({})
  }),
  migrations: {
    glob: './migrations/*.js'
  }
}).cli(process.argv.slice(2))
  • Execute migrate.js
$ ./migrate.js

Use: umzug-cli [command]

Where [command] is one of:
  up                     migrates everything up
  down                   migrates 1 migration down
  up [file-to-migrate]   migrates a specific file up
  down [file-to-migrate] migrates a specific file down
  pending                shows all pending migrations
  history                shows the migration history

Why doesn't this library offer an executable?

Because most likely each implementation has a custom config structure. This library directly uses umzug, which you can configure like documented https://www.npmjs.com/package/umzug#configuration

Keywords

umzug

FAQs

Package last updated on 21 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts