tm-apps-db
Advanced tools
Comparing version 3.2.19-pubs2 to 3.2.19-pubs3
@@ -8,2 +8,3 @@ module.exports = { | ||
} else { | ||
console.log(`NOT SWALLOWED ERROR: ${e}`); | ||
throw e; | ||
@@ -10,0 +11,0 @@ } |
@@ -32,4 +32,11 @@ "use strict"; | ||
underscored: true, | ||
hooks: { | ||
// executed "before" `Model.sync(...)` | ||
beforeSync: function (options) { | ||
// this = Model | ||
console.log('beforeSync of pub model'); | ||
} | ||
} | ||
}); | ||
return pub; | ||
}; |
{ | ||
"name": "tm-apps-db", | ||
"version": "3.2.19-pubs2", | ||
"version": "3.2.19-pubs3", | ||
"description": "Apps consumer database initialiser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -12,3 +12,5 @@ const config = require('config'); | ||
const options = { | ||
force: program.force | ||
force: program.force, | ||
logging: console.log, | ||
hooks: true | ||
}; | ||
@@ -18,4 +20,8 @@ console.log('Synchronising database %s', program.force ? 'with force' : ''); | ||
console.log('Completed successfully.'); | ||
//Must close the connection manually | ||
db.sequelize.close(); | ||
}) | ||
.catch(err => { | ||
console.log(`Error while db sync: ${err}`); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
779210
75
1541