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

LiquibaseModule closes given DB connection #81

Open
cbxp opened this issue Sep 24, 2024 · 0 comments
Open

LiquibaseModule closes given DB connection #81

cbxp opened this issue Sep 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cbxp
Copy link
Collaborator

cbxp commented Sep 24, 2024

Case:

I pass LiquibaseModule my own DB connection.
I want to continue using it after LiquibaseModule.

Expected result:

LiquibaseModule uses my connection and leaves it open.

Actual result:

LiquibaseModule uses my connection and closes it.

Sample code:

  myFactory.openConnection().use { myConnection ->
    LiquibaseModule("schema.xml").migrate(listOf("my-db-context"), myConnection)

    log.info("Prepared DB: ${myConnection.url}") // <--  Fails because myConnection is closed
  }
@cbxp cbxp added the bug Something isn't working label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant