From e24f5e43cfca0f0ec2a1b721e2717019592b9a81 Mon Sep 17 00:00:00 2001 From: John Datserakis Date: Wed, 13 Sep 2017 00:00:53 -0400 Subject: [PATCH] adjusted knex migration settings --- knexfile.js | 4 ++++ readme.md | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/knexfile.js b/knexfile.js index 8b7acdf..ade1164 100644 --- a/knexfile.js +++ b/knexfile.js @@ -1,3 +1,7 @@ +//I only want migrations, rollbacks, and seeds to run when the NODE_ENV is specified +//in the knex seed/migrate command. Knex will error out if it is not specified. +if (!process.env.NODE_ENV) { throw new Error('NODE_ENV not set') } + require('dotenv').config(); module.exports = { diff --git a/readme.md b/readme.md index 475e928..42827a0 100644 --- a/readme.md +++ b/readme.md @@ -78,7 +78,6 @@ knex migrate:make create_users_table # make seed knex seed:make seed_users - ``` ## General Information