At time stamp 46.37 what is the mean of line 7 db.sync({force:true}) to loine 16

at time stamp 46.37 what is the mean of line 7 db.sync({force:true}) to loine 16

@Aditya-Kushwaha-914550392281281 db.sync syncs your database created in your machine with the one defined by you in code. here force: true is a flag, what it does is that, it tells the sequelize package to sync the db forcefully (if you change relationship b/w tables and your new db structure doesn’t match with your old one db.sync alone will not be able to sync your db to new version), so we tell sequelize to first drop the whole database and creating a new one.

at ime stamp 01.28.17 we are using user here but in our database the model name is users why its working here

@Aditya-Kushwaha-914550392281281 that’s just how sequelize works, it adds the s part automatically to the table name.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.