fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject [fineract-cn-postgresql] 21/22: update flyway config
Date Mon, 04 May 2020 06:36:52 GMT
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 <kaze.nasser@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;
   }
 }


Mime
View raw message