Skip to content

Auto-configure SpringLiquibase with any liquibase.integration.spring.Customizer bean #38055

Closed as not planned
@fbutter

Description

@fbutter

I would like to add lifecycle logging before, after, as well as on failed migrations.

To implement this, I planned to register a liquibase.changelog.visitor.ChangeExecListener on the Liquibase instance.

I found that the SpringLiquibase initialization bean fully encapsulates the migration.

So, to register an ChangeExecListener in the Liquibase instance, I only see the option to:

  1. Inherit SpringLiquibase and override createLiquibase.
  2. Copy the LiquibaseAutoConfiguration into our codebase and return the inherited SpringLiquibase in LiquibaseAutoConfiguration.LiquibaseConfiguration#createSpringLiquibase.

Versions used:

  • Spring Boot: 3.1.4
  • Liquibase: 4.22.0

Do you know of any other way to register custom logic, such as logging before, after, and on failed migrations?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions