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?
1 Answer
You have two options:
- Write your Java code so it behaves differently based on the database detected through the connection metadata
- Configure Flyway to use different locations based on the current environment
2 Comments
SudhirR
Thanks for your response. Please point me to how to do option 2.
Axel Fontaine
The FAQ has the answer: flywaydb.org/documentation/faq.html#db-specific-sql