.then(function(){
if (!process.env.BACKUP) {
console.log('no backup file');
generateDefinitions()
.then(function(){
console.log("Dropped and created the tables.");
resolve();
})
.catch(function(err){
console.error("Couldn't write the schema", err);
});
}
else {
generateDefinitions()
.then(function(){
console.log('definitions generated');
resolve();
})
.catch(function(err){
console.error("Couldn't write the schema", err);
});
}
})
Currently, the code looks exactly the same: