Open KeiichiHirobe opened 2 years ago
@KeiichiHirobe hey yes that's a good suggestion, feel free to submit a PR!
@rubenv Thanks for the quick reply! I'll send PR in 1-2 weeks.
@rubenv Thank you for waiting, I have just submitted PR. Please review https://github.com/rubenv/sql-migrate/pull/204.
This is not a bug report, but a feature request. Current implementation always parse all of sql files, so may require a lot of time and memory if there are too many files or too big files in directory. But, in most of cases, we only need to parse 1~3 files because sort
byId
does not need content of files, it needs only the name of files. So, I think it is better to parse sql files only when we need content of files.It seems to me that the best way to achieve this would be as follows
If it's okay, I can send PR.