@lcdev/knex-cli
v0.2.5
Published
Base yargs CLI for running migrations, seeds, etc
Downloads
1
Keywords
Readme
Knex CLI
Small wrapper around the common code we use in monorepos to do daily database chors.
# replace VERSION below with the most recent major version above (eg. 0.5.1 -> 0.5, 1.2.3 -> 1)
yarn add @lcdev/knex-cli@VERSION
In your CLI module:
import { join, dirname } from 'path';
import config from '@lcdev/app-config';
import { runCLI } from '@lcdev/knex-cli';
import { connect, runSeeds } from 'my-models';
runCLI({
connect,
runSeeds,
config: config.database,
migrationsFolder: 'my/migrations',
});