Skip to content

Commit

Permalink
Update FlywayFactory to support custom schema (#2055)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Collado <collado.mike@gmail.com>

Co-authored-by: Willy Lulciuc <willy@datakin.com>
  • Loading branch information
collado-mike and wslulciuc authored Aug 9, 2022
1 parent 005b418 commit 1330831
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 1330831

Please sign in to comment.