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

fix: strip dev from version when semver comparing for migrations #872

Closed

Conversation

iFergal
Copy link
Contributor

@iFergal iFergal commented Oct 8, 2024

This is to address #820 - creating the PR as I'm hitting this issue and now cannot upgrade versions without wiping the DBs.

Also, rc can be in the version too. I haven't covered that in this PR though because then dev1 and rc1 are the same version. Perhaps we can ignore it and just test rc versions in release environments? Open to suggestions!

@kentbull
Copy link
Contributor

kentbull commented Oct 9, 2024

I addressed this in a different way my migration PRs here for v1.2.0rc3 and here for v1.1.19 .

Thanks for catching the second version check, I only had the first. My migrations PR is updated to include both.

@kentbull kentbull added bug Something isn't working duplicate This issue or pull request already exists labels Oct 9, 2024
@kentbull kentbull self-assigned this Oct 9, 2024
@iFergal
Copy link
Contributor Author

iFergal commented Oct 9, 2024

Nice @kentbull that looks like a better approach!

I wonder if we should capture the dev or rc using it too. On the other hand, if there's a migration within the same patch version at the dev or rc level, maybe this means the minor or patch should be being bumped!

@kentbull
Copy link
Contributor

kentbull commented Oct 9, 2024

if there's a migration within the same patch version at the dev or rc level, maybe this means the minor or patch should be being bumped!

That makes sense to me. Anything significant enough to require a database migration qualifies for a patch bump.

@iFergal
Copy link
Contributor Author

iFergal commented Oct 9, 2024

Cool - I prefer your approach to my quick hack, so I'm going to close this

@iFergal iFergal closed this Oct 9, 2024
@iFergal iFergal deleted the fix/semverDevVersions branch October 9, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants