All apps/Knex.js

Knex.js

knex

SQL query builder CLI for migrations and seeds.

Runs as knex|macOS, Linux, Windows|knexjs.org

Autocomplete

Fig spec, with what the manifest adds · 12 subcommands · 14 options
Published once and never changed; check the digest before caching
sha256
e0a89f47c81a0da12926b1199b0cceda4d1d3f060151054aded52bcc81f4c687
Size
4110 bytes
Subcommands12 subcommands
knex init
Create a fresh knexfile
knex migrate:make
Create a named migration file
knex migrate:latest
Run all migrations that have not yet been run
knex migrate:up
Run the next or the specified migration that has not yet been run
knex migrate:rollback
Rollback the last batch of migrations performed
knex migrate:down
Undo the last or the specified migration that was already run
knex migrate:currentVersion
View the current version for the migration
knex migrate:list|migrate:status
List all migrations files with status
knex migrate:unlock
Forcibly unlocks the migrations lock table
knex seed:make
Create a named seed file
knex seed:run
Run seed files
knex help
Display help for command
OptionsOn knex itself
--version
Output the version number <value>
--debug
Run with debugging <value>
--knexfile
Specify the knexfile path <value>
--knexpath
Specify the path to knex instance <value>
--cwd
Specify the working directory <value>
--client
Set DB client without a knexfile <value>
--connection
Set DB connection without a knexfile <value>
--migrations-directory
Set migrations directory without a knexfile <value>
--migrations-table-name
Set migrations table name without a knexfile <value>
--env
Environment, default: process.env.NODE_ENV || development <environment>
--esm
Enable ESM interop <value>
--specific
Specify one seed file to execute <value>
--timestamp-filename-prefix
Enable a timestamp prefix on name of generated seed files <value>
--help
Display help for command <value>