Gulp Knex
Sets up some basic Gulp tasks for Knex migrations.
NOTE: Generated Models use Gimmea to generate their UUID keys.
Usage
In your Gulp file:
const Gulp = ;const Knex = ...blah... ; Gulp Knex;
const Gulp = ;const Knex = ...blah... ; Gulp Knex migrations: './migrations' // Defaults to APP_ROOT + '/migrations' models: './models' // Defaults to APP_ROOT + '/app/server/models' schemaTable: 'schema_migrations' // Defaults to 'schema_migrations';
NOTE: models
can also be false
if you don't want/need model files to be generated.
Testing
- Create a Postgres database called
gulp_knex_test
. - Run
npm test
.