本文整理了Java中com.googlecode.flyway.core.Flyway.setSchemas()
方法的一些代码示例,展示了Flyway.setSchemas()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flyway.setSchemas()
方法的具体详情如下:
包路径:com.googlecode.flyway.core.Flyway
类名称:Flyway
方法名:setSchemas
[英]Sets the schemas managed by Flyway. These schema names are case-sensitive. (default: The default schema for the datasource connection)
Consequences:
代码示例来源:origin: minnal/minnal
public MigrationsPlugin(Flyway flyway) {
this.flyway = flyway;
this.flyway.setInitOnMigrate(true);
this.flyway.setSchemas("PUBLIC");
}
代码示例来源:origin: SAP/olingo-jpa-processor-v4
flyway.setSchemas(DB_SCHEMA);
flyway.migrate();
return ds;
代码示例来源:origin: minnal/minnal
public void init(Application<? extends ApplicationConfiguration> application) {
DatabaseConfiguration dbConfig = application.getConfiguration().getDatabaseConfiguration();
URI uri = getUri(dbConfig.getUrl());
if (Strings.isNullOrEmpty(uri.getPath())) {
flyway.setDataSource(dbConfig.getUrl(), dbConfig.getUsername(), dbConfig.getPassword());
} else {
flyway.setDataSource(getUrl(uri, false), dbConfig.getUsername(), dbConfig.getPassword());
flyway.setSchemas(uri.getPath().substring(1));
}
flyway.migrate();
}
代码示例来源:origin: com.googlecode.flyway/flyway-core
setSchemas(StringUtils.tokenizeToStringArray(schemasProp, ","));
代码示例来源:origin: com.googlecode.flyway/flyway-ant
String schemasValue = useValueIfPropertyNotSet(schemas, "schemas");
if (schemasValue != null) {
flyway.setSchemas(StringUtils.tokenizeToStringArray(schemasValue, ","));
代码示例来源:origin: com.googlecode.flyway/flyway-core
" Set a default schema for the connection or specify one using the schemas property!");
setSchemas(currentSchema.getName());
内容来源于网络,如有侵权,请联系作者删除!