當前位置: 首頁>>代碼示例>>Java>>正文


Java Flyway.setCleanOnValidationError方法代碼示例

本文整理匯總了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;
}
 
開發者ID:hortonworks,項目名稱:registry,代碼行數:18,代碼來源:ShellFlywayFactory.java

示例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;
}
 
開發者ID:hortonworks,項目名稱:registry,代碼行數:18,代碼來源:SchemaFlywayFactory.java

示例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();
}
 
開發者ID:dropwizard,項目名稱:dropwizard-flyway,代碼行數:8,代碼來源:DbValidateCommand.java

示例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);
}
 
開發者ID:dropwizard,項目名稱:dropwizard-flyway,代碼行數:11,代碼來源:DbMigrateCommand.java


注:本文中的org.flywaydb.core.Flyway.setCleanOnValidationError方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。