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.
npm i --save-dev knex-preview
or
yarn add --dev knex-preview
npx knex-preview
note: after running, start typing to get autocomplete results of your migration names!
See knex-preview --help
for more details.