com.github.mengweijin.flyway.database.dm.DmConfigurationExtension Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of db-migration Show documentation
Show all versions of db-migration Show documentation
Flyway、Liquibase 扩展支持达梦(DM)数据库、南大通用(GBase 8s)数据库。
package com.github.mengweijin.flyway.database.dm;
import lombok.Data;
import org.flywaydb.core.extensibility.ConfigurationExtension;
/**
* @author mengweijin
*/
@Data
public class DmConfigurationExtension implements ConfigurationExtension {
private static final String ORACLE_SQLPLUS = "flyway.oracle.sqlplus";
private static final String ORACLE_SQLPLUS_WARN = "flyway.oracle.sqlplusWarn";
private static final String ORACLE_KERBEROS_CACHE_FILE = "flyway.oracle.kerberosCacheFile";
private static final String ORACLE_WALLET_LOCATION = "flyway.oracle.walletLocation";
private Boolean sqlplus = false;
private Boolean sqlplusWarn = false;
private String kerberosCacheFile;
private String walletLocation;
@Override
public String getNamespace() {
return "oracle";
}
@Override
public String getConfigurationParameterFromEnvironmentVariable(String environmentVariable) {
switch (environmentVariable) {
case "FLYWAY_ORACLE_KERBEROS_CACHE_FILE":
return ORACLE_KERBEROS_CACHE_FILE;
case "FLYWAY_ORACLE_SQLPLUS":
return ORACLE_SQLPLUS;
case "FLYWAY_ORACLE_SQLPLUS_WARN":
return ORACLE_SQLPLUS_WARN;
case "FLYWAY_ORACLE_WALLET_LOCATION":
return ORACLE_WALLET_LOCATION;
default:
return null;
}
}
}