Skip to content

[BUG] - Database validation error with liquibase #1006

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
kors2m opened this issue Apr 26, 2025 · 3 comments
Open

[BUG] - Database validation error with liquibase #1006

kors2m opened this issue Apr 26, 2025 · 3 comments
Labels
bug Something isn't working pending Postpone plans because of more important tasks

Comments

@kors2m
Copy link

kors2m commented Apr 26, 2025

Jimmer Version

0.9.77

JDK Version

21

Database

Postgres

OS

Linux

Expected behavior

Database validation after liquibase migrations

Actual behavior

Database validation occurs before liquibase migrations

Description

After updating Jimmer from 0.9.74 to 0.9.77, have a problem with liquibase migrations.

Reproduction steps

https://github.com/kors2m/jimmer-issue

Generated SQL

No response

Relation Model

No response

Screenshots

No response

Logs

jimmer.log

@kors2m kors2m added the bug Something isn't working label Apr 26, 2025
@babyfish-ct
Copy link
Owner

The behavior changed is required by another user uses liquibase.

Now, if database if createed by liquibase, please use manual validation API to control the validation time by your self

  • Keep the database validation to be NONE(validation will not be validated automatically)
  • Call sqlClient.validateDatabase() to validate database manually when you think your liquibase intialization is one

@kors2m
Copy link
Author

kors2m commented Apr 26, 2025

I think most projects have a fairly simple process of initializing the database via liquibase/flyway, and it turns out that automatic validation does not support this anymore.
And you need to add a separate configuration for validating the database to the application and to integration tests.

I would like it to be out of the box or through the Jimmer settings.

@babyfish-ct
Copy link
Owner

Previously, Jimmer solved this problem by lazily initializing SqlClient in Spring. However, users who adopted the multi-data source mode reported that this mode caused problems in their reference scenarios.

There are too many user scenarios, and now I can't quicly find a way to have the best of both worlds. It may take some more time. However, at least there is a work around now, and you can continue your work.

@babyfish-ct babyfish-ct added the pending Postpone plans because of more important tasks label May 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending Postpone plans because of more important tasks
Projects
None yet
Development

No branches or pull requests

2 participants