Why isn't my Sequelize DB syncing with V6?

Viewed 56

I am using the setup described here and when I try to:

const sequelize = require('./db').getConnection()
....
await sequelize.sync()
    console.log("sync done")

I get no error, but it doesn't actually create the tables in my DB. What could I be doing wrong?

1 Answers

for it to sync properly you need to use

sequelize.sync({alter:true})

please include the alter flag as true in sync function

Related