mycodeself / mongo-migrate-ts

Run mongodb migrations easy from TypeScript
MIT License
87 stars 28 forks source link

Add nested migration directories support #82

Open AzzedineOuali opened 1 year ago

AzzedineOuali commented 1 year ago

Hello,

Is it possible to add support for nested directories ?

Let's say i have many directories ordered by version : --- migrations / ---------------V1.1/ ---------------------V1.1.001_add_user.ts ---------------V1.2/ ---------------------V1.2.001_update_user.ts

up command does not find migration files for /migrations path.

Thanks a lot for the package, works like a charm :)

Regards

mycodeself commented 1 year ago

Hello @AzzedineOuali

Thank you for your suggestion, I agree including this functionality, but I think the right thing to do would be to add a --recursive flag, what do you think?

gustawdaniel commented 1 year ago

What should be the order of these migrations? For example, if we have names

a
  1
  4
b
  2
  3

then they should be called in order 1 4 2 3?