Skip to content

fix!: Versioning via Version class instead of BigDecimals #2520

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

obabichevjb
Copy link
Collaborator

Description

Replace usage of BigDecimal with a new class Version for database versioning. The current problem is that we store only major/minor versions inside BigDecimal number, but ignore patch version.

PR introduces a new class Version that stores major, minor and patch versions, and allows to check if one version covers another one.


Type of Change

Please mark the relevant options with an "X":

  • Bug fix

Updates/remove existing public API methods:

  • Is breaking change

@obabichevjb obabichevjb self-assigned this Jun 16, 2025
@obabichevjb obabichevjb force-pushed the obabichev/r2dbc/update-versioning branch 3 times, most recently from 50d0e74 to 71bd5fd Compare June 16, 2025 09:17
@obabichevjb obabichevjb changed the title !fix: Versioning via Version class instead of BigDecimals fix!: Versioning via Version class instead of BigDecimals Jun 16, 2025
@obabichevjb obabichevjb requested review from bog-walk and e5l June 16, 2025 10:59

import java.math.BigDecimal

data class Version(val major: Int, val minor: Int, val patch: Int) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider removing the data modifier, and we need to think about extensibility in the minor releases. Could you also check if the constructor should be public?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can make it itnernal, but in these case I won't be able to have tests for it in exposed-tests module. Or I can make it @InternalApi, I will stop on this variant for now.

@obabichevjb obabichevjb force-pushed the obabichev/r2dbc/update-versioning branch 2 times, most recently from f7b1f78 to 3a30d9d Compare June 18, 2025 12:24
@obabichevjb obabichevjb force-pushed the obabichev/r2dbc/update-versioning branch from 3a30d9d to b4d086f Compare June 18, 2025 12:37
@obabichevjb obabichevjb requested a review from e5l June 18, 2025 13:33
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.

2 participants