Please create the test file JestJS format inside folder specs
npm run test
The knexfile.js
is the setup file for database connection before running any migration commands.
-
Create new migration for a table.
knex migrate:make <action_table_name>
-
Migration all tables in migrations directory:
knex migrate:latest
-
Take down a migration command
knex migrate:down
-
Rollback a migration command
knex migrate:rollback
-
Create data seed for a table
knex seed:make <data_table_name>
-
Run all seeds in migration seeds directory:
knex seed:run
Run the command below and connect your debug client with the url
npm run debug
Knex
andJest
are Javascript libraries but All the sources code insidesrc
folder must beTypescript
.