You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by ju...@apache.org on 2020/05/04 06:36:52 UTC

[fineract-cn-postgresql] 21/22: update flyway config

This is an automated email from the ASF dual-hosted git repository.

juhan pushed a commit to branch spring_boot_2
in repository https://gitbox.apache.org/repos/asf/fineract-cn-postgresql.git

commit 894838b2d3c50b6a2128803d30d18f9f41f2dc55
Author: xurror <ka...@outlook.com>
AuthorDate: Sat May 2 16:05:33 2020 +0100

    update flyway config
---
 .../fineract/cn/postgresql/domain/FlywayFactoryBean.java    | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/fineract/cn/postgresql/domain/FlywayFactoryBean.java b/src/main/java/org/apache/fineract/cn/postgresql/domain/FlywayFactoryBean.java
index 144961a..9fdc463 100644
--- a/src/main/java/org/apache/fineract/cn/postgresql/domain/FlywayFactoryBean.java
+++ b/src/main/java/org/apache/fineract/cn/postgresql/domain/FlywayFactoryBean.java
@@ -33,12 +33,13 @@ public class FlywayFactoryBean {
   }
 
   public Flyway create(final DataSource dataSource) {
-    final Flyway flyway = new Flyway();
-    flyway.setDataSource(dataSource);
-    flyway.setLocations("db/migrations/postgresql");
-    flyway.setTable(this.applicationName.getServiceName() + "_schema_version");
-    flyway.setBaselineOnMigrate(true);
-    flyway.setBaselineVersionAsString("0");
+    final Flyway flyway = Flyway.configure()
+        .dataSource(dataSource)
+        .locations("db/migrations/postgresql")
+        .table(this.applicationName.getServiceName() + "_schema_version")
+        .baselineOnMigrate(true)
+        .baselineVersion("0")
+        .load();
     return flyway;
   }
 }