提交 78ba097c 编写于 作者: J Joram Barrez

Fix upgrade tests

上级 578c3678
......@@ -414,7 +414,7 @@ public abstract class AbstractEngineConfiguration {
public void initSchemaCommandConfig() {
if (schemaCommandConfig == null) {
schemaCommandConfig = new CommandConfig().transactionNotSupported();
schemaCommandConfig = new CommandConfig();
}
}
......
......@@ -165,47 +165,6 @@ public abstract class AbstractSqlScriptBasedDbSchemaManager implements DbSchemaM
}
}
public void setProperty(String propertyName, String value) {
String tableName = getPropertyTable();
if (!getDbSqlSession().getDbSqlSessionFactory().isTablePrefixIsSchema()) {
tableName = prependDatabaseTablePrefix(tableName);
}
PreparedStatement statement = null;
PreparedStatement statement2 = null;
try {
statement = getDbSqlSession().getSqlSession().getConnection()
.prepareStatement("update " + tableName + " set VALUE_ = ? where NAME_ = ?");
statement.setString(1, value);
statement.setString(2, propertyName);
int result = statement.executeUpdate();
// Property does not exist yet, insert the property
if (result == 0) {
statement2 = getDbSqlSession().getSqlSession().getConnection()
.prepareStatement("insert into " + tableName + "(NAME_, VALUE_, REV_) values(?, ?, ?)");
statement2.setString(1, propertyName);
statement2.setString(2, value);
statement2.setInt(3, 1);
statement2.executeUpdate();
}
} catch (SQLException e) {
throw new FlowableException("Could not set property " + propertyName + " in " + tableName, e);
} finally {
if (statement != null) {
try {
statement.close();
} catch (SQLException e) { }
}
if (statement2 != null) {
try {
statement2.close();
} catch (SQLException e) { }
}
}
}
protected String getPropertyTable() {
return PROPERTY_TABLE;
}
......
......@@ -79,10 +79,6 @@ public abstract class ServiceSqlScriptBasedDbSchemaManager extends AbstractSqlSc
if (isHistoryUsed()) {
dbSchemaUpgrade(schemaComponentHistory, matchingVersionIndex);
}
if (dbVersion != null) {
setProperty(schemaVersionProperty, FlowableVersions.CURRENT_VERSION);
}
}
feedback = "upgraded from " + compareWithVersion + " to " + FlowableVersions.CURRENT_VERSION;
......
insert into ACT_GE_PROPERTY values ('identitylink.schema.version', '6.2.0.0', 1);
\ No newline at end of file
insert into ACT_GE_PROPERTY values ('job.schema.version', '6.2.0.0', 1);
\ No newline at end of file
alter table ACT_HI_TASKINST add column SCOPE_ID_ nvarchar(255);
alter table ACT_HI_TASKINST add column SUB_SCOPE_ID_ nvarchar(255);
alter table ACT_HI_TASKINST add column SCOPE_TYPE_ nvarchar(255);
alter table ACT_HI_TASKINST add column SCOPE_DEFINITION_ID_ nvarchar(255);
alter table ACT_HI_TASKINST add SCOPE_ID_ nvarchar(255);
alter table ACT_HI_TASKINST add SUB_SCOPE_ID_ nvarchar(255);
alter table ACT_HI_TASKINST add SCOPE_TYPE_ nvarchar(255);
alter table ACT_HI_TASKINST add SCOPE_DEFINITION_ID_ nvarchar(255);
create index ACT_IDX_HI_TASK_SCOPE on ACT_HI_TASKINST(SCOPE_ID_, SCOPE_TYPE_);
create index ACT_IDX_HI_TASK_SUB_SCOPE on ACT_HI_TASKINST(SUB_SCOPE_ID_, SCOPE_TYPE_);
......
alter table ACT_RU_TASK add column SCOPE_ID_ nvarchar(255);
alter table ACT_RU_TASK add column SUB_SCOPE_ID_ nvarchar(255);
alter table ACT_RU_TASK add column SCOPE_TYPE_ nvarchar(255);
alter table ACT_RU_TASK add column SCOPE_DEFINITION_ID_ nvarchar(255);
alter table ACT_RU_TASK add SCOPE_ID_ nvarchar(255);
alter table ACT_RU_TASK add SUB_SCOPE_ID_ nvarchar(255);
alter table ACT_RU_TASK add SCOPE_TYPE_ nvarchar(255);
alter table ACT_RU_TASK add SCOPE_DEFINITION_ID_ nvarchar(255);
create index ACT_IDX_TASK_SCOPE on ACT_RU_TASK(SCOPE_ID_, SCOPE_TYPE_);
create index ACT_IDX_TASK_SUB_SCOPE on ACT_RU_TASK(SUB_SCOPE_ID_, SCOPE_TYPE_);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册