Skip to content

Schema Migration with Flyway #4554

@singhbaljit

Description

@singhbaljit

I understand that spring.batch.jdbc.initialize-schema provides the ability for Spring Batch to manage DB schema. However, my project already uses Flyway. Spring Boot recommends disabling other migrations when using Flyway (or Liquidbase). I do see that the spring.batch.jdbc.schema refers to the migration scripts in core. However, these files are very old (2+ years). I also see some newer files in the migration directory. I've a few questions/requests:

  1. What is the best way to migrate schema when using a higher-level migration tool like Flyway? It appears the either documentation or implementation is conflicting.
  2. If the answer is that Flyway should be manage, then what is the single source of truth for the schema that I can use in my Flyway migration script? Can this be maintained and released alongside releases so people can migrate DBs with newer versions of Batch?

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: waiting-for-reporterIssues for which we are waiting for feedback from the reporter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions