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

mongodb- migrate command not finding the new migrations #51

Open
7899manjunath opened this issue Dec 13, 2023 · 2 comments
Open

mongodb- migrate command not finding the new migrations #51

7899manjunath opened this issue Dec 13, 2023 · 2 comments

Comments

@7899manjunath
Copy link

I have created coupe of migration files using mongodb-migrate-create command. When I run the mongodb- migrate command, it is not finding the latest migration files.

image
migration

@npechenezhskiy
Copy link

Seems to be a bug.

Migration Manager does not collect migrations with filenames that don't match a certain regexp, you'd need to remove digit characters from there.

source

@darth30joker
Copy link
Contributor

darth30joker commented Dec 24, 2023

@npechenezhskiy Thank you for your help!

@7899manjunath Nikolay is correct, the regex does not recogenize any number within description. Normally, the pattern is yyyyMMddhhmmss_description(no number).py. Maybe we can make description more flexible to allow letters and numbers.

Can you change the regex to ^(\d+)_[_a-z0-9]*\.py$ in here

result = re.match('^(\d+)[_a-z]*\.py$', file)
? This should relax the regax a bit. Let me know if this works for you and I can change regex later.

Thank you!

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

3 participants