Skip to content

jonstuebe/knex-preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A small cli tool to output sql from knex migrations

Resources

License

Stars

Watchers

Forks

Packages

No packages published