adding charges table and starting the endpoint for charging for a grant

This commit is contained in:
Arjun Patel
2019-01-29 10:32:21 -08:00
parent 6ca8807a9b
commit e3b7a1699e
13 changed files with 148 additions and 9 deletions
+17
View File
@@ -0,0 +1,17 @@
const db = require('../app/config/db.config.js');
//verify connection to db
db.sequelize
.authenticate()
.then(() => {
console.log('Connection has been established successfully.');
})
.catch(err => {
console.error('Unable to connect to the database:', err);
});
//force: true will drop the table if it already exists
const drop_tables = true;
db.sequelize.sync({ force: drop_tables }).then(() => {
console.log(`Drop and Resync with { force: ${drop_tables} }`);
});