Error: on undo migration command, the migrations does not behave the way it should
Issue Description
So, on running the command npx sequelize-cli db:migrate:undo, the command gives an error(screenshot is attached below)
Also, the record does not get unapplied from sequelize_meta table, so as to reapply it again
What are you doing?
'use strict';
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.changeColumn(
TableName,
'col',
{
type: Sequelize.STRING(150), // Increased from 100
}
)
}
};
What do you expect to happen?
recent migration should have reverted
What is actually happening?
Explained above
Additional context

Environment
- Sequelize version: ^5.8.10
- Node.js version: ^14.4.0
Issue Template Checklist
How does this problem relate to dialects?
- [X] I think this problem happens regardless of the dialect.
- [ ] I think this problem happens only for the following dialect(s):
- [ ] I don't know, I was using PUT-YOUR-DIALECT-HERE, with connector library version XXX and database version XXX
Would you be willing to resolve this issue by submitting a Pull Request?
- [ ] Yes, I have the time and I know how to start.
- [X] Yes, I have the time but I don't know how to start, I would need guidance.
- [ ] No, I don't have the time, although I believe I could do it if I had the time...
- [ ] No, I don't have the time and I wouldn't even know how to start.
Same for me. In my case the command npx sequelize-cli db:migrate:undo:all seems to not run the down migrations in the correct order, which i think should be newest -> oldest
Doesn't happen locally, happens for me via heroku
This issue has been automatically marked as stale because it has been open for 7 days without activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment or remove the "stale" label. 🙂
ping
This issue has been automatically marked as stale because it has been open for 14 days without activity. It will be closed if no further activity occurs within the next 14 days. If this is still an issue, just leave a comment or remove the "stale" label. 🙂
Hi @EinfachHans Do you happen to have a small example project for this error? That would help us out a lot with figuring out what the problem might be.