docs adding

This commit is contained in:
Arjun Patel
2019-03-15 23:31:02 -07:00
parent 49427ee8f7
commit f99b8fce30
2 changed files with 6 additions and 5 deletions
@@ -77,7 +77,6 @@ exports.create = (req, res, next) => {
}); });
}) })
.catch(function(error) { .catch(function(error) {
console.log(error);
// transaction rollback // transaction rollback
next(error); next(error);
}); });
+6 -4
View File
@@ -4,15 +4,17 @@ Insert seed data:
- basic causes - basic causes
- basic regions - basic regions
- 1 charity bundle - 1 charity bundle
`npx sequelize db:seed:all` `npx sequelize db:seed:all`
Revert seed data insert: Revert seed data insert:
`npx sequelize db:seed:undo:all` `npx sequelize db:seed:undo:all`
Drop all tables: 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` 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