为什么我的 Sequelize 数据库不与 V6 同步?

Why isn't my Sequelize DB syncing with V6?

我正在使用设置 described here,当我尝试:

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

我没有收到任何错误,但实际上并没有在我的数据库中创建表。我可能做错了什么?

让它正确同步 你需要使用

sequelize.sync({alter:true})

请在同步函数中包含 alter 标志为 true