com.googlecode.flyway.core.Flyway.setValidateOnMigrate()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中com.googlecode.flyway.core.Flyway.setValidateOnMigrate()方法的一些代码示例,展示了Flyway.setValidateOnMigrate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flyway.setValidateOnMigrate()方法的具体详情如下:
包路径:com.googlecode.flyway.core.Flyway
类名称:Flyway
方法名:setValidateOnMigrate

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();
  }
}

相关文章