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

refactor database schema upgrade to support skipping versions #1343

Merged
merged 1 commit into from
May 26, 2024

Conversation

elrido
Copy link
Contributor

@elrido elrido commented May 25, 2024

This PR addresses a discussion in #1334.

Changes

  • allow skipping versions for automatic database upgrades, by using version_compare smaller-or-equal checks to match all versions up to the comparison point.

Other considerations

  • arguably, if-conditions are more readable and/or less error prone to switch-case-statements
  • while the version checks are a little less performant, this should not cause much impact as the function only gets called if the current database version is below the current installed applications, so only once after each upgrade - this is not in a hot loop

@elrido elrido merged commit f313578 into master May 26, 2024
16 of 18 checks passed
@elrido elrido deleted the db-version-upgrade branch May 26, 2024 06:40
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

Successfully merging this pull request may close these issues.

None yet

2 participants