Does it actually erase all the rows of a table or it just sets the deletedAt flag and does a soft-deletion?
User.destroy({truncate:true})
.then(()=>User.findAll().catch(err=>{throw new Error(err);})
.then(res=>{console.log(res)})).catch(err=>{throw new Error(err);});
Lines above are my example code.
Via Active questions tagged javascript - Stack Overflow https://ift.tt/qAxnIhr
Comments
Post a Comment