mongo-migrate-ts icon indicating copy to clipboard operation
mongo-migrate-ts copied to clipboard

Use relative migration filename

Open jdachtera opened this issue 4 months ago • 1 comments

Hi @mycodeself,

Thank you for creating this library—it's been very helpful.

I noticed that the absolute filename of a migration is currently saved to the database. This setup means a rollback can only be performed from the same machine that executed the migration, or one with a similar directory structure.

Wouldn't it be more flexible to store the path relative to migrationsDir? This change would allow rollbacks from any machine. If you're open to PRs, I’d be happy to contribute one.

Thanks for considering this improvement.

Cheers, @jdachtera

jdachtera avatar Oct 01 '24 15:10 jdachtera