umzug
umzug copied to clipboard
False positive Confusing Ordering warning
Hello. I'm trying to setup Umzug with a migrations file structure like this:
migrations/
0001_somename/
migration.sql
0002_somename/
migration.sql
I assume I should have no issues with the ordering based on this description:
https://github.com/sequelize/umzug/blob/91d6a4b197747d4d19c45811a597fbefc9e39851/README.md?plain=1#L394-L396
But I have an issue with the .create()
method. It produces a "confusing ordering" error. And I think there's a bug because the following code basically compares "migration.sql"
to a new name, rather than comparing full paths of migrations:
https://github.com/sequelize/umzug/blob/91d6a4b197747d4d19c45811a597fbefc9e39851/src/umzug.ts#L358
the full umzug version you're using (e.g. v2.3.0 (latest stable), or v3.x (beta version)
umzug v3.2.1
which storage you're using - e.g. SequelizeStorage, JsonStorage, a custom one, etc.
A custom storage
relevant surrounding information like sequelize version if applicable
n/a
node version, if it might be relevant
v16.16.0
dev setup. Are you using typescript? Vanilla commonjs?
TypeScript
repro steps with as much detail as possible
Please let me know if you need this, but I hope it should be clear from the description
Thanks for the detailed issue. Honestly I don't remember why the check only compares basenames rather than full paths. Would you like to open a PR just comparing the two paths directly?
Released in v3.3.0.