forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better handle the UnconfiguredDataSource case
I wasn't exactly aware of this new development and it needs to be handled a bit differently.
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...untime/src/main/java/io/quarkus/flyway/runtime/UnconfiguredDataSourceFlywayContainer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.quarkus.flyway.runtime; | ||
|
||
import org.flywaydb.core.Flyway; | ||
|
||
public class UnconfiguredDataSourceFlywayContainer extends FlywayContainer { | ||
|
||
public UnconfiguredDataSourceFlywayContainer(String dataSourceName) { | ||
super(null, false, false, false, false, false, dataSourceName, false, false); | ||
} | ||
|
||
@Override | ||
public Flyway getFlyway() { | ||
throw new UnsupportedOperationException( | ||
"Cannot get a Flyway instance for unconfigured datasource " + getDataSourceName()); | ||
} | ||
} |