本文整理了Java中org.flywaydb.core.Flyway.getBaselineVersion()
方法的一些代码示例,展示了Flyway.getBaselineVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flyway.getBaselineVersion()
方法的具体详情如下:
包路径:org.flywaydb.core.Flyway
类名称:Flyway
方法名:getBaselineVersion
暂无
代码示例来源:origin: org.seedstack.addons.flyway/flyway
private void automaticMigration(Flyway flyway, String dataSourceName, DataSourceConfig dataSourceConf) {
if (!locationExists(flyway)) {
// no migration if no script is present
LOGGER.info("Ignoring Flyway migration for datasource without scripts {}", dataSourceName);
return;
}
if (dataSourceConf != null) {
if (!dataSourceConf.isEnabled()) {
// no migration if explicitly disabled
LOGGER.info("Flyway migration is disabled for datasource {}", dataSourceName);
return;
}
if (!Strings.isNullOrEmpty(dataSourceConf.getOptions().getBaselineVersion())) {
LOGGER.info("Baselining datasource {} to {}", dataSourceName, flyway.getBaselineVersion());
flyway.baseline();
}
}
LOGGER.info("Migrating datasource {} to {}", dataSourceName, flyway.getTarget());
flyway.migrate();
}
代码示例来源:origin: org.seedstack.addons.flyway/flyway
@Override
public Integer call() throws Exception {
Flyway flyway = getFlyway();
if (this.baselineVersion != null) {
flyway.setBaselineVersionAsString(this.baselineVersion);
}
if (this.baselineDescription != null) {
flyway.setBaselineDescription(this.baselineDescription);
}
System.out.println("Flyway: baselining datasource " + getDatasource() + " to " + flyway.getBaselineVersion());
flyway.baseline();
return 0;
}
}
代码示例来源:origin: org.amv.trafficsoft.datahub/xfcd-consumer-jdbc-spring-boot-starter
private void startSchemaMigration() {
final Flyway flyway = new Flyway();
flyway.setDataSource(jdbcConsumerHikariDataSource());
flyway.setLocations(properties.getFlywayScriptsLocation());
log.info("Starting Trafficsoft Delivery schema migration v{}", flyway.getBaselineVersion().getVersion());
flyway.migrate();
}
}
代码示例来源:origin: mbok/logsniffer
logger.debug("Migrating database, base version is: {}", flyway.getBaselineVersion());
flyway.migrate();
logger.debug("Database migrated from base version: {}", flyway.getBaselineVersion());
内容来源于网络,如有侵权,请联系作者删除!