From 1379bb33b13cf5f2a389ccbe510f8b7e5f549b8e Mon Sep 17 00:00:00 2001 From: Michael Collado Date: Mon, 1 Aug 2022 21:59:58 -0700 Subject: [PATCH] Update FlywayFactory to support custom schema Signed-off-by: Michael Collado --- api/src/main/java/marquez/db/FlywayFactory.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/src/main/java/marquez/db/FlywayFactory.java b/api/src/main/java/marquez/db/FlywayFactory.java index b7b48a0f1d..16bcce6336 100644 --- a/api/src/main/java/marquez/db/FlywayFactory.java +++ b/api/src/main/java/marquez/db/FlywayFactory.java @@ -74,6 +74,8 @@ public final class FlywayFactory { @Getter @Setter private String repeatableSqlMigrationPrefix = DEFAULT_REPEATABLE_SQL_MIGRATION_PREFIX; + @Getter @Setter private String schema; + public Flyway build(@NonNull DataSource source) { return Flyway.configure() .dataSource(source) @@ -102,6 +104,7 @@ public Flyway build(@NonNull DataSource source) { .placeholderSuffix(placeholderSuffix) .sqlMigrationPrefix(sqlMigrationPrefix) .repeatableSqlMigrationPrefix(repeatableSqlMigrationPrefix) + .defaultSchema(schema) .load(); } }