Skip to content

Commit

Permalink
Update FlywayFactory to support custom schema
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Collado <collado.mike@gmail.com>
  • Loading branch information
collado-mike committed Aug 8, 2022
1 parent 90feb2e commit 1379bb3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/src/main/java/marquez/db/FlywayFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -102,6 +104,7 @@ public Flyway build(@NonNull DataSource source) {
.placeholderSuffix(placeholderSuffix)
.sqlMigrationPrefix(sqlMigrationPrefix)
.repeatableSqlMigrationPrefix(repeatableSqlMigrationPrefix)
.defaultSchema(schema)
.load();
}
}

0 comments on commit 1379bb3

Please sign in to comment.