本文整理了Java中com.googlecode.flyway.core.Flyway.setValidateOnMigrate()
方法的一些代码示例,展示了Flyway.setValidateOnMigrate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flyway.setValidateOnMigrate()
方法的具体详情如下:
包路径:com.googlecode.flyway.core.Flyway
类名称:Flyway
方法名:setValidateOnMigrate
[英]Whether to automatically call validate or not when running migrate.
[中]运行迁移时是否自动调用验证。
代码示例来源:origin: com.googlecode.flyway/flyway-core
setValidateOnMigrate(Boolean.parseBoolean(validateOnMigrateProp));
代码示例来源:origin: com.googlecode.flyway/flyway-ant
@Override
protected void doExecuteWithMigrationConfig(Flyway flyway) throws Exception {
String validationModeValue = useValueIfPropertyNotSet(validationMode, "validationMode");
if (validationModeValue != null) {
flyway.setValidationMode(ValidationMode.valueOf(validationModeValue.toUpperCase()));
}
flyway.setValidateOnMigrate(useValueIfPropertyNotSet(validateOnMigrate, "validateOnMigrate"));
flyway.setDisableInitCheck(useValueIfPropertyNotSet(disableInitCheck, "disableInitCheck"));
flyway.setInitOnMigrate(useValueIfPropertyNotSet(initOnMigrate, "initOnMigrate"));
flyway.setIgnoreFailedFutureMigration(useValueIfPropertyNotSet(ignoreFailedFutureMigration, "ignoreFailedFutureMigration"));
if (flyway.info().all().length == 0) {
log.warn("Possible solution: run the Ant javac and copy tasks first so Flyway can find the migrations");
return;
}
flyway.migrate();
}
}
内容来源于网络,如有侵权,请联系作者删除!