8 lines
223 B
JavaScript
8 lines
223 B
JavaScript
async function wipeDatabase(models) {
|
|
for (let model in models) {
|
|
if (["sequelize", "Sequelize"].indexOf(model) < 0)
|
|
await models[model].destroy({where: {}});
|
|
}
|
|
}
|
|
|
|
module.exports = wipeDatabase;
|