mongo-migrate-ts
mongo-migrate-ts copied to clipboard
Use relative migration filename
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