当前位置: 首页>>代码示例>>Java>>正文


Java Flyway.setOutOfOrder方法代码示例

本文整理汇总了Java中org.flywaydb.core.Flyway.setOutOfOrder方法的典型用法代码示例。如果您正苦于以下问题:Java Flyway.setOutOfOrder方法的具体用法?Java Flyway.setOutOfOrder怎么用?Java Flyway.setOutOfOrder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.flywaydb.core.Flyway的用法示例。


在下文中一共展示了Flyway.setOutOfOrder方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: InitializeDatabase

import org.flywaydb.core.Flyway; //导入方法依赖的package包/类
@Inject
public InitializeDatabase(DataSource dataSource) {
	Flyway flyway = new Flyway();
	flyway.setDataSource(dataSource);
	flyway.setOutOfOrder(true);
	flyway.migrate();
}
 
开发者ID:Coreoz,项目名称:Plume,代码行数:8,代码来源:InitializeDatabase.java

示例4: build

import org.flywaydb.core.Flyway; //导入方法依赖的package包/类
public Flyway build(final DataSource dataSource) {
    final String[] fwSchemas = new String[schemas.size()];
    final String[] fwCallbacks = new String[callbacks.size()];
    final String[] fwLocations = new String[locations.size()];
    final String[] fwResolvers = new String[resolvers.size()];

    final Flyway flyway = new Flyway();

    if (null != classLoader) {
        flyway.setClassLoader(classLoader);
    }

    flyway.setDataSource(dataSource);
    flyway.setEncoding(encoding);
    flyway.setTable(metaDataTableName);
    flyway.setSqlMigrationPrefix(sqlMigrationPrefix);
    flyway.setSqlMigrationSeparator(sqlMigrationSeparator);
    flyway.setSqlMigrationSuffix(sqlMigrationSuffix);
    flyway.setSchemas(schemas.toArray(fwSchemas));
    flyway.setCallbacksAsClassNames(callbacks.toArray(fwCallbacks));
    flyway.setPlaceholderPrefix(placeholderPrefix);
    flyway.setPlaceholderSuffix(placeholderSuffix);
    flyway.setPlaceholders(placeholders);
    flyway.setLocations(locations.toArray(fwLocations));
    flyway.setResolversAsClassNames(resolvers.toArray(fwResolvers));
    flyway.setOutOfOrder(outOfOrder);
    flyway.setBaselineDescription(baselineDescription);
    flyway.setBaselineOnMigrate(baselineOnMigrate);
    flyway.setValidateOnMigrate(validateOnMigrate);

    return flyway;
}
 
开发者ID:dropwizard,项目名称:dropwizard-flyway,代码行数:33,代码来源:FlywayFactory.java

示例5: 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

示例6: 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

示例7: migrator

import org.flywaydb.core.Flyway; //导入方法依赖的package包/类
@Bean
public Flyway migrator(Environment env, PlatformProvider platform, DataSource dataSource) {
    String sqlDialect = platform.getDialect(env);
    Flyway migration = new Flyway();
    migration.setDataSource(dataSource);

    migration.setValidateOnMigrate(false);
    migration.setTarget(MigrationVersion.LATEST);
    migration.setOutOfOrder(true);

    migration.setLocations("alfio/db/" + sqlDialect + "/");
    migration.migrate();
    return migration;
}
 
开发者ID:alfio-event,项目名称:alf.io,代码行数:15,代码来源:DataSourceConfiguration.java


注:本文中的org.flywaydb.core.Flyway.setOutOfOrder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。