本文整理汇总了Java中org.flywaydb.core.Flyway.setCleanOnValidationError方法的典型用法代码示例。如果您正苦于以下问题:Java Flyway.setCleanOnValidationError方法的具体用法?Java Flyway.setCleanOnValidationError怎么用?Java Flyway.setCleanOnValidationError使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.flywaydb.core.Flyway
的用法示例。
在下文中一共展示了Flyway.setCleanOnValidationError方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: get
import org.flywaydb.core.Flyway; //导入方法依赖的package包/类
public static Flyway get(StorageProviderConfiguration conf, String scriptRootPath) {
Flyway flyway = new Flyway();
String location = "filesystem:" + scriptRootPath;
flyway.setEncoding(encoding);
flyway.setTable(metaDataTableName);
flyway.setValidateOnMigrate(validateOnMigrate);
flyway.setOutOfOrder(outOfOrder);
flyway.setBaselineOnMigrate(baselineOnMigrate);
flyway.setBaselineVersion(MigrationVersion.fromVersion(baselineVersion));
flyway.setCleanOnValidationError(cleanOnValidationError);
flyway.setLocations(location);
flyway.setResolvers(new ShellMigrationResolver(flyway.getClassLoader(), location, shellMigrationPrefix, shellMigrationSeperator, shellMigrationSuffix));
flyway.setDataSource(conf.getUrl(), conf.getUser(), conf.getPassword(), null);
return flyway;
}
示例2: get
import org.flywaydb.core.Flyway; //导入方法依赖的package包/类
public static Flyway get(StorageProviderConfiguration conf, String scriptRootPath) {
Flyway flyway = new Flyway();
String location = "filesystem:" + scriptRootPath + File.separator + conf.getDbType();
flyway.setEncoding(encoding);
flyway.setTable(metaDataTableName);
flyway.setSqlMigrationPrefix(sqlMigrationPrefix);
flyway.setValidateOnMigrate(validateOnMigrate);
flyway.setOutOfOrder(outOfOrder);
flyway.setBaselineOnMigrate(baselineOnMigrate);
flyway.setBaselineVersion(MigrationVersion.fromVersion(baselineVersion));
flyway.setCleanOnValidationError(cleanOnValidationError);
flyway.setLocations(location);
flyway.setDataSource(conf.getUrl(), conf.getUser(), conf.getPassword(), null);
return flyway;
}
示例3: run
import org.flywaydb.core.Flyway; //导入方法依赖的package包/类
@Override
protected void run(final Namespace namespace, final Flyway flyway) throws Exception {
flyway.setOutOfOrder(namespace.getBoolean(OUT_OF_ORDER));
flyway.setCleanOnValidationError(namespace.getBoolean(CLEAN_ON_VALIDATION_ERROR));
flyway.validate();
}
示例4: run
import org.flywaydb.core.Flyway; //导入方法依赖的package包/类
@Override
public void run(final Namespace namespace, final Flyway flyway) throws Exception {
flyway.setOutOfOrder(namespace.getBoolean(OUT_OF_ORDER));
flyway.setValidateOnMigrate(namespace.getBoolean(VALIDATE_ON_MIGRATE));
flyway.setCleanOnValidationError(namespace.getBoolean(CLEAN_ON_VALIDATION_ERROR));
flyway.setBaselineOnMigrate(namespace.getBoolean(INIT_ON_MIGRATE));
final int successfulMigrations = flyway.migrate();
LOG.debug("{} successful migrations applied", successfulMigrations);
}