【发布时间】:2021-08-03 16:39:34
【问题描述】:
我在我的项目中使用 Sequelize。在第三次迁移中,我创建了表 Comments,其中包含名为 type 的字段。经过一些迁移后,我有一个删除该字段的迁移。但是,当我做migrate:all,sequelize 尝试在创建表之前删除列:
await queryInterface.removeColumn('Comments', 'type');
有时没有发生错误。但我经常得到:
ERROR: Can't DROP 'type'; check that column/key exists
如何解决这个问题?
【问题讨论】:
标签: node.js sequelize.js