Here is my function:
up: queryInterface => {
return queryInterface.sequelize.query('SET FOREIGN_KEY_CHECKS = 0')
.then(() => queryInterface.dropTable('my_table'));
},
This query works in the table:
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `my_table`;
The error is
Cannot delete or update a parent row: a foreign key constraint fails