-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46080 from gsmet/configmapping-liquibase
Liquibase - Switch to @ConfigMapping
- Loading branch information
Showing
20 changed files
with
142 additions
and
457 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
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
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
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
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
49 changes: 21 additions & 28 deletions
49
...db/runtime/src/main/java/io/quarkus/liquibase/mongodb/runtime/LiquibaseMongodbConfig.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 |
---|---|---|
@@ -1,91 +1,84 @@ | ||
package io.quarkus.liquibase.mongodb.runtime; | ||
|
||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigItem; | ||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
import io.smallrye.config.WithDefault; | ||
|
||
/** | ||
* The liquibase configuration | ||
*/ | ||
@ConfigRoot(name = "liquibase-mongodb", phase = ConfigPhase.RUN_TIME) | ||
public class LiquibaseMongodbConfig { | ||
@ConfigRoot(phase = ConfigPhase.RUN_TIME) | ||
@ConfigMapping(prefix = "quarkus.liquibase-mongodb") | ||
public interface LiquibaseMongodbConfig { | ||
|
||
/** | ||
* Flag to enable / disable Liquibase. | ||
* | ||
*/ | ||
@ConfigItem(defaultValue = "true") | ||
public boolean enabled; | ||
@WithDefault("true") | ||
boolean enabled(); | ||
|
||
/** | ||
* The migrate at start flag | ||
*/ | ||
@ConfigItem | ||
public boolean migrateAtStart; | ||
@WithDefault("false") | ||
boolean migrateAtStart(); | ||
|
||
/** | ||
* The validate on update flag | ||
*/ | ||
@ConfigItem(defaultValue = "true") | ||
public boolean validateOnMigrate; | ||
@WithDefault("true") | ||
boolean validateOnMigrate(); | ||
|
||
/** | ||
* The clean at start flag | ||
*/ | ||
@ConfigItem | ||
public boolean cleanAtStart; | ||
@WithDefault("false") | ||
boolean cleanAtStart(); | ||
|
||
/** | ||
* The parameters to be passed to the changelog. | ||
* Defined as key value pairs. | ||
*/ | ||
@ConfigItem | ||
public Map<String, String> changeLogParameters = new HashMap<>();; | ||
Map<String, String> changeLogParameters(); | ||
|
||
/** | ||
* The list of contexts | ||
*/ | ||
@ConfigItem | ||
public Optional<List<String>> contexts = Optional.empty(); | ||
Optional<List<String>> contexts(); | ||
|
||
/** | ||
* The list of labels | ||
*/ | ||
@ConfigItem | ||
public Optional<List<String>> labels = Optional.empty(); | ||
Optional<List<String>> labels(); | ||
|
||
/** | ||
* The default catalog name | ||
*/ | ||
@ConfigItem | ||
public Optional<String> defaultCatalogName = Optional.empty(); | ||
Optional<String> defaultCatalogName(); | ||
|
||
/** | ||
* The default schema name | ||
*/ | ||
@ConfigItem | ||
public Optional<String> defaultSchemaName = Optional.empty(); | ||
Optional<String> defaultSchemaName(); | ||
|
||
/** | ||
* The liquibase tables catalog name | ||
*/ | ||
@ConfigItem | ||
public Optional<String> liquibaseCatalogName = Optional.empty(); | ||
Optional<String> liquibaseCatalogName(); | ||
|
||
/** | ||
* The liquibase tables schema name | ||
*/ | ||
@ConfigItem | ||
public Optional<String> liquibaseSchemaName = Optional.empty(); | ||
Optional<String> liquibaseSchemaName(); | ||
|
||
/** | ||
* The liquibase tables tablespace name | ||
*/ | ||
@ConfigItem | ||
public Optional<String> liquibaseTablespaceName = Optional.empty(); | ||
Optional<String> liquibaseTablespaceName(); | ||
} |
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
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
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
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
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
Oops, something went wrong.