SudhirR
SudhirR

Reputation: 13

flyway-db database specific migration using java class

We are having some upgrade migration that needs to be executed via a java class, some of the alter commands are database specific and we need to support both MSSQL and Oracle. Can we have database type specific java upgrade classes being loaded and executed?

Upvotes: 0

Views: 168

Answers (1)

Axel Fontaine
Axel Fontaine

Reputation: 35169

You have two options:

  1. Write your Java code so it behaves differently based on the database detected through the connection metadata
  2. Configure Flyway to use different locations based on the current environment

Upvotes: 1

Related Questions