knex-preview
v0.2.6
Published
A small cli tool to output sql from knex migrations
Downloads
62
Readme
Knex Preview
Small CLI utility that converts the knex query/schema builder method calls in migrations to standard sql. Has an interactive CLI that allows you to select which migration, specific the up or down migration, and whether or not to add a savepoint to the output. Transactions are added based on the knex settings inside of that project.
Install
npm i --save-dev knex-preview
or
yarn add --dev knex-preview
Usage
npx knex-preview
note: after running, start typing to get autocomplete results of your migration names!
Help
See knex-preview --help
for more details.