Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional validation of filenames and option to run only migrations before a certain date string #371

Open
nholmes3 opened this issue Jun 7, 2021 · 0 comments

Comments

@nholmes3
Copy link

nholmes3 commented Jun 7, 2021

Is it possible to add an option to validate that the migration files being run are, in fact, prefixed by a date string? The idea behind this is to make sure that migrations do not accidentally run out of order if a developer creates a migration file that is not prefixed by a date string. Current behavior will run any migration files regardless of their name

This validation would also assist with a feature that allows for migrations before a specific date to be run. Something along the lines of migrate-mongo up --before {date} --validate

--validate would throw an error if there are migration files that do not contain a date string prefix
--before {date} will run only migrations that precede the date specified

Let me know if this is something you'd consider adding, and I would be happy to assist in creating the pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant