本文整理了Java中org.flywaydb.core.Flyway.setSqlMigrationPrefix()
方法的一些代码示例,展示了Flyway.setSqlMigrationPrefix()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flyway.setSqlMigrationPrefix()
方法的具体详情如下:
包路径:org.flywaydb.core.Flyway
类名称:Flyway
方法名:setSqlMigrationPrefix
暂无
代码示例来源:origin: com.crosstreelabs/junited.flyway
@Override
protected void before(Statement statement, Description description) throws Throwable {
if (datasource == null) {
datasource = provider.get();
}
if (schema == null || database == null) {
try (Connection conn = datasource.getConnection()) {
schema = conn.getSchema();
database = conn.getMetaData().getDatabaseProductName();
} catch (SQLException ex) {
throw new RuntimeException(ex);
}
}
Flyway flyway = new Flyway();
flyway.setClassLoader(new FlywayClassLoader(FlywayRule.class.getClassLoader(), database));
flyway.setDataSource(datasource);
flyway.setSchemas(schema);
flyway.setSqlMigrationPrefix("");
flyway.setOutOfOrder(true);
flyway.migrate();
}
代码示例来源:origin: org.arquillian.ape/arquillian-ape-sql-standalone-flyway
flyway.setSqlMigrationPrefix((String) this.options.get(SQL_MIGRATION_PREFIX));
代码示例来源:origin: StubbornJava/StubbornJava
public static void migrate() {
Flyway flyway = new Flyway();
flyway.setDataSource(CMSConnectionPools.processing());
flyway.setBaselineOnMigrate(true);
flyway.setLocations("db/cms/migration");
flyway.setSqlMigrationPrefix("V_");
flyway.setTable("_flyway");
flyway.migrate();
}
代码示例来源:origin: mbok/logsniffer
flyway.setLocations("classpath:sql/migration");
flyway.setDataSource(pool);
flyway.setSqlMigrationPrefix("VOS-");
flyway.setIgnoreFailedFutureMigration(true);
代码示例来源:origin: hortonworks/registry
public static Flyway get(StorageProviderConfiguration conf, String scriptRootPath, boolean validateOnMigrate) {
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;
}
代码示例来源:origin: com.hortonworks.registries/storage-tool
public static Flyway get(StorageProviderConfiguration conf, String scriptRootPath, boolean validateOnMigrate) {
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;
}
内容来源于网络,如有侵权,请联系作者删除!