I have been using this tool as a library to run automated migrations and one thing that would be useful would be to allow specifying a custom sorting function that would flow to the node-migrate library see here. This would be difficult to expose via the CLI, but it would be a non-breaking change if it is left unspecified as it is now.
What happens right now is since the default sort is a lexical sort on file name, when using, what I think are, more readable names like 1-migration.js, 2-migration.js, etc. once you hit 10-, the run order is (un)expected if you cross a digit boundary during a run.
I'd be happy to submit a PR showing my idea - it's pretty simple and would not change the tool as it is now and only take effect in more advanced use cases such as my own.
I have been using this tool as a library to run automated migrations and one thing that would be useful would be to allow specifying a custom sorting function that would flow to the node-migrate library see here. This would be difficult to expose via the CLI, but it would be a non-breaking change if it is left unspecified as it is now.
What happens right now is since the default sort is a lexical sort on file name, when using, what I think are, more readable names like 1-migration.js, 2-migration.js, etc. once you hit 10-, the run order is (un)expected if you cross a digit boundary during a run.
I'd be happy to submit a PR showing my idea - it's pretty simple and would not change the tool as it is now and only take effect in more advanced use cases such as my own.