org.flywaydb.core.Flyway.setTargetAsString()方法的使用及代码示例

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

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

Flyway.setTargetAsString介绍

暂无

代码示例

代码示例来源:origin: zapodot/embedded-db-junit

public Builder withTarget(final String targetVersion) {
  flyway.setTargetAsString(targetVersion);
  return this;
}

代码示例来源:origin: org.seedstack.addons.flyway/flyway

@Override
  public Integer call() throws Exception {
    Flyway flyway = getFlyway();
    if (this.target != null) {
      flyway.setTargetAsString(this.target);
    }
    System.out.println("Flyway: validating datasource " + getDatasource() + " for " + target);
    flyway.validate();
    return 0;
  }
}

代码示例来源:origin: org.seedstack.addons.flyway/flyway

@Override
  public Integer call() throws Exception {
    Flyway flyway = getFlyway();
    String datasource = getDatasource();

    if (target != null) {
      flyway.setTargetAsString(target);
    }

    System.out.println("Flyway: migrating datasource " + datasource + " to " + flyway.getTarget());
    int result = flyway.migrate();
    if (result == 0) {
      System.out.println("Flyway: datasource " + datasource + " is already up to date");
    } else {
      System.out.println("Flyway: datasource " + datasource + " has been migrated (" + result + " migration(s) applied)");
    }

    return 0;
  }
}

代码示例来源:origin: org.arquillian.ape/arquillian-ape-sql-standalone-flyway

flyway.setTargetAsString((String) this.options.get(TARGET));

代码示例来源:origin: DSpace/DSpace

flyway.setTargetAsString(targetVersion);

相关文章