From f99b8fce302384c8cf54c83e10acf8fd58cf36a0 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Fri, 15 Mar 2019 23:31:02 -0700 Subject: [PATCH] docs adding --- app/controllers/donor/grant.controller.js | 1 - docs/migrations | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/controllers/donor/grant.controller.js b/app/controllers/donor/grant.controller.js index 164b509..62a91a0 100644 --- a/app/controllers/donor/grant.controller.js +++ b/app/controllers/donor/grant.controller.js @@ -77,7 +77,6 @@ exports.create = (req, res, next) => { }); }) .catch(function(error) { - console.log(error); // transaction rollback next(error); }); diff --git a/docs/migrations b/docs/migrations index e921fd8..cca60cd 100644 --- a/docs/migrations +++ b/docs/migrations @@ -4,15 +4,17 @@ Insert seed data: - basic causes - basic regions - 1 charity bundle - `npx sequelize db:seed:all` Revert seed data insert: - `npx sequelize db:seed:undo:all` - Drop all tables: +`npm run drop:local:{operating_system}` where `operating_system` is `mac` or `windows` -`npm run drop:local:{operating_system}` where `operating_system` is `mac` or `windows` \ No newline at end of file +Heroku Production database dropping, migrations, and seeding: +- Change the `production` property in migrations.config.js with heroku production database config +- `heroku apps` to login to env +- `heroku run DROP_TABLES=true node server.js --app ucharify-api` to drop the tables +- in local cmd or terminal run `Set NODE_ENV=production& npx sequelize db:seed:all` for seeding production db