Spring Boot 2.1.0 with Flyway 4.2.0

I had the same problem with PostgreSQL 9.2, and used the following class to solve the problem. Be aware though that all the custom properties you might set in the Spring Boot properties will be ignored, since that replaces the whole Flyway autoconfiguration by your own. So you might have to add some additional code … Read more

Using Flyway to load data conditionally per environment

For future visitors, this is a solution for DB specific sql, but applies to data loading too. https://flywaydb.org/documentation/faq#db-specific-sql You can set the flyway.locations=sql/common,sql/data property, and this can be set to different values with spring profiles(dev/test/prod), omitting the sql/data scripts on production.

Flyway 5.0.7 warning about using schema_version table

The default for flyway.table has been changed from schema_version to flyway_schema_history. And they have also provided automatic fallback to old default with a warning to avoid breaking existing installations using the old default. It means from flyway 5, If you do not specify flyway.table property inside your configuration file, then flyway will look for the … Read more

How to use HikariCP in Spring Boot with two datasources in conjunction with Flyway

Declaring your own DataSource will already have implicity disabled Spring Boot’s auto-configuration of a data source. In other words this won’t be having any effect: @EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class}) I think the problem lies in the fact that you aren’t binding Hikari-specific configuration to your MySQL DataSource. You need to do something like this: @Bean @Primary … Read more

Best way for “database specific” sql scripts with Flyway

You can use the flyway.locations property. In test in would look like this: flyway.locations=sql/common,sql/derby and in prod: flyway.locations=sql/common,sql/oracle You could then have the common statements (V1__Create_table.sql) in common and different copies of the DB-specific statements (V2__Alter_table.sql) in the db-specific locations. An even better solution, in my opinion, is to have the same DB in prod … Read more

Flyway and liquibase together? [closed]

A small correction, before I answer question. The assumption Liquibase seems to have everything Flyway has isn’t correct. Flyway shines when it comes to parsing SQL. You can use unmodified SQL files generated by your native tools containing all kinds of complexity like PL/SQL packages and procedures, MySQL delimiter changes, T-SQL, PostgreSQL procedures, … With … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)