diff --git a/distro/src/notice.txt b/distro/src/notice.txt
index 4bcd443a5c8..958d26a0006 100644
--- a/distro/src/notice.txt
+++ b/distro/src/notice.txt
@@ -100,7 +100,6 @@ org.apache.geronimo.bundles json 20090211_1 The
org.apache.groovy groovy 4.0.17 The Apache Software License, Version 2.0
org.apache.groovy groovy-jsr223 4.0.17 The Apache Software License, Version 2.0
org.eclipse.angus angus-mail 2.0.2 EDL 1.0 / EPL 2.0
-org.liquibase liquibase-core 4.5.0 Apache License, Version 2.0
org.mybatis mybatis 3.5.13 The Apache Software License, Version 2.0
org.mybatis mybatis-spring 3.0.3 The Apache Software License, Version 2.0
org.mvel mvel2 2.2.6.Final The Apache Software License, Version 2.0
diff --git a/modules/flowable-app-engine-api/pom.xml b/modules/flowable-app-engine-api/pom.xml
index 2a5ecb83fb4..c7db8397465 100644
--- a/modules/flowable-app-engine-api/pom.xml
+++ b/modules/flowable-app-engine-api/pom.xml
@@ -25,6 +25,10 @@
org.flowable
flowable-engine-common-api
+
+ org.flowable
+ flowable-engine-common
+
org.flowable
flowable-variable-service-api
diff --git a/modules/flowable-app-engine-api/src/main/java/org/flowable/app/api/AppManagementService.java b/modules/flowable-app-engine-api/src/main/java/org/flowable/app/api/AppManagementService.java
index 39ed6b69b19..71a4f7d114c 100644
--- a/modules/flowable-app-engine-api/src/main/java/org/flowable/app/api/AppManagementService.java
+++ b/modules/flowable-app-engine-api/src/main/java/org/flowable/app/api/AppManagementService.java
@@ -15,6 +15,8 @@
import java.util.Collection;
import java.util.Map;
+import org.flowable.common.engine.api.lock.LockManager;
+
/**
* @author Tijs Rademakers
*/
@@ -30,4 +32,15 @@ public interface AppManagementService {
*/
Collection getTableNames();
+ /**
+ * Acquire a lock manager for the requested lock.
+ * This is a stateless call, this means that every time a lock manager
+ * is requested a new one would be created. Make sure that you release the lock
+ * once you are done.
+ *
+ * @param lockName the name of the lock that is being requested
+ *
+ * @return the lock manager for the given lock
+ */
+ LockManager getLockManager(String lockName);
}
diff --git a/modules/flowable-app-engine-rest/src/test/java/org/flowable/app/rest/service/BaseSpringRestTestCase.java b/modules/flowable-app-engine-rest/src/test/java/org/flowable/app/rest/service/BaseSpringRestTestCase.java
index 3a8f416a9c0..0d458a24653 100644
--- a/modules/flowable-app-engine-rest/src/test/java/org/flowable/app/rest/service/BaseSpringRestTestCase.java
+++ b/modules/flowable-app-engine-rest/src/test/java/org/flowable/app/rest/service/BaseSpringRestTestCase.java
@@ -273,15 +273,7 @@ protected void assertAndEnsureCleanDb() throws Throwable {
appEngineConfiguration,
TABLENAMES_EXCLUDED_FROM_DB_CLEAN_CHECK,
exception == null,
- new Command() {
- @Override
- public Void execute(CommandContext commandContext) {
- SchemaManager schemaManager = CommandContextUtil.getAppEngineConfiguration(commandContext).getSchemaManager();
- schemaManager.schemaDrop();
- schemaManager.schemaCreate();
- return null;
- }
- }
+ appEngineConfiguration.getSchemaManagementCmd()
);
}
diff --git a/modules/flowable-app-engine-spring/src/main/java/org/flowable/app/spring/SpringAppEngineConfiguration.java b/modules/flowable-app-engine-spring/src/main/java/org/flowable/app/spring/SpringAppEngineConfiguration.java
index bd51301366f..8c04fcb6c70 100644
--- a/modules/flowable-app-engine-spring/src/main/java/org/flowable/app/spring/SpringAppEngineConfiguration.java
+++ b/modules/flowable-app-engine-spring/src/main/java/org/flowable/app/spring/SpringAppEngineConfiguration.java
@@ -62,8 +62,8 @@ public SpringAppEngineConfiguration() {
}
@Override
- public AppEngine buildAppEngine() {
- AppEngine appEngine = super.buildAppEngine();
+ public AppEngine buildEngine() {
+ AppEngine appEngine = super.buildEngine();
AppEngines.setInitialized(true);
enginesBuild.add(appEngine.getName());
return appEngine;
diff --git a/modules/flowable-app-engine-spring/src/main/java/org/flowable/app/spring/autodeployment/AbstractAppAutoDeploymentStrategy.java b/modules/flowable-app-engine-spring/src/main/java/org/flowable/app/spring/autodeployment/AbstractAppAutoDeploymentStrategy.java
index 362495fc5af..c0ec473faa7 100644
--- a/modules/flowable-app-engine-spring/src/main/java/org/flowable/app/spring/autodeployment/AbstractAppAutoDeploymentStrategy.java
+++ b/modules/flowable-app-engine-spring/src/main/java/org/flowable/app/spring/autodeployment/AbstractAppAutoDeploymentStrategy.java
@@ -20,7 +20,7 @@
import org.flowable.app.api.repository.AppDeploymentBuilder;
import org.flowable.app.engine.AppEngine;
-import org.flowable.common.engine.impl.lock.LockManager;
+import org.flowable.common.engine.api.lock.LockManager;
import org.flowable.common.spring.CommonAutoDeploymentProperties;
import org.flowable.common.spring.CommonAutoDeploymentStrategy;
import org.springframework.core.io.Resource;
diff --git a/modules/flowable-app-engine/pom.xml b/modules/flowable-app-engine/pom.xml
index 758a66c8e3b..566aafd7aa3 100644
--- a/modules/flowable-app-engine/pom.xml
+++ b/modules/flowable-app-engine/pom.xml
@@ -51,10 +51,6 @@
org.flowable
flowable-identitylink-service
-
- org.liquibase
- liquibase-core
-
com.fasterxml.uuid
java-uuid-generator
diff --git a/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/AppEngineConfiguration.java b/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/AppEngineConfiguration.java
index ae3d4a4ab25..eb3e792fc34 100644
--- a/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/AppEngineConfiguration.java
+++ b/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/AppEngineConfiguration.java
@@ -28,10 +28,10 @@
import org.flowable.app.api.AppRepositoryService;
import org.flowable.app.api.repository.AppResourceConverter;
import org.flowable.app.engine.impl.AppEngineImpl;
+import org.flowable.app.engine.impl.AppEnginePostEngineBuildConsumer;
import org.flowable.app.engine.impl.AppManagementServiceImpl;
import org.flowable.app.engine.impl.AppRepositoryServiceImpl;
import org.flowable.app.engine.impl.cfg.StandaloneInMemAppEngineConfiguration;
-import org.flowable.app.engine.impl.cmd.SchemaOperationsAppEngineBuild;
import org.flowable.app.engine.impl.db.AppDbSchemaManager;
import org.flowable.app.engine.impl.db.EntityDependencyOrder;
import org.flowable.app.engine.impl.deployer.AppDeployer;
@@ -52,6 +52,7 @@
import org.flowable.app.engine.impl.persistence.entity.data.impl.MybatisResourceDataManager;
import org.flowable.app.engine.impl.persistence.entity.deploy.AppDefinitionCacheEntry;
import org.flowable.common.engine.api.scope.ScopeTypes;
+import org.flowable.common.engine.impl.AbstractBuildableEngineConfiguration;
import org.flowable.common.engine.impl.AbstractEngineConfiguration;
import org.flowable.common.engine.impl.EngineConfigurator;
import org.flowable.common.engine.impl.EngineDeployer;
@@ -73,7 +74,6 @@
import org.flowable.common.engine.impl.persistence.entity.TableDataManager;
import org.flowable.eventregistry.impl.configurator.EventRegistryEngineConfigurator;
import org.flowable.identitylink.service.IdentityLinkServiceConfiguration;
-import org.flowable.identitylink.service.impl.db.IdentityLinkDbSchemaManager;
import org.flowable.idm.api.IdmEngineConfigurationApi;
import org.flowable.idm.api.IdmIdentityService;
import org.flowable.idm.engine.configurator.IdmEngineConfigurator;
@@ -81,7 +81,6 @@
import org.flowable.variable.api.types.VariableTypes;
import org.flowable.variable.service.VariableServiceConfiguration;
import org.flowable.variable.service.impl.db.IbatisVariableTypeHandler;
-import org.flowable.variable.service.impl.db.VariableDbSchemaManager;
import org.flowable.variable.service.impl.types.BooleanType;
import org.flowable.variable.service.impl.types.ByteArrayType;
import org.flowable.variable.service.impl.types.DateType;
@@ -103,11 +102,10 @@
import org.flowable.variable.service.impl.types.StringType;
import org.flowable.variable.service.impl.types.UUIDType;
-public class AppEngineConfiguration extends AbstractEngineConfiguration implements
+public class AppEngineConfiguration extends AbstractBuildableEngineConfiguration implements
AppEngineConfigurationApi, HasExpressionManagerEngineConfiguration, HasVariableTypes {
public static final String DEFAULT_MYBATIS_MAPPING_FILE = "org/flowable/app/db/mapping/mappings.xml";
- public static final String LIQUIBASE_CHANGELOG_PREFIX = "ACT_APP_";
protected String appEngineName = AppEngines.NAME_DEFAULT;
@@ -124,8 +122,6 @@ public class AppEngineConfiguration extends AbstractEngineConfiguration implemen
protected boolean disableIdmEngine;
protected boolean disableEventRegistry;
-
- protected boolean executeServiceSchemaManagers = true;
protected AppDeployer appDeployer;
protected AppDeploymentManager deploymentManager;
@@ -136,8 +132,6 @@ public class AppEngineConfiguration extends AbstractEngineConfiguration implemen
protected ExpressionManager expressionManager;
protected Collection> expressionManagerConfigurers;
- protected SchemaManager identityLinkSchemaManager;
- protected SchemaManager variableSchemaManager;
// Identitylink support
protected IdentityLinkServiceConfiguration identityLinkServiceConfiguration;
@@ -191,11 +185,21 @@ public static AppEngineConfiguration createStandaloneInMemAppEngineConfiguration
return new StandaloneInMemAppEngineConfiguration();
}
- public AppEngine buildAppEngine() {
- init();
+ @Override
+ protected AppEngine createEngine() {
return new AppEngineImpl(this);
}
+ @Override
+ protected Consumer createPostEngineBuildConsumer() {
+ return new AppEnginePostEngineBuildConsumer();
+ }
+
+ public AppEngine buildAppEngine() {
+ return buildEngine();
+ }
+
+ @Override
protected void init() {
initEngineConfigurations();
initConfigurators();
@@ -241,40 +245,8 @@ protected void init() {
}
@Override
- public void initSchemaManager() {
- super.initSchemaManager();
- initAppSchemaManager();
-
- if (executeServiceSchemaManagers) {
- initIdentityLinkSchemaManager();
- initVariableSchemaManager();
- }
- }
-
- public void initSchemaManagementCommand() {
- if (schemaManagementCmd == null) {
- if (usingRelationalDatabase && databaseSchemaUpdate != null) {
- this.schemaManagementCmd = new SchemaOperationsAppEngineBuild();
- }
- }
- }
-
- protected void initAppSchemaManager() {
- if (this.schemaManager == null) {
- this.schemaManager = new AppDbSchemaManager();
- }
- }
-
- protected void initVariableSchemaManager() {
- if (this.variableSchemaManager == null) {
- this.variableSchemaManager = new VariableDbSchemaManager();
- }
- }
-
- protected void initIdentityLinkSchemaManager() {
- if (this.identityLinkSchemaManager == null) {
- this.identityLinkSchemaManager = new IdentityLinkDbSchemaManager();
- }
+ protected SchemaManager createEngineSchemaManager() {
+ return new AppDbSchemaManager();
}
@Override
@@ -675,14 +647,6 @@ public AppEngineConfiguration setDataSource(DataSource dataSource) {
return this;
}
- public boolean isExecuteServiceSchemaManagers() {
- return executeServiceSchemaManagers;
- }
-
- public void setExecuteServiceSchemaManagers(boolean executeServiceSchemaManagers) {
- this.executeServiceSchemaManagers = executeServiceSchemaManagers;
- }
-
@Override
public ExpressionManager getExpressionManager() {
return expressionManager;
@@ -707,24 +671,6 @@ public AbstractEngineConfiguration addExpressionManagerConfigurer(Consumer {
+
+ @Override
+ public void accept(AppEngine appEngine) {
+ AppEngineConfiguration engineConfiguration = appEngine.getAppEngineConfiguration();
+ if (engineConfiguration.getEngineLifecycleListeners() != null) {
+ for (EngineLifecycleListener engineLifecycleListener : engineConfiguration.getEngineLifecycleListeners()) {
+ engineLifecycleListener.onEngineBuilt(appEngine);
+ }
+ }
+ }
+}
diff --git a/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/AppManagementServiceImpl.java b/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/AppManagementServiceImpl.java
index 4ebbfec6c00..f2a160d57e9 100644
--- a/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/AppManagementServiceImpl.java
+++ b/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/AppManagementServiceImpl.java
@@ -18,7 +18,9 @@
import org.flowable.app.api.AppManagementService;
import org.flowable.app.engine.AppEngineConfiguration;
import org.flowable.app.engine.impl.cmd.GetTableNamesCmd;
+import org.flowable.common.engine.api.lock.LockManager;
import org.flowable.common.engine.impl.cmd.GetTableCountCmd;
+import org.flowable.common.engine.impl.lock.LockManagerImpl;
import org.flowable.common.engine.impl.service.CommonEngineServiceImpl;
/**
@@ -39,5 +41,9 @@ public Map getTableCounts() {
public Collection getTableNames() {
return commandExecutor.execute(new GetTableNamesCmd());
}
-
+
+ @Override
+ public LockManager getLockManager(String lockName) {
+ return new LockManagerImpl(commandExecutor, lockName, getConfiguration().getLockPollRate(), configuration.getEngineCfgKey());
+ }
}
diff --git a/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/aot/FlowableAppRuntimeHints.java b/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/aot/FlowableAppRuntimeHints.java
index 76235896c78..901e525947a 100644
--- a/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/aot/FlowableAppRuntimeHints.java
+++ b/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/aot/FlowableAppRuntimeHints.java
@@ -25,7 +25,6 @@ public class FlowableAppRuntimeHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
ResourceHints resourceHints = hints.resources();
- resourceHints.registerPattern("org/flowable/app/db/liquibase/flowable-app-db-changelog.xml");
FlowableMyBatisResourceHintsRegistrar.registerMappingResources("org/flowable/app/db/mapping", hints, classLoader);
}
}
diff --git a/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/SchemaOperationsAppEngineBuild.java b/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/SchemaOperationsAppEngineBuild.java
deleted file mode 100644
index 0c47cac82c1..00000000000
--- a/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/SchemaOperationsAppEngineBuild.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.flowable.app.engine.impl.cmd;
-
-import org.flowable.app.engine.impl.db.AppDbSchemaManager;
-import org.flowable.app.engine.impl.util.CommandContextUtil;
-import org.flowable.common.engine.impl.interceptor.Command;
-import org.flowable.common.engine.impl.interceptor.CommandContext;
-
-/**
- * @author Tijs Rademakers
- */
-public class SchemaOperationsAppEngineBuild implements Command {
-
- @Override
- public Void execute(CommandContext commandContext) {
- ((AppDbSchemaManager) CommandContextUtil.getAppEngineConfiguration(commandContext).getSchemaManager()).initSchema();
- return null;
- }
-
-}
diff --git a/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/db/AppDbSchemaManager.java b/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/db/AppDbSchemaManager.java
index 64af0b663fd..2d11324c466 100644
--- a/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/db/AppDbSchemaManager.java
+++ b/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/db/AppDbSchemaManager.java
@@ -12,100 +12,72 @@
*/
package org.flowable.app.engine.impl.db;
-import org.flowable.app.engine.AppEngineConfiguration;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.flowable.app.engine.AppEngine;
import org.flowable.app.engine.impl.util.CommandContextUtil;
-import org.flowable.common.engine.api.FlowableException;
-import org.flowable.common.engine.impl.db.EngineDatabaseConfiguration;
-import org.flowable.common.engine.impl.db.LiquibaseBasedSchemaManager;
-import org.flowable.common.engine.impl.db.LiquibaseDatabaseConfiguration;
-import org.flowable.common.engine.impl.db.SchemaManager;
+import org.flowable.common.engine.impl.AbstractEngineConfiguration;
+import org.flowable.common.engine.impl.db.EngineSqlScriptBasedDbSchemaManager;
-public class AppDbSchemaManager extends LiquibaseBasedSchemaManager {
+public class AppDbSchemaManager extends EngineSqlScriptBasedDbSchemaManager {
+
+ protected static final String APP_DB_SCHEMA_LOCK_NAME = "appDbSchemaLock";
- public static final String LIQUIBASE_CHANGELOG = "org/flowable/app/db/liquibase/flowable-app-db-changelog.xml";
+ protected static final Map changeLogVersionMap = Map.ofEntries(
+ Map.entry("1", "6.3.1.0"),
+ Map.entry("2", "6.4.0.0"),
+ Map.entry("3", "6.4.1.3")
+ );
public AppDbSchemaManager() {
- super("app", LIQUIBASE_CHANGELOG, AppEngineConfiguration.LIQUIBASE_CHANGELOG_PREFIX);
+ super("app");
}
@Override
- protected LiquibaseDatabaseConfiguration getDatabaseConfiguration() {
- return new EngineDatabaseConfiguration(CommandContextUtil.getAppEngineConfiguration());
+ protected String getEngineVersion() {
+ return AppEngine.VERSION;
}
- public void initSchema() {
- initSchema(CommandContextUtil.getAppEngineConfiguration().getDatabaseSchemaUpdate());
- }
-
@Override
- public void schemaCreate() {
- try {
-
- getCommonSchemaManager().schemaCreate();
- getIdentityLinkSchemaManager().schemaCreate();
- getVariableSchemaManager().schemaCreate();
-
- super.schemaCreate();
- } catch (Exception e) {
- throw new FlowableException("Error creating App engine tables", e);
- }
+ protected String getSchemaVersionPropertyName() {
+ return "app.schema.version";
}
@Override
- public void schemaDrop() {
- try {
- super.schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping App engine tables", e);
- }
-
- try {
- getVariableSchemaManager().schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping variable tables", e);
- }
-
- try {
- getIdentityLinkSchemaManager().schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping identity link tables", e);
- }
-
- try {
- getCommonSchemaManager().schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping common tables", e);
- }
+ protected String getDbSchemaLockName() {
+ return APP_DB_SCHEMA_LOCK_NAME;
}
@Override
- public String schemaUpdate() {
- try {
-
- getCommonSchemaManager().schemaUpdate();
-
- if (CommandContextUtil.getAppEngineConfiguration().isExecuteServiceSchemaManagers()) {
- getIdentityLinkSchemaManager().schemaUpdate();
- getVariableSchemaManager().schemaUpdate();
- }
-
- super.schemaUpdate();
+ protected String getEngineTableName() {
+ return "ACT_APP_DEPLOYMENT";
+ }
- } catch (Exception e) {
- throw new FlowableException("Error updating App engine tables", e);
- }
- return null;
+ @Override
+ protected String getChangeLogTableName() {
+ return "ACT_APP_DATABASECHANGELOG";
}
- protected SchemaManager getCommonSchemaManager() {
- return CommandContextUtil.getAppEngineConfiguration().getCommonSchemaManager();
+ @Override
+ protected String getChangeLogTablePrefixName() {
+ return "ACT_APP";
}
-
- protected SchemaManager getIdentityLinkSchemaManager() {
- return CommandContextUtil.getAppEngineConfiguration().getIdentityLinkSchemaManager();
+
+ @Override
+ protected String getDbVersionForChangelogVersion(String changeLogVersion) {
+ if (StringUtils.isNotEmpty(changeLogVersion) && changeLogVersionMap.containsKey(changeLogVersion)) {
+ return changeLogVersionMap.get(changeLogVersion);
+ }
+ return "6.3.0.1";
}
-
- protected SchemaManager getVariableSchemaManager() {
- return CommandContextUtil.getAppEngineConfiguration().getVariableSchemaManager();
+
+ @Override
+ protected AbstractEngineConfiguration getEngineConfiguration() {
+ return CommandContextUtil.getAppEngineConfiguration();
+ }
+ @Override
+ protected String getResourcesRootDirectory() {
+ return "org/flowable/app/db/";
}
}
diff --git a/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/db/DbSchemaDrop.java b/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/db/DbSchemaDrop.java
index 6658a346d18..8a5063e9717 100644
--- a/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/db/DbSchemaDrop.java
+++ b/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/db/DbSchemaDrop.java
@@ -18,11 +18,9 @@
import org.flowable.app.engine.AppEngine;
import org.flowable.app.engine.AppEngineConfiguration;
-import org.flowable.app.engine.impl.util.CommandContextUtil;
import org.flowable.app.engine.test.FlowableAppTestCase;
-import org.flowable.common.engine.impl.interceptor.Command;
+import org.flowable.common.engine.impl.db.SchemaOperationsEngineDropDbCmd;
import org.flowable.common.engine.impl.interceptor.CommandConfig;
-import org.flowable.common.engine.impl.interceptor.CommandContext;
import org.flowable.common.engine.impl.interceptor.CommandExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -39,13 +37,7 @@ public static void main(String[] args) {
AppEngine cmmnEngine = AppEngineConfiguration.createAppEngineConfigurationFromInputStream(inputStream).buildAppEngine();
CommandExecutor commandExecutor = cmmnEngine.getAppEngineConfiguration().getCommandExecutor();
CommandConfig config = new CommandConfig().transactionNotSupported();
- commandExecutor.execute(config, new Command<>() {
- @Override
- public Object execute(CommandContext commandContext) {
- CommandContextUtil.getAppEngineConfiguration(commandContext).getSchemaManager().schemaDrop();
- return null;
- }
- });
+ commandExecutor.execute(config, new SchemaOperationsEngineDropDbCmd(cmmnEngine.getAppEngineConfiguration().getEngineScopeType()));
} catch (IOException e) {
LOGGER.error("Could not create App engine", e);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.db2.create.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.db2.create.app.sql
new file mode 100644
index 00000000000..a073f293d1a
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.db2.create.app.sql
@@ -0,0 +1,18 @@
+CREATE TABLE ACT_APP_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), KEY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_APP_DEPLOY PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_APP_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_APP_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_APP_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_RSRC_DPL ON ACT_APP_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_APP_APPDEF (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ INTEGER NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_APP_APPDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_APPDEF ADD CONSTRAINT ACT_FK_APP_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
+
+CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('app.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.h2.create.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.h2.create.app.sql
new file mode 100644
index 00000000000..e569bfd4bb5
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.h2.create.app.sql
@@ -0,0 +1,18 @@
+CREATE TABLE ACT_APP_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), KEY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_APP_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_APP_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_APP_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_APP_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_RSRC_DPL ON ACT_APP_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_APP_APPDEF (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ INT NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_APP_APPDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_APPDEF ADD CONSTRAINT ACT_FK_APP_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
+
+CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('app.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.mssql.create.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.mssql.create.app.sql
new file mode 100644
index 00000000000..96b04c6d745
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.mssql.create.app.sql
@@ -0,0 +1,18 @@
+CREATE TABLE ACT_APP_DEPLOYMENT (ID_ varchar(255) NOT NULL, NAME_ varchar(255), CATEGORY_ varchar(255), KEY_ varchar(255), DEPLOY_TIME_ datetime, TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_APP_DEPLOYMENT_TENANT_ID_ DEFAULT '', CONSTRAINT PK_ACT_APP_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_APP_DEPLOYMENT_RESOURCE (ID_ varchar(255) NOT NULL, NAME_ varchar(255), DEPLOYMENT_ID_ varchar(255), RESOURCE_BYTES_ varbinary(MAX), CONSTRAINT PK_APP_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_APP_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_APP_RSRC_DPL ON ACT_APP_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_APP_APPDEF (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, NAME_ varchar(255), KEY_ varchar(255) NOT NULL, VERSION_ int NOT NULL, CATEGORY_ varchar(255), DEPLOYMENT_ID_ varchar(255), RESOURCE_NAME_ varchar(4000), DESCRIPTION_ varchar(4000), TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_APP_APPDEF_TENANT_ID_ DEFAULT '', CONSTRAINT PK_ACT_APP_APPDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_APPDEF ADD CONSTRAINT ACT_FK_APP_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
+
+CREATE UNIQUE NONCLUSTERED INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('app.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.mysql.create.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.mysql.create.app.sql
new file mode 100644
index 00000000000..008baf25d54
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.mysql.create.app.sql
@@ -0,0 +1,20 @@
+CREATE TABLE ACT_APP_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, KEY_ VARCHAR(255) NULL, DEPLOY_TIME_ datetime NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_APP_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_APP_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, RESOURCE_BYTES_ LONGBLOB NULL, CONSTRAINT PK_APP_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_APP_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_RSRC_DPL ON ACT_APP_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_APP_APPDEF (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NULL, KEY_ VARCHAR(255) NOT NULL, VERSION_ INT NOT NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, RESOURCE_NAME_ VARCHAR(4000) NULL, DESCRIPTION_ VARCHAR(4000) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_APP_APPDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_APPDEF ADD CONSTRAINT ACT_FK_APP_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
+
+ALTER TABLE ACT_APP_DEPLOYMENT MODIFY DEPLOY_TIME_ datetime(3);
+
+CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('app.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.oracle.create.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.oracle.create.app.sql
new file mode 100644
index 00000000000..f6ff143894c
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.oracle.create.app.sql
@@ -0,0 +1,18 @@
+CREATE TABLE ACT_APP_DEPLOYMENT (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), KEY_ VARCHAR2(255), DEPLOY_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_APP_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_APP_DEPLOYMENT_RESOURCE (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_APP_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_APP_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_RSRC_DPL ON ACT_APP_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_APP_APPDEF (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR2(255), KEY_ VARCHAR2(255) NOT NULL, VERSION_ INTEGER NOT NULL, CATEGORY_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), RESOURCE_NAME_ VARCHAR2(4000), DESCRIPTION_ VARCHAR2(4000), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_APP_APPDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_APPDEF ADD CONSTRAINT ACT_FK_APP_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
+
+CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('app.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.postgres.create.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.postgres.create.app.sql
new file mode 100644
index 00000000000..c591e253c20
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/create/flowable.postgres.create.app.sql
@@ -0,0 +1,18 @@
+CREATE TABLE ACT_APP_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), KEY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP WITHOUT TIME ZONE, TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT "ACT_APP_DEPLOYMENT_pkey" PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_APP_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BYTEA, CONSTRAINT PK_APP_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_APP_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_RSRC_DPL ON ACT_APP_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_APP_APPDEF (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ INTEGER NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT "ACT_APP_APPDEF_pkey" PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_APPDEF ADD CONSTRAINT ACT_FK_APP_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
+
+CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('app.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/liquibase/flowable-app-db-changelog.xml b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/liquibase/flowable-app-db-changelog.xml
deleted file mode 100644
index ded278eceea..00000000000
--- a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/liquibase/flowable-app-db-changelog.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.all.upgradestep.7100.to.7101.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.all.upgradestep.7100.to.7101.app.sql
new file mode 100644
index 00000000000..e06fb9c6585
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.all.upgradestep.7100.to.7101.app.sql
@@ -0,0 +1,5 @@
+insert into ACT_GE_PROPERTY
+values ('app.schema.version', '7.1.0.1', 1);
+
+drop table ACT_APP_DATABASECHANGELOG;
+drop table ACT_APP_DATABASECHANGELOGLOCK;
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.db2.upgradestep.6301.to.6310.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.db2.upgradestep.6301.to.6310.app.sql
new file mode 100644
index 00000000000..37c2141e0d1
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.db2.upgradestep.6301.to.6310.app.sql
@@ -0,0 +1,13 @@
+CREATE TABLE ACT_APP_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), KEY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_APP_DEPLOY PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_APP_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_APP_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_APP_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_RSRC_DPL ON ACT_APP_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_APP_APPDEF (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ INTEGER NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_APP_APPDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_APPDEF ADD CONSTRAINT ACT_FK_APP_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.db2.upgradestep.6412.to.6413.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.db2.upgradestep.6412.to.6413.app.sql
new file mode 100644
index 00000000000..7e274a76f87
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.db2.upgradestep.6412.to.6413.app.sql
@@ -0,0 +1 @@
+CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.h2.upgradestep.6301.to.6310.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.h2.upgradestep.6301.to.6310.app.sql
new file mode 100644
index 00000000000..44b1cc1dd2a
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.h2.upgradestep.6301.to.6310.app.sql
@@ -0,0 +1,13 @@
+CREATE TABLE ACT_APP_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), KEY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_APP_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_APP_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_APP_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_APP_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_RSRC_DPL ON ACT_APP_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_APP_APPDEF (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ INT NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_APP_APPDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_APPDEF ADD CONSTRAINT ACT_FK_APP_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.h2.upgradestep.6412.to.6413.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.h2.upgradestep.6412.to.6413.app.sql
new file mode 100644
index 00000000000..7e274a76f87
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.h2.upgradestep.6412.to.6413.app.sql
@@ -0,0 +1 @@
+CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mssql.upgradestep.6301.to.6310.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mssql.upgradestep.6301.to.6310.app.sql
new file mode 100644
index 00000000000..60c3d9abe81
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mssql.upgradestep.6301.to.6310.app.sql
@@ -0,0 +1,13 @@
+CREATE TABLE ACT_APP_DEPLOYMENT (ID_ varchar(255) NOT NULL, NAME_ varchar(255), CATEGORY_ varchar(255), KEY_ varchar(255), DEPLOY_TIME_ datetime, TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_APP_DEPLOYMENT_TENANT_ID_ DEFAULT '', CONSTRAINT PK_ACT_APP_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_APP_DEPLOYMENT_RESOURCE (ID_ varchar(255) NOT NULL, NAME_ varchar(255), DEPLOYMENT_ID_ varchar(255), RESOURCE_BYTES_ varbinary(MAX), CONSTRAINT PK_APP_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_APP_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_APP_RSRC_DPL ON ACT_APP_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_APP_APPDEF (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, NAME_ varchar(255), KEY_ varchar(255) NOT NULL, VERSION_ int NOT NULL, CATEGORY_ varchar(255), DEPLOYMENT_ID_ varchar(255), RESOURCE_NAME_ varchar(4000), DESCRIPTION_ varchar(4000), TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_APP_APPDEF_TENANT_ID_ DEFAULT '', CONSTRAINT PK_ACT_APP_APPDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_APPDEF ADD CONSTRAINT ACT_FK_APP_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mssql.upgradestep.6412.to.6413.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mssql.upgradestep.6412.to.6413.app.sql
new file mode 100644
index 00000000000..4528bad72fc
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mssql.upgradestep.6412.to.6413.app.sql
@@ -0,0 +1 @@
+CREATE UNIQUE NONCLUSTERED INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mysql.upgradestep.6301.to.6310.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mysql.upgradestep.6301.to.6310.app.sql
new file mode 100644
index 00000000000..4a271e06f98
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mysql.upgradestep.6301.to.6310.app.sql
@@ -0,0 +1,13 @@
+CREATE TABLE ACT_APP_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, KEY_ VARCHAR(255) NULL, DEPLOY_TIME_ datetime NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_APP_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_APP_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, RESOURCE_BYTES_ LONGBLOB NULL, CONSTRAINT PK_APP_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_APP_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_RSRC_DPL ON ACT_APP_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_APP_APPDEF (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NULL, KEY_ VARCHAR(255) NOT NULL, VERSION_ INT NOT NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, RESOURCE_NAME_ VARCHAR(4000) NULL, DESCRIPTION_ VARCHAR(4000) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_APP_APPDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_APPDEF ADD CONSTRAINT ACT_FK_APP_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mysql.upgradestep.6320.to.6400.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mysql.upgradestep.6320.to.6400.app.sql
new file mode 100644
index 00000000000..12c23a4c5bb
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mysql.upgradestep.6320.to.6400.app.sql
@@ -0,0 +1 @@
+ALTER TABLE ACT_APP_DEPLOYMENT MODIFY DEPLOY_TIME_ datetime(3);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mysql.upgradestep.6412.to.6413.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mysql.upgradestep.6412.to.6413.app.sql
new file mode 100644
index 00000000000..7e274a76f87
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.mysql.upgradestep.6412.to.6413.app.sql
@@ -0,0 +1 @@
+CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.oracle.upgradestep.6301.to.6310.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.oracle.upgradestep.6301.to.6310.app.sql
new file mode 100644
index 00000000000..fce61aec53b
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.oracle.upgradestep.6301.to.6310.app.sql
@@ -0,0 +1,13 @@
+CREATE TABLE ACT_APP_DEPLOYMENT (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), KEY_ VARCHAR2(255), DEPLOY_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_APP_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_APP_DEPLOYMENT_RESOURCE (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_APP_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_APP_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_RSRC_DPL ON ACT_APP_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_APP_APPDEF (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR2(255), KEY_ VARCHAR2(255) NOT NULL, VERSION_ INTEGER NOT NULL, CATEGORY_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), RESOURCE_NAME_ VARCHAR2(4000), DESCRIPTION_ VARCHAR2(4000), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_APP_APPDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_APPDEF ADD CONSTRAINT ACT_FK_APP_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.oracle.upgradestep.6412.to.6413.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.oracle.upgradestep.6412.to.6413.app.sql
new file mode 100644
index 00000000000..7e274a76f87
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.oracle.upgradestep.6412.to.6413.app.sql
@@ -0,0 +1 @@
+CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.postgres.upgradestep.6301.to.6310.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.postgres.upgradestep.6301.to.6310.app.sql
new file mode 100644
index 00000000000..6b5f6f3854d
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.postgres.upgradestep.6301.to.6310.app.sql
@@ -0,0 +1,13 @@
+CREATE TABLE ACT_APP_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), KEY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP WITHOUT TIME ZONE, TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT "ACT_APP_DEPLOYMENT_pkey" PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_APP_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BYTEA, CONSTRAINT PK_APP_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_APP_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_RSRC_DPL ON ACT_APP_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_APP_APPDEF (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ INTEGER NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT "ACT_APP_APPDEF_pkey" PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_APP_APPDEF ADD CONSTRAINT ACT_FK_APP_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_APP_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_APP_DEF_DPLY ON ACT_APP_APPDEF(DEPLOYMENT_ID_);
diff --git a/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.postgres.upgradestep.6412.to.6413.app.sql b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.postgres.upgradestep.6412.to.6413.app.sql
new file mode 100644
index 00000000000..7e274a76f87
--- /dev/null
+++ b/modules/flowable-app-engine/src/main/resources/org/flowable/app/db/upgrade/flowable.postgres.upgradestep.6412.to.6413.app.sql
@@ -0,0 +1 @@
+CREATE UNIQUE INDEX ACT_IDX_APP_DEF_UNIQ ON ACT_APP_APPDEF(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationTest.java b/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationTest.java
index 4a192f4444a..b505890bbc7 100644
--- a/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationTest.java
+++ b/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationTest.java
@@ -57,7 +57,6 @@ public void contextShouldLoadPropertiesInACorrectOrder() {
"class path resource [engine.properties]",
"Config resource 'class path resource [application.properties]' via location 'optional:classpath:/'",
"flowableDefaultConfig: [classpath:/flowable-default.properties]",
- "flowable-liquibase-override",
"Management Server"
);
diff --git a/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledJmsKafkaAndRabbitTest.java b/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledJmsKafkaAndRabbitTest.java
index 0887ced4261..4ad4e0b0e28 100644
--- a/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledJmsKafkaAndRabbitTest.java
+++ b/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledJmsKafkaAndRabbitTest.java
@@ -62,7 +62,6 @@ public void contextShouldLoad() {
"class path resource [engine.properties]",
"Config resource 'class path resource [application.properties]' via location 'optional:classpath:/'",
"flowableDefaultConfig: [classpath:/flowable-default.properties]",
- "flowable-liquibase-override",
"Management Server"
);
diff --git a/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledJmsTest.java b/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledJmsTest.java
index 6d36542a3db..df08201532c 100644
--- a/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledJmsTest.java
+++ b/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledJmsTest.java
@@ -58,7 +58,6 @@ public void contextShouldLoad() {
"class path resource [engine.properties]",
"Config resource 'class path resource [application.properties]' via location 'optional:classpath:/'",
"flowableDefaultConfig: [classpath:/flowable-default.properties]",
- "flowable-liquibase-override",
"Management Server"
);
diff --git a/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledKafkaTest.java b/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledKafkaTest.java
index ccea1c1e8d3..ae042e40c5c 100644
--- a/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledKafkaTest.java
+++ b/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledKafkaTest.java
@@ -58,7 +58,6 @@ public void contextShouldLoad() {
"class path resource [engine.properties]",
"Config resource 'class path resource [application.properties]' via location 'optional:classpath:/'",
"flowableDefaultConfig: [classpath:/flowable-default.properties]",
- "flowable-liquibase-override",
"Management Server"
);
diff --git a/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledRabbitTest.java b/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledRabbitTest.java
index 92450d97a8f..bd8df236b27 100644
--- a/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledRabbitTest.java
+++ b/modules/flowable-app-rest/src/test/java/org/flowable/rest/app/FlowableRestApplicationWithEnabledRabbitTest.java
@@ -58,7 +58,6 @@ public void contextShouldLoad() {
"class path resource [engine.properties]",
"Config resource 'class path resource [application.properties]' via location 'optional:classpath:/'",
"flowableDefaultConfig: [classpath:/flowable-default.properties]",
- "flowable-liquibase-override",
"Management Server"
);
diff --git a/modules/flowable-batch-service/src/main/java/org/flowable/batch/service/impl/db/BatchDbSchemaManager.java b/modules/flowable-batch-service/src/main/java/org/flowable/batch/service/impl/db/BatchDbSchemaManager.java
deleted file mode 100644
index 06a3195afca..00000000000
--- a/modules/flowable-batch-service/src/main/java/org/flowable/batch/service/impl/db/BatchDbSchemaManager.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.flowable.batch.service.impl.db;
-
-import org.flowable.common.engine.impl.db.ServiceSqlScriptBasedDbSchemaManager;
-
-/**
- * @author Tijs Rademakers
- */
-public class BatchDbSchemaManager extends ServiceSqlScriptBasedDbSchemaManager {
-
- private static final String TABLE = "FLW_RU_BATCH";
- private static final String VERSION_PROPERTY = "batch.schema.version";
- private static final String SCHEMA_COMPONENT = "batch";
-
- public BatchDbSchemaManager() {
- super(TABLE, SCHEMA_COMPONENT, null, VERSION_PROPERTY);
- }
-
- @Override
- protected String getResourcesRootDirectory() {
- return "org/flowable/batch/service/db/";
- }
-
-}
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.cockroachdb.create.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.cockroachdb.create.batch.sql
deleted file mode 100644
index bd0be2a75c8..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.cockroachdb.create.batch.sql
+++ /dev/null
@@ -1,42 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ varchar(64) not null,
- REV_ integer,
- TYPE_ varchar(64) not null,
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- BATCH_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table FLW_RU_BATCH_PART (
- ID_ varchar(64) not null,
- REV_ integer,
- BATCH_ID_ varchar(64),
- TYPE_ varchar(64) not null,
- SCOPE_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_TYPE_ varchar(64),
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- RESULT_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '7.1.0.0', 1);
-
--- force-commit
\ No newline at end of file
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.db2.create.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.db2.create.batch.sql
deleted file mode 100644
index 9dd57b7d73f..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.db2.create.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ varchar(64) not null,
- REV_ integer,
- TYPE_ varchar(64) not null,
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- BATCH_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table FLW_RU_BATCH_PART (
- ID_ varchar(64) not null,
- REV_ integer,
- BATCH_ID_ varchar(64),
- TYPE_ varchar(64) not null,
- SCOPE_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_TYPE_ varchar(64),
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- RESULT_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.h2.create.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.h2.create.batch.sql
deleted file mode 100644
index 9dd57b7d73f..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.h2.create.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ varchar(64) not null,
- REV_ integer,
- TYPE_ varchar(64) not null,
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- BATCH_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table FLW_RU_BATCH_PART (
- ID_ varchar(64) not null,
- REV_ integer,
- BATCH_ID_ varchar(64),
- TYPE_ varchar(64) not null,
- SCOPE_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_TYPE_ varchar(64),
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- RESULT_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.hsql.create.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.hsql.create.batch.sql
deleted file mode 100644
index 9dd57b7d73f..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.hsql.create.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ varchar(64) not null,
- REV_ integer,
- TYPE_ varchar(64) not null,
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- BATCH_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table FLW_RU_BATCH_PART (
- ID_ varchar(64) not null,
- REV_ integer,
- BATCH_ID_ varchar(64),
- TYPE_ varchar(64) not null,
- SCOPE_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_TYPE_ varchar(64),
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- RESULT_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.mssql.create.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.mssql.create.batch.sql
deleted file mode 100644
index c17d50cab44..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.mssql.create.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ nvarchar(64) not null,
- REV_ int,
- TYPE_ nvarchar(64) not null,
- SEARCH_KEY_ nvarchar(255),
- SEARCH_KEY2_ nvarchar(255),
- CREATE_TIME_ datetime not null,
- COMPLETE_TIME_ datetime,
- STATUS_ nvarchar(255),
- BATCH_DOC_ID_ nvarchar(64),
- TENANT_ID_ nvarchar(255) default '',
- primary key (ID_)
-);
-
-create table FLW_RU_BATCH_PART (
- ID_ nvarchar(64) not null,
- REV_ int,
- BATCH_ID_ nvarchar(64),
- TYPE_ nvarchar(64) not null,
- SCOPE_ID_ nvarchar(64),
- SUB_SCOPE_ID_ nvarchar(64),
- SCOPE_TYPE_ nvarchar(64),
- SEARCH_KEY_ nvarchar(255),
- SEARCH_KEY2_ nvarchar(255),
- CREATE_TIME_ datetime not null,
- COMPLETE_TIME_ datetime,
- STATUS_ nvarchar(255),
- RESULT_DOC_ID_ nvarchar(64),
- TENANT_ID_ nvarchar(255) default '',
- primary key (ID_)
-);
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.mysql.create.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.mysql.create.batch.sql
deleted file mode 100644
index d0d65d77073..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.mysql.create.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ varchar(64) not null,
- REV_ integer,
- TYPE_ varchar(64) not null,
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ datetime(3) not null,
- COMPLETE_TIME_ datetime(3),
- STATUS_ varchar(255),
- BATCH_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table FLW_RU_BATCH_PART (
- ID_ varchar(64) not null,
- REV_ integer,
- BATCH_ID_ varchar(64),
- TYPE_ varchar(64) not null,
- SCOPE_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_TYPE_ varchar(64),
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ datetime(3) not null,
- COMPLETE_TIME_ datetime(3),
- STATUS_ varchar(255),
- RESULT_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.mysql55.create.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.mysql55.create.batch.sql
deleted file mode 100644
index 82104a0e750..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.mysql55.create.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ varchar(64) not null,
- REV_ integer,
- TYPE_ varchar(64) not null,
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ datetime not null,
- COMPLETE_TIME_ datetime,
- STATUS_ varchar(255),
- BATCH_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table FLW_RU_BATCH_PART (
- ID_ varchar(64) not null,
- REV_ integer,
- BATCH_ID_ varchar(64),
- TYPE_ varchar(64) not null,
- SCOPE_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_TYPE_ varchar(64),
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ datetime not null,
- COMPLETE_TIME_ datetime,
- STATUS_ varchar(255),
- RESULT_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.oracle.create.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.oracle.create.batch.sql
deleted file mode 100644
index 61979b31580..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.oracle.create.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ NVARCHAR2(64) not null,
- REV_ INTEGER,
- TYPE_ NVARCHAR2(64) not null,
- SEARCH_KEY_ NVARCHAR2(255),
- SEARCH_KEY2_ NVARCHAR2(255),
- CREATE_TIME_ TIMESTAMP(6) not null,
- COMPLETE_TIME_ TIMESTAMP(6),
- STATUS_ NVARCHAR2(255),
- BATCH_DOC_ID_ NVARCHAR2(64),
- TENANT_ID_ NVARCHAR2(255) default '',
- primary key (ID_)
-);
-
-create table FLW_RU_BATCH_PART (
- ID_ NVARCHAR2(64) not null,
- REV_ INTEGER,
- BATCH_ID_ NVARCHAR2(64),
- TYPE_ NVARCHAR2(64) not null,
- SCOPE_ID_ NVARCHAR2(64),
- SUB_SCOPE_ID_ NVARCHAR2(64),
- SCOPE_TYPE_ NVARCHAR2(64),
- SEARCH_KEY_ NVARCHAR2(255),
- SEARCH_KEY2_ NVARCHAR2(255),
- CREATE_TIME_ TIMESTAMP(6) not null,
- COMPLETE_TIME_ TIMESTAMP(6),
- STATUS_ NVARCHAR2(255),
- RESULT_DOC_ID_ NVARCHAR2(64),
- TENANT_ID_ NVARCHAR2(255) default '',
- primary key (ID_)
-);
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.postgres.create.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.postgres.create.batch.sql
deleted file mode 100644
index 9dd57b7d73f..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/create/flowable.postgres.create.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ varchar(64) not null,
- REV_ integer,
- TYPE_ varchar(64) not null,
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- BATCH_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table FLW_RU_BATCH_PART (
- ID_ varchar(64) not null,
- REV_ integer,
- BATCH_ID_ varchar(64),
- TYPE_ varchar(64) not null,
- SCOPE_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_TYPE_ varchar(64),
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- RESULT_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.cockroachdb.drop.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.cockroachdb.drop.batch.sql
deleted file mode 100644
index 7ef35633e9e..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.cockroachdb.drop.batch.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-drop table if exists flw_ru_batch_part cascade;
-drop table if exists flw_ru_batch cascade;
-
--- force-commit
\ No newline at end of file
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.db2.drop.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.db2.drop.batch.sql
deleted file mode 100644
index 52f5777152f..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.db2.drop.batch.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-drop index FLW_IDX_BATCH_PART;
-
-drop table FLW_RU_BATCH_PART;
-drop table FLW_RU_BATCH;
\ No newline at end of file
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.h2.drop.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.h2.drop.batch.sql
deleted file mode 100644
index 10c7f7a32a5..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.h2.drop.batch.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-drop table if exists FLW_RU_BATCH_PART cascade constraints;
-drop table if exists FLW_RU_BATCH cascade constraints;
-
-drop index if exists FLW_IDX_BATCH_PART;
\ No newline at end of file
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.hsql.drop.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.hsql.drop.batch.sql
deleted file mode 100644
index 10c7f7a32a5..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.hsql.drop.batch.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-drop table if exists FLW_RU_BATCH_PART cascade constraints;
-drop table if exists FLW_RU_BATCH cascade constraints;
-
-drop index if exists FLW_IDX_BATCH_PART;
\ No newline at end of file
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.mssql.drop.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.mssql.drop.batch.sql
deleted file mode 100644
index ff0d60881df..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.mssql.drop.batch.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'FLW_IDX_BATCH_PART') drop index FLW_RU_BATCH_PART.FLW_IDX_BATCH_PART;
-
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'FLW_RU_BATCH_PART') drop table FLW_RU_BATCH_PART;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'FLW_RU_BATCH') drop table FLW_RU_BATCH;
\ No newline at end of file
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.mysql.drop.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.mysql.drop.batch.sql
deleted file mode 100644
index 14e8e22dcdf..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.mysql.drop.batch.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-drop index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART;
-
-drop table if exists FLW_RU_BATCH_PART;
-drop table if exists FLW_RU_BATCH;
\ No newline at end of file
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.oracle.drop.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.oracle.drop.batch.sql
deleted file mode 100644
index 52f5777152f..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.oracle.drop.batch.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-drop index FLW_IDX_BATCH_PART;
-
-drop table FLW_RU_BATCH_PART;
-drop table FLW_RU_BATCH;
\ No newline at end of file
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.postgres.drop.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.postgres.drop.batch.sql
deleted file mode 100644
index 9424b70e474..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/drop/flowable.postgres.drop.batch.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-drop table if exists FLW_RU_BATCH_PART cascade;
-drop table if exists FLW_RU_BATCH cascade;
\ No newline at end of file
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6502.to.6503.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6502.to.6503.batch.sql
deleted file mode 100644
index 6d3a49c7647..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6502.to.6503.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.3' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6503.to.6504.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6503.to.6504.batch.sql
deleted file mode 100644
index 9a5b3dfb074..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6503.to.6504.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.4' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6504.to.6505.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6504.to.6505.batch.sql
deleted file mode 100644
index 0e5e73ea1ad..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6504.to.6505.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.5' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6505.to.6506.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6505.to.6506.batch.sql
deleted file mode 100644
index 97d69d430ca..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6505.to.6506.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.6' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6506.to.6510.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6506.to.6510.batch.sql
deleted file mode 100644
index 076c40d9dfe..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6506.to.6510.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.0' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6510.to.6511.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6510.to.6511.batch.sql
deleted file mode 100644
index 341d24ddd41..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6510.to.6511.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.1' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6511.to.6512.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6511.to.6512.batch.sql
deleted file mode 100644
index 09aa935d50f..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6511.to.6512.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.2' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6512.to.6513.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6512.to.6513.batch.sql
deleted file mode 100644
index dd41663c4fe..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6512.to.6513.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.3' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6513.to.6514.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6513.to.6514.batch.sql
deleted file mode 100644
index cdb07c37d8f..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6513.to.6514.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.4' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6514.to.6515.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6514.to.6515.batch.sql
deleted file mode 100644
index 504719191fc..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6514.to.6515.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.5' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6515.to.6516.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6515.to.6516.batch.sql
deleted file mode 100644
index c2346637fda..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6515.to.6516.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.6' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6516.to.6600.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6516.to.6600.batch.sql
deleted file mode 100644
index 837e02088d0..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6516.to.6600.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.0.0' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6600.to.6601.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6600.to.6601.batch.sql
deleted file mode 100644
index da8fde93de4..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6600.to.6601.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.0.1' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6601.to.6610.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6601.to.6610.batch.sql
deleted file mode 100644
index 4e00e00bee5..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6601.to.6610.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.1.0' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6610.to.6620.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6610.to.6620.batch.sql
deleted file mode 100644
index 7a8365a802f..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6610.to.6620.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.2.0' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6620.to.6621.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6620.to.6621.batch.sql
deleted file mode 100644
index b9cdb2becc3..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6620.to.6621.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.2.1' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6621.to.6700.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6621.to.6700.batch.sql
deleted file mode 100644
index 3f815e8f5d1..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6621.to.6700.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.0.0' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6700.to.6701.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6700.to.6701.batch.sql
deleted file mode 100644
index d4e6b3e2090..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6700.to.6701.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.0.1' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6701.to.6710.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6701.to.6710.batch.sql
deleted file mode 100644
index 0de68c02e2a..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6701.to.6710.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.1.0' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6710.to.6720.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6710.to.6720.batch.sql
deleted file mode 100644
index f17787f4654..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6710.to.6720.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.0' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6720.to.6721.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6720.to.6721.batch.sql
deleted file mode 100644
index 5f515678da5..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6720.to.6721.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.1' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6721.to.6722.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6721.to.6722.batch.sql
deleted file mode 100644
index 705d49909e8..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6721.to.6722.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.2' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6722.to.6723.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6722.to.6723.batch.sql
deleted file mode 100644
index 2453667ba45..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6722.to.6723.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.3' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6723.to.6800.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6723.to.6800.batch.sql
deleted file mode 100644
index ae11356130b..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6723.to.6800.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.8.0.0' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6800.to.6810.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6800.to.6810.batch.sql
deleted file mode 100644
index a1fb019cbd1..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6800.to.6810.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.8.1.0' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6810.to.7000.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6810.to.7000.batch.sql
deleted file mode 100644
index cd69c861ba9..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.6810.to.7000.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.0.0.0' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.7000.to.7010.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.7000.to.7010.batch.sql
deleted file mode 100644
index 4aed409f55b..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.7000.to.7010.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.0' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.7010.to.7011.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.7010.to.7011.batch.sql
deleted file mode 100644
index c5e88d32d92..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.7010.to.7011.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.1' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.7011.to.7100.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.7011.to.7100.batch.sql
deleted file mode 100644
index f1581a24866..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.all.upgradestep.7011.to.7100.batch.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.1.0.0' where NAME_ = 'batch.schema.version';
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.db2.upgradestep.6501.to.6502.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.db2.upgradestep.6501.to.6502.batch.sql
deleted file mode 100644
index edaa99467f1..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.db2.upgradestep.6501.to.6502.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ varchar(64) not null,
- REV_ integer,
- TYPE_ varchar(64) not null,
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- BATCH_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table FLW_RU_BATCH_PART (
- ID_ varchar(64) not null,
- REV_ integer,
- BATCH_ID_ varchar(64),
- TYPE_ varchar(64) not null,
- SCOPE_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_TYPE_ varchar(64),
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- RESULT_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '6.5.0.2', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.h2.upgradestep.6501.to.6502.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.h2.upgradestep.6501.to.6502.batch.sql
deleted file mode 100644
index edaa99467f1..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.h2.upgradestep.6501.to.6502.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ varchar(64) not null,
- REV_ integer,
- TYPE_ varchar(64) not null,
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- BATCH_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table FLW_RU_BATCH_PART (
- ID_ varchar(64) not null,
- REV_ integer,
- BATCH_ID_ varchar(64),
- TYPE_ varchar(64) not null,
- SCOPE_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_TYPE_ varchar(64),
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- RESULT_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '6.5.0.2', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.hsql.upgradestep.6501.to.6502.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.hsql.upgradestep.6501.to.6502.batch.sql
deleted file mode 100644
index edaa99467f1..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.hsql.upgradestep.6501.to.6502.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ varchar(64) not null,
- REV_ integer,
- TYPE_ varchar(64) not null,
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- BATCH_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table FLW_RU_BATCH_PART (
- ID_ varchar(64) not null,
- REV_ integer,
- BATCH_ID_ varchar(64),
- TYPE_ varchar(64) not null,
- SCOPE_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_TYPE_ varchar(64),
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- RESULT_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '6.5.0.2', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.mssql.upgradestep.6501.to.6502.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.mssql.upgradestep.6501.to.6502.batch.sql
deleted file mode 100644
index 262e50e817a..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.mssql.upgradestep.6501.to.6502.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ nvarchar(64) not null,
- REV_ int,
- TYPE_ nvarchar(64) not null,
- SEARCH_KEY_ nvarchar(255),
- SEARCH_KEY2_ nvarchar(255),
- CREATE_TIME_ datetime not null,
- COMPLETE_TIME_ datetime,
- STATUS_ nvarchar(255),
- BATCH_DOC_ID_ nvarchar(64),
- TENANT_ID_ nvarchar(255) default '',
- primary key (ID_)
-);
-
-create table FLW_RU_BATCH_PART (
- ID_ nvarchar(64) not null,
- REV_ int,
- BATCH_ID_ nvarchar(64),
- TYPE_ nvarchar(64) not null,
- SCOPE_ID_ nvarchar(64),
- SUB_SCOPE_ID_ nvarchar(64),
- SCOPE_TYPE_ nvarchar(64),
- SEARCH_KEY_ nvarchar(255),
- SEARCH_KEY2_ nvarchar(255),
- CREATE_TIME_ datetime not null,
- COMPLETE_TIME_ datetime,
- STATUS_ nvarchar(255),
- RESULT_DOC_ID_ nvarchar(64),
- TENANT_ID_ nvarchar(255) default '',
- primary key (ID_)
-);
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '6.5.0.2', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.mysql.upgradestep.6501.to.6502.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.mysql.upgradestep.6501.to.6502.batch.sql
deleted file mode 100644
index afa523a0789..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.mysql.upgradestep.6501.to.6502.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ varchar(64) not null,
- REV_ integer,
- TYPE_ varchar(64) not null,
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ datetime(3) not null,
- COMPLETE_TIME_ datetime(3),
- STATUS_ varchar(255),
- BATCH_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table FLW_RU_BATCH_PART (
- ID_ varchar(64) not null,
- REV_ integer,
- BATCH_ID_ varchar(64),
- TYPE_ varchar(64) not null,
- SCOPE_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_TYPE_ varchar(64),
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ datetime(3) not null,
- COMPLETE_TIME_ datetime(3),
- STATUS_ varchar(255),
- RESULT_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '6.5.0.2', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.mysql55.upgradestep.6501.to.6502.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.mysql55.upgradestep.6501.to.6502.batch.sql
deleted file mode 100644
index 4505546588e..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.mysql55.upgradestep.6501.to.6502.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ varchar(64) not null,
- REV_ integer,
- TYPE_ varchar(64) not null,
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ datetime not null,
- COMPLETE_TIME_ datetime,
- STATUS_ varchar(255),
- BATCH_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table FLW_RU_BATCH_PART (
- ID_ varchar(64) not null,
- REV_ integer,
- BATCH_ID_ varchar(64),
- TYPE_ varchar(64) not null,
- SCOPE_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_TYPE_ varchar(64),
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ datetime not null,
- COMPLETE_TIME_ datetime,
- STATUS_ varchar(255),
- RESULT_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '6.5.0.2', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.oracle.upgradestep.6501.to.6502.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.oracle.upgradestep.6501.to.6502.batch.sql
deleted file mode 100644
index 816e585b847..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.oracle.upgradestep.6501.to.6502.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ NVARCHAR2(64) not null,
- REV_ INTEGER,
- TYPE_ NVARCHAR2(64) not null,
- SEARCH_KEY_ NVARCHAR2(255),
- SEARCH_KEY2_ NVARCHAR2(255),
- CREATE_TIME_ TIMESTAMP(6) not null,
- COMPLETE_TIME_ TIMESTAMP(6),
- STATUS_ NVARCHAR2(255),
- BATCH_DOC_ID_ NVARCHAR2(64),
- TENANT_ID_ NVARCHAR2(255) default '',
- primary key (ID_)
-);
-
-create table FLW_RU_BATCH_PART (
- ID_ NVARCHAR2(64) not null,
- REV_ INTEGER,
- BATCH_ID_ NVARCHAR2(64),
- TYPE_ NVARCHAR2(64) not null,
- SCOPE_ID_ NVARCHAR2(64),
- SUB_SCOPE_ID_ NVARCHAR2(64),
- SCOPE_TYPE_ NVARCHAR2(64),
- SEARCH_KEY_ NVARCHAR2(255),
- SEARCH_KEY2_ NVARCHAR2(255),
- CREATE_TIME_ TIMESTAMP(6) not null,
- COMPLETE_TIME_ TIMESTAMP(6),
- STATUS_ NVARCHAR2(255),
- RESULT_DOC_ID_ NVARCHAR2(64),
- TENANT_ID_ NVARCHAR2(255) default '',
- primary key (ID_)
-);
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '6.5.0.2', 1);
diff --git a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.postgres.upgradestep.6501.to.6502.batch.sql b/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.postgres.upgradestep.6501.to.6502.batch.sql
deleted file mode 100644
index edaa99467f1..00000000000
--- a/modules/flowable-batch-service/src/main/resources/org/flowable/batch/service/db/upgrade/flowable.postgres.upgradestep.6501.to.6502.batch.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-create table FLW_RU_BATCH (
- ID_ varchar(64) not null,
- REV_ integer,
- TYPE_ varchar(64) not null,
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- BATCH_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table FLW_RU_BATCH_PART (
- ID_ varchar(64) not null,
- REV_ integer,
- BATCH_ID_ varchar(64),
- TYPE_ varchar(64) not null,
- SCOPE_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_TYPE_ varchar(64),
- SEARCH_KEY_ varchar(255),
- SEARCH_KEY2_ varchar(255),
- CREATE_TIME_ timestamp not null,
- COMPLETE_TIME_ timestamp,
- STATUS_ varchar(255),
- RESULT_DOC_ID_ varchar(64),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
-
-alter table FLW_RU_BATCH_PART
- add constraint FLW_FK_BATCH_PART_PARENT
- foreign key (BATCH_ID_)
- references FLW_RU_BATCH (ID_);
-
-insert into ACT_GE_PROPERTY values ('batch.schema.version', '6.5.0.2', 1);
diff --git a/modules/flowable-cmmn-api/src/main/java/org/flowable/cmmn/api/CmmnManagementService.java b/modules/flowable-cmmn-api/src/main/java/org/flowable/cmmn/api/CmmnManagementService.java
index 00cf9ef98f5..2eadc362151 100644
--- a/modules/flowable-cmmn-api/src/main/java/org/flowable/cmmn/api/CmmnManagementService.java
+++ b/modules/flowable-cmmn-api/src/main/java/org/flowable/cmmn/api/CmmnManagementService.java
@@ -23,6 +23,7 @@
import org.flowable.batch.api.BatchQuery;
import org.flowable.cmmn.api.runtime.CmmnExternalWorkerTransitionBuilder;
import org.flowable.common.engine.api.FlowableObjectNotFoundException;
+import org.flowable.common.engine.api.lock.LockManager;
import org.flowable.common.engine.api.tenant.ChangeTenantIdBuilder;
import org.flowable.job.api.DeadLetterJobQuery;
import org.flowable.job.api.ExternalWorkerJobAcquireBuilder;
@@ -424,4 +425,16 @@ public interface CmmnManagementService {
* will be changed to the target tenant id.
*/
ChangeTenantIdBuilder createChangeTenantIdBuilder(String fromTenantId, String toTenantId);
+
+ /**
+ * Acquire a lock manager for the requested lock.
+ * This is a stateless call, this means that every time a lock manager
+ * is requested a new one would be created. Make sure that you release the lock
+ * once you are done.
+ *
+ * @param lockName the name of the lock that is being requested
+ *
+ * @return the lock manager for the given lock
+ */
+ LockManager getLockManager(String lockName);
}
diff --git a/modules/flowable-cmmn-engine-configurator/src/main/java/org/flowable/cmmn/engine/configurator/CmmnEngineConfigurator.java b/modules/flowable-cmmn-engine-configurator/src/main/java/org/flowable/cmmn/engine/configurator/CmmnEngineConfigurator.java
index d20cebafa4c..e9f8c26c5e1 100644
--- a/modules/flowable-cmmn-engine-configurator/src/main/java/org/flowable/cmmn/engine/configurator/CmmnEngineConfigurator.java
+++ b/modules/flowable-cmmn-engine-configurator/src/main/java/org/flowable/cmmn/engine/configurator/CmmnEngineConfigurator.java
@@ -41,7 +41,7 @@
/**
* @author Joram Barrez
*/
-public class CmmnEngineConfigurator extends AbstractEngineConfigurator {
+public class CmmnEngineConfigurator extends AbstractEngineConfigurator {
protected CmmnEngineConfiguration cmmnEngineConfiguration;
@@ -89,9 +89,7 @@ public void configure(AbstractEngineConfiguration engineConfiguration) {
}
- cmmnEngineConfiguration.setExecuteServiceSchemaManagers(false);
-
- initCmmnEngine();
+ initEngine();
if (processEngineConfiguration != null) {
cmmnEngineConfiguration.getJobServiceConfiguration().getInternalJobManager()
@@ -178,7 +176,8 @@ protected List> getEntityDeletionOrder() {
return EntityDependencyOrder.DELETE_ORDER;
}
- protected synchronized CmmnEngine initCmmnEngine() {
+ @Override
+ protected CmmnEngine buildEngine() {
if (cmmnEngineConfiguration == null) {
throw new FlowableException("CmmnEngineConfiguration is required");
}
diff --git a/modules/flowable-cmmn-engine-configurator/src/test/java/org/flowable/cmmn/test/DbSchemaDrop.java b/modules/flowable-cmmn-engine-configurator/src/test/java/org/flowable/cmmn/test/DbSchemaDrop.java
index 4fbc90c6a5e..d60044bfd64 100644
--- a/modules/flowable-cmmn-engine-configurator/src/test/java/org/flowable/cmmn/test/DbSchemaDrop.java
+++ b/modules/flowable-cmmn-engine-configurator/src/test/java/org/flowable/cmmn/test/DbSchemaDrop.java
@@ -12,13 +12,11 @@
*/
package org.flowable.cmmn.test;
-import org.flowable.common.engine.impl.interceptor.Command;
+import org.flowable.common.engine.impl.db.SchemaOperationsEngineDropDbCmd;
import org.flowable.common.engine.impl.interceptor.CommandConfig;
-import org.flowable.common.engine.impl.interceptor.CommandContext;
import org.flowable.common.engine.impl.interceptor.CommandExecutor;
import org.flowable.engine.ProcessEngines;
import org.flowable.engine.impl.ProcessEngineImpl;
-import org.flowable.engine.impl.util.CommandContextUtil;
/**
* @author Filip Hrisafov
@@ -29,14 +27,7 @@ public static void main(String[] args) {
ProcessEngineImpl processEngine = (ProcessEngineImpl) ProcessEngines.getDefaultProcessEngine();
CommandExecutor commandExecutor = processEngine.getProcessEngineConfiguration().getCommandExecutor();
CommandConfig config = new CommandConfig().transactionNotSupported();
- commandExecutor.execute(config, new Command<>() {
- @Override
- public Object execute(CommandContext commandContext) {
- CommandContextUtil.getProcessEngineConfiguration(commandContext).getSchemaManager().schemaDrop();
- org.flowable.cmmn.engine.impl.util.CommandContextUtil.getCmmnEngineConfiguration(commandContext).getSchemaManager().schemaDrop();
- return null;
- }
- });
+ commandExecutor.execute(config, new SchemaOperationsEngineDropDbCmd(processEngine.getProcessEngineConfiguration().getEngineScopeType()));
}
}
diff --git a/modules/flowable-cmmn-engine/pom.xml b/modules/flowable-cmmn-engine/pom.xml
index 25f3148bbae..38c504810f7 100644
--- a/modules/flowable-cmmn-engine/pom.xml
+++ b/modules/flowable-cmmn-engine/pom.xml
@@ -103,10 +103,6 @@
org.flowable
flowable-case-validation
-
- org.liquibase
- liquibase-core
-
com.fasterxml.uuid
java-uuid-generator
@@ -216,6 +212,8 @@
org.flowable.cmmn.engine
+ org.flowable.cmmn.db.create,
+ org.flowable.cmmn.db.upgrade,
org.flowable.cmmn.db.mapping.entity
diff --git a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/CmmnEngineConfiguration.java b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/CmmnEngineConfiguration.java
index 1700f48eb62..4733422fee3 100644
--- a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/CmmnEngineConfiguration.java
+++ b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/CmmnEngineConfiguration.java
@@ -24,6 +24,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
@@ -34,7 +35,6 @@
import org.apache.ibatis.session.Configuration;
import org.apache.ibatis.type.JdbcType;
import org.flowable.batch.service.BatchServiceConfiguration;
-import org.flowable.batch.service.impl.db.BatchDbSchemaManager;
import org.flowable.cmmn.api.CallbackTypes;
import org.flowable.cmmn.api.CandidateManager;
import org.flowable.cmmn.api.CmmnChangeTenantIdEntityTypes;
@@ -53,6 +53,7 @@
import org.flowable.cmmn.api.listener.PlanItemInstanceLifecycleListener;
import org.flowable.cmmn.api.migration.CaseInstanceMigrationCallback;
import org.flowable.cmmn.engine.impl.CmmnEngineImpl;
+import org.flowable.cmmn.engine.impl.CmmnEnginePostEngineBuildConsumer;
import org.flowable.cmmn.engine.impl.CmmnHistoryServiceImpl;
import org.flowable.cmmn.engine.impl.CmmnManagementServiceImpl;
import org.flowable.cmmn.engine.impl.CmmnRepositoryServiceImpl;
@@ -68,7 +69,6 @@
import org.flowable.cmmn.engine.impl.cfg.DelegateExpressionFieldInjectionMode;
import org.flowable.cmmn.engine.impl.cfg.StandaloneInMemCmmnEngineConfiguration;
import org.flowable.cmmn.engine.impl.cmd.JobRetryCmd;
-import org.flowable.cmmn.engine.impl.cmd.SchemaOperationsCmmnEngineBuild;
import org.flowable.cmmn.engine.impl.db.CmmnDbSchemaManager;
import org.flowable.cmmn.engine.impl.db.EntityDependencyOrder;
import org.flowable.cmmn.engine.impl.delegate.CmmnClassDelegateFactory;
@@ -206,6 +206,7 @@
import org.flowable.common.engine.api.async.AsyncTaskInvoker;
import org.flowable.common.engine.api.delegate.FlowableFunctionDelegate;
import org.flowable.common.engine.api.scope.ScopeTypes;
+import org.flowable.common.engine.impl.AbstractBuildableEngineConfiguration;
import org.flowable.common.engine.impl.AbstractEngineConfiguration;
import org.flowable.common.engine.impl.EngineConfigurator;
import org.flowable.common.engine.impl.EngineDeployer;
@@ -262,15 +263,12 @@
import org.flowable.common.engine.impl.variablelistener.VariableListenerSession;
import org.flowable.common.engine.impl.variablelistener.VariableListenerSessionFactory;
import org.flowable.entitylink.service.EntityLinkServiceConfiguration;
-import org.flowable.entitylink.service.impl.db.EntityLinkDbSchemaManager;
import org.flowable.eventregistry.api.EventRegistryEventConsumer;
import org.flowable.eventregistry.impl.configurator.EventRegistryEngineConfigurator;
import org.flowable.eventsubscription.service.EventSubscriptionServiceConfiguration;
-import org.flowable.eventsubscription.service.impl.db.EventSubscriptionDbSchemaManager;
import org.flowable.form.api.FormFieldHandler;
import org.flowable.identitylink.service.IdentityLinkEventHandler;
import org.flowable.identitylink.service.IdentityLinkServiceConfiguration;
-import org.flowable.identitylink.service.impl.db.IdentityLinkDbSchemaManager;
import org.flowable.idm.api.IdmEngineConfigurationApi;
import org.flowable.idm.api.IdmIdentityService;
import org.flowable.idm.engine.configurator.IdmEngineConfigurator;
@@ -288,7 +286,6 @@
import org.flowable.job.service.impl.asyncexecutor.ExecuteAsyncRunnableFactory;
import org.flowable.job.service.impl.asyncexecutor.FailedJobCommandFactory;
import org.flowable.job.service.impl.asyncexecutor.JobManager;
-import org.flowable.job.service.impl.db.JobDbSchemaManager;
import org.flowable.mail.common.api.client.FlowableMailClient;
import org.flowable.task.service.InternalTaskAssignmentManager;
import org.flowable.task.service.InternalTaskVariableScopeResolver;
@@ -296,14 +293,12 @@
import org.flowable.task.service.TaskServiceConfiguration;
import org.flowable.task.service.history.InternalHistoryTaskManager;
import org.flowable.task.service.impl.DefaultTaskPostProcessor;
-import org.flowable.task.service.impl.db.TaskDbSchemaManager;
import org.flowable.task.service.impl.persistence.entity.HistoricTaskLogEntryEntityImpl;
import org.flowable.variable.api.types.VariableType;
import org.flowable.variable.api.types.VariableTypes;
import org.flowable.variable.service.VariableServiceConfiguration;
import org.flowable.variable.service.history.InternalHistoryVariableManager;
import org.flowable.variable.service.impl.db.IbatisVariableTypeHandler;
-import org.flowable.variable.service.impl.db.VariableDbSchemaManager;
import org.flowable.variable.service.impl.types.BooleanType;
import org.flowable.variable.service.impl.types.ByteArrayType;
import org.flowable.variable.service.impl.types.DateType;
@@ -325,12 +320,11 @@
import org.flowable.variable.service.impl.types.StringType;
import org.flowable.variable.service.impl.types.UUIDType;
-public class CmmnEngineConfiguration extends AbstractEngineConfiguration implements CmmnEngineConfigurationApi,
+public class CmmnEngineConfiguration extends AbstractBuildableEngineConfiguration implements CmmnEngineConfigurationApi,
ScriptingEngineAwareEngineConfiguration, HasExpressionManagerEngineConfiguration, HasVariableTypes,
HasVariableServiceConfiguration {
public static final String DEFAULT_MYBATIS_MAPPING_FILE = "org/flowable/cmmn/db/mapping/mappings.xml";
- public static final String LIQUIBASE_CHANGELOG_PREFIX = "ACT_CMMN_";
protected String cmmnEngineName = CmmnEngines.NAME_DEFAULT;
@@ -396,8 +390,6 @@ public class CmmnEngineConfiguration extends AbstractEngineConfiguration impleme
protected ChangeTenantIdManager changeTenantIdManager;
protected Set changeTenantEntityTypes;
- protected boolean executeServiceSchemaManagers = true;
-
protected boolean enableSafeCmmnXml;
protected boolean disableCmmnXmlValidation;
protected CmmnActivityBehaviorFactory activityBehaviorFactory;
@@ -449,14 +441,6 @@ public class CmmnEngineConfiguration extends AbstractEngineConfiguration impleme
*/
protected DelegateExpressionFieldInjectionMode delegateExpressionFieldInjectionMode = DelegateExpressionFieldInjectionMode.MIXED;
- protected SchemaManager identityLinkSchemaManager;
- protected SchemaManager entityLinkSchemaManager;
- protected SchemaManager eventSubscriptionSchemaManager;
- protected SchemaManager variableSchemaManager;
- protected SchemaManager taskSchemaManager;
- protected SchemaManager jobSchemaManager;
- protected SchemaManager batchSchemaManager;
-
/**
* Case diagram generator. Default value is DefaultCaseDiagramGenerator
*/
@@ -710,16 +694,20 @@ public static CmmnEngineConfiguration createStandaloneInMemCmmnEngineConfigurati
}
public CmmnEngine buildCmmnEngine() {
- init();
- CmmnEngineImpl cmmnEngine = new CmmnEngineImpl(this);
+ return buildEngine();
+ }
- if (handleCmmnEngineExecutorsAfterEngineCreate) {
- cmmnEngine.startExecutors();
- }
+ @Override
+ protected CmmnEngine createEngine() {
+ return new CmmnEngineImpl(this);
+ }
- return cmmnEngine;
+ @Override
+ protected Consumer createPostEngineBuildConsumer() {
+ return new CmmnEnginePostEngineBuildConsumer();
}
+ @Override
protected void init() {
initEngineConfigurations();
initConfigurators();
@@ -810,79 +798,8 @@ public void initCaseDiagramGenerator() {
}
@Override
- public void initSchemaManager() {
- super.initSchemaManager();
- initCmmnSchemaManager();
-
- if (executeServiceSchemaManagers) {
- initIdentityLinkSchemaManager();
- initEntityLinkSchemaManager();
- initEventSubscriptionSchemaManager();
- initVariableSchemaManager();
- initTaskSchemaManager();
- initJobSchemaManager();
- initBatchSchemaManager();
- }
- }
-
- public void initSchemaManagementCommand() {
- if (schemaManagementCmd == null) {
- if (usingRelationalDatabase && databaseSchemaUpdate != null) {
- this.schemaManagementCmd = new SchemaOperationsCmmnEngineBuild();
- }
- }
- }
-
- protected void initCmmnSchemaManager() {
- if (this.schemaManager == null) {
- if (DATABASE_TYPE_COCKROACHDB.equals(databaseType)) {
- this.schemaManager = new CmmnDbSchemaManager(CmmnDbSchemaManager.LIQUIBASE_CHANGELOG_CRDB);
- } else {
- this.schemaManager = new CmmnDbSchemaManager(CmmnDbSchemaManager.LIQUIBASE_CHANGELOG);
- }
- }
- }
-
- protected void initVariableSchemaManager() {
- if (this.variableSchemaManager == null) {
- this.variableSchemaManager = new VariableDbSchemaManager();
- }
- }
-
- protected void initTaskSchemaManager() {
- if (this.taskSchemaManager == null) {
- this.taskSchemaManager = new TaskDbSchemaManager();
- }
- }
-
- protected void initIdentityLinkSchemaManager() {
- if (this.identityLinkSchemaManager == null) {
- this.identityLinkSchemaManager = new IdentityLinkDbSchemaManager();
- }
- }
-
- protected void initEntityLinkSchemaManager() {
- if (this.entityLinkSchemaManager == null) {
- this.entityLinkSchemaManager = new EntityLinkDbSchemaManager();
- }
- }
-
- protected void initEventSubscriptionSchemaManager() {
- if (this.eventSubscriptionSchemaManager == null) {
- this.eventSubscriptionSchemaManager = new EventSubscriptionDbSchemaManager();
- }
- }
-
- protected void initJobSchemaManager() {
- if (this.jobSchemaManager == null) {
- this.jobSchemaManager = new JobDbSchemaManager();
- }
- }
-
- protected void initBatchSchemaManager() {
- if (this.batchSchemaManager == null) {
- this.batchSchemaManager = new BatchDbSchemaManager();
- }
+ protected SchemaManager createEngineSchemaManager() {
+ return new CmmnDbSchemaManager();
}
@Override
@@ -2635,14 +2552,6 @@ public CmmnEngineConfiguration setDataSource(DataSource dataSource) {
return this;
}
- public boolean isExecuteServiceSchemaManagers() {
- return executeServiceSchemaManagers;
- }
-
- public void setExecuteServiceSchemaManagers(boolean executeServiceSchemaManagers) {
- this.executeServiceSchemaManagers = executeServiceSchemaManagers;
- }
-
public HistoryLevel getHistoryLevel() {
return historyLevel;
}
@@ -2801,69 +2710,6 @@ public CmmnEngineConfiguration addPostDefaultELResolver(ELResolver elResolver) {
return this;
}
- public SchemaManager getIdentityLinkSchemaManager() {
- return identityLinkSchemaManager;
- }
-
- public CmmnEngineConfiguration setIdentityLinkSchemaManager(SchemaManager identityLinkSchemaManager) {
- this.identityLinkSchemaManager = identityLinkSchemaManager;
- return this;
- }
-
- public SchemaManager getEntityLinkSchemaManager() {
- return entityLinkSchemaManager;
- }
-
- public CmmnEngineConfiguration setEntityLinkSchemaManager(SchemaManager entityLinkSchemaManager) {
- this.entityLinkSchemaManager = entityLinkSchemaManager;
- return this;
- }
-
- public SchemaManager getEventSubscriptionSchemaManager() {
- return eventSubscriptionSchemaManager;
- }
-
- public CmmnEngineConfiguration setEventSubscriptionSchemaManager(SchemaManager eventSubscriptionSchemaManager) {
- this.eventSubscriptionSchemaManager = eventSubscriptionSchemaManager;
- return this;
- }
-
- public SchemaManager getVariableSchemaManager() {
- return variableSchemaManager;
- }
-
- public CmmnEngineConfiguration setVariableSchemaManager(SchemaManager variableSchemaManager) {
- this.variableSchemaManager = variableSchemaManager;
- return this;
- }
-
- public SchemaManager getTaskSchemaManager() {
- return taskSchemaManager;
- }
-
- public CmmnEngineConfiguration setTaskSchemaManager(SchemaManager taskSchemaManager) {
- this.taskSchemaManager = taskSchemaManager;
- return this;
- }
-
- public SchemaManager getJobSchemaManager() {
- return jobSchemaManager;
- }
-
- public CmmnEngineConfiguration setJobSchemaManager(SchemaManager jobSchemaManager) {
- this.jobSchemaManager = jobSchemaManager;
- return this;
- }
-
- public SchemaManager getBatchSchemaManager() {
- return batchSchemaManager;
- }
-
- public CmmnEngineConfiguration setBatchSchemaManager(SchemaManager batchSchemaManager) {
- this.batchSchemaManager = batchSchemaManager;
- return this;
- }
-
@Override
public VariableTypes getVariableTypes() {
return variableTypes;
diff --git a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnEngineImpl.java b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnEngineImpl.java
index e277e171f66..5b21f353d40 100644
--- a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnEngineImpl.java
+++ b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnEngineImpl.java
@@ -72,12 +72,6 @@ public CmmnEngineImpl(CmmnEngineConfiguration cmmnEngineConfiguration) {
LOGGER.info("CmmnEngine {} created", name);
CmmnEngines.registerCmmnEngine(this);
-
- if (cmmnEngineConfiguration.getEngineLifecycleListeners() != null) {
- for (EngineLifecycleListener engineLifecycleListener : cmmnEngineConfiguration.getEngineLifecycleListeners()) {
- engineLifecycleListener.onEngineBuilt(this);
- }
- }
}
@Override
diff --git a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnEnginePostEngineBuildConsumer.java b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnEnginePostEngineBuildConsumer.java
new file mode 100644
index 00000000000..55662c2b56a
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnEnginePostEngineBuildConsumer.java
@@ -0,0 +1,39 @@
+/* Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.flowable.cmmn.engine.impl;
+
+import java.util.function.Consumer;
+
+import org.flowable.cmmn.engine.CmmnEngine;
+import org.flowable.cmmn.engine.CmmnEngineConfiguration;
+import org.flowable.common.engine.api.engine.EngineLifecycleListener;
+
+/**
+ * @author Filip Hrisafov
+ */
+public class CmmnEnginePostEngineBuildConsumer implements Consumer {
+
+ @Override
+ public void accept(CmmnEngine cmmnEngine) {
+ CmmnEngineConfiguration engineConfiguration = cmmnEngine.getCmmnEngineConfiguration();
+ if (engineConfiguration.getEngineLifecycleListeners() != null) {
+ for (EngineLifecycleListener engineLifecycleListener : engineConfiguration.getEngineLifecycleListeners()) {
+ engineLifecycleListener.onEngineBuilt(cmmnEngine);
+ }
+ }
+
+ if (engineConfiguration.isHandleCmmnEngineExecutorsAfterEngineCreate()) {
+ cmmnEngine.startExecutors();
+ }
+ }
+}
diff --git a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnManagementServiceImpl.java b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnManagementServiceImpl.java
index 9037010e76c..758fe8e555b 100644
--- a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnManagementServiceImpl.java
+++ b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnManagementServiceImpl.java
@@ -35,11 +35,13 @@
import org.flowable.cmmn.engine.impl.runtime.CmmnExternalWorkerTransitionBuilderImpl;
import org.flowable.common.engine.api.FlowableException;
import org.flowable.common.engine.api.FlowableIllegalArgumentException;
+import org.flowable.common.engine.api.lock.LockManager;
import org.flowable.common.engine.api.tenant.ChangeTenantIdBuilder;
import org.flowable.common.engine.impl.cmd.GetTableCountCmd;
import org.flowable.common.engine.impl.interceptor.Command;
import org.flowable.common.engine.impl.interceptor.CommandConfig;
import org.flowable.common.engine.impl.interceptor.EngineConfigurationConstants;
+import org.flowable.common.engine.impl.lock.LockManagerImpl;
import org.flowable.common.engine.impl.service.CommonEngineServiceImpl;
import org.flowable.common.engine.impl.tenant.ChangeTenantIdBuilderImpl;
import org.flowable.job.api.DeadLetterJobQuery;
@@ -354,5 +356,10 @@ public T executeCommand(CommandConfig config, Command command) {
}
return commandExecutor.execute(config, command);
}
+
+ @Override
+ public LockManager getLockManager(String lockName) {
+ return new LockManagerImpl(commandExecutor, lockName, getConfiguration().getLockPollRate(), configuration.getEngineCfgKey());
+ }
}
diff --git a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/aot/FlowableCmmnRuntimeHints.java b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/aot/FlowableCmmnRuntimeHints.java
index 60821021edd..e0641134e42 100644
--- a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/aot/FlowableCmmnRuntimeHints.java
+++ b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/aot/FlowableCmmnRuntimeHints.java
@@ -28,8 +28,6 @@ public class FlowableCmmnRuntimeHints implements RuntimeHintsRegistrar {
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
ResourceHints resourceHints = hints.resources();
FlowableMyBatisResourceHintsRegistrar.registerMappingResources("org/flowable/cmmn/db/mapping", hints, classLoader);
- resourceHints.registerPattern("org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog.xml");
- resourceHints.registerPattern("org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog-crdb.xml");
resourceHints.registerPattern("org/flowable/impl/cmmn/parser/*.xsd");
hints.reflection()
diff --git a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/SchemaOperationsCmmnEngineBuild.java b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/SchemaOperationsCmmnEngineBuild.java
deleted file mode 100644
index ebae5c34674..00000000000
--- a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/SchemaOperationsCmmnEngineBuild.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.flowable.cmmn.engine.impl.cmd;
-
-import org.flowable.cmmn.engine.impl.db.CmmnDbSchemaManager;
-import org.flowable.cmmn.engine.impl.util.CommandContextUtil;
-import org.flowable.common.engine.impl.interceptor.Command;
-import org.flowable.common.engine.impl.interceptor.CommandContext;
-
-/**
- * @author Joram Barrez
- */
-public class SchemaOperationsCmmnEngineBuild implements Command {
-
- @Override
- public Void execute(CommandContext commandContext) {
- ((CmmnDbSchemaManager) CommandContextUtil.getCmmnEngineConfiguration(commandContext).getSchemaManager()).initSchema();
- return null;
- }
-
-}
diff --git a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/db/CmmnDbSchemaManager.java b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/db/CmmnDbSchemaManager.java
index 6bc256440e5..d5c31604bdf 100644
--- a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/db/CmmnDbSchemaManager.java
+++ b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/db/CmmnDbSchemaManager.java
@@ -12,181 +12,90 @@
*/
package org.flowable.cmmn.engine.impl.db;
-import org.flowable.cmmn.engine.CmmnEngineConfiguration;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.flowable.cmmn.engine.CmmnEngine;
import org.flowable.cmmn.engine.impl.util.CommandContextUtil;
-import org.flowable.common.engine.api.FlowableException;
import org.flowable.common.engine.impl.AbstractEngineConfiguration;
-import org.flowable.common.engine.impl.db.EngineDatabaseConfiguration;
-import org.flowable.common.engine.impl.db.LiquibaseBasedSchemaManager;
-import org.flowable.common.engine.impl.db.LiquibaseDatabaseConfiguration;
-import org.flowable.common.engine.impl.db.SchemaManager;
-import org.flowable.common.engine.impl.interceptor.EngineConfigurationConstants;
-import org.flowable.idm.engine.IdmEngineConfiguration;
-
-public class CmmnDbSchemaManager extends LiquibaseBasedSchemaManager {
-
- public static final String LIQUIBASE_CHANGELOG = "org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog.xml";
-
- public static final String LIQUIBASE_CHANGELOG_CRDB = "org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog-crdb.xml";
-
- public CmmnDbSchemaManager(String changelogFile) {
- super("cmmn", changelogFile, CmmnEngineConfiguration.LIQUIBASE_CHANGELOG_PREFIX);
+import org.flowable.common.engine.impl.db.EngineSqlScriptBasedDbSchemaManager;
+
+public class CmmnDbSchemaManager extends EngineSqlScriptBasedDbSchemaManager {
+
+ protected static final String CMMN_DB_SCHEMA_LOCK_NAME = "cmmnDbSchemaLock";
+
+ protected static final Map changeLogVersionMap = Map.ofEntries(
+ Map.entry("1", "6.2.0.0"),
+ Map.entry("2", "6.2.1.0"),
+ Map.entry("3", "6.3.0.0"),
+ Map.entry("4", "6.3.1.0"),
+ Map.entry("5", "6.4.0.0"),
+ Map.entry("6", "6.4.1.3"),
+ Map.entry("7", "6.4.1.3"),
+ Map.entry("8", "6.5.0.6"),
+ Map.entry("9", "6.5.0.6"),
+ Map.entry("10", "6.5.0.6"),
+ Map.entry("11", "6.5.0.6"),
+ Map.entry("12", "6.6.0.0"),
+ Map.entry("13", "6.6.0.0"),
+ Map.entry("14", "6.7.0.0"),
+ Map.entry("15", "6.7.1.0"),
+ Map.entry("16", "6.7.1.0"),
+ Map.entry("17", "6.8.0.0"),
+ Map.entry("18", "7.0.1.1"),
+ Map.entry("19", "7.1.0.0"),
+ Map.entry("20", "7.1.0.0")
+ );
+
+ public CmmnDbSchemaManager() {
+ super("cmmn");
}
@Override
- protected LiquibaseDatabaseConfiguration getDatabaseConfiguration() {
- return new EngineDatabaseConfiguration(CommandContextUtil.getCmmnEngineConfiguration());
- }
-
- public void initSchema() {
- initSchema(CommandContextUtil.getCmmnEngineConfiguration().getDatabaseSchemaUpdate());
+ protected String getEngineVersion() {
+ return CmmnEngine.VERSION;
}
@Override
- public void initSchema(String databaseSchemaUpdate) {
- super.initSchema(databaseSchemaUpdate);
-
- // When the databaseSchemaUpdate is drop-create:
- // the IDM engine will have done a drop-create due to the configurator running first
- // The CmmnDbSchemaManager will go next, but it will do a dropAll, dropping the idm tables too.
- if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_DROP_CREATE.equals(databaseSchemaUpdate)) {
- AbstractEngineConfiguration abstractEngineConfiguration = CommandContextUtil.getCmmnEngineConfiguration().getEngineConfigurations()
- .get(EngineConfigurationConstants.KEY_IDM_ENGINE_CONFIG);
- if (abstractEngineConfiguration != null) {
- IdmEngineConfiguration idmEngineConfiguration = (IdmEngineConfiguration) abstractEngineConfiguration;
- idmEngineConfiguration.getSchemaManager().schemaCreate();
- }
- }
+ protected String getSchemaVersionPropertyName() {
+ return "cmmn.schema.version";
}
@Override
- public void schemaCreate() {
- try {
- getCommonSchemaManager().schemaCreate();
- getIdentityLinkSchemaManager().schemaCreate();
- getEntityLinkSchemaManager().schemaCreate();
- getEventSubscriptionSchemaManager().schemaCreate();
- getTaskSchemaManager().schemaCreate();
- getVariableSchemaManager().schemaCreate();
- getJobSchemaManager().schemaCreate();
- getBatchSchemaManager().schemaCreate();
-
- super.schemaCreate();
- } catch (Exception e) {
- throw new FlowableException("Error creating CMMN engine tables", e);
- }
+ protected String getDbSchemaLockName() {
+ return CMMN_DB_SCHEMA_LOCK_NAME;
}
@Override
- public void schemaDrop() {
- try {
- super.schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping CMMN engine tables", e);
- }
-
- try {
- getBatchSchemaManager().schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping batch tables", e);
- }
-
- try {
- getJobSchemaManager().schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping job tables", e);
- }
-
- try {
- getVariableSchemaManager().schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping variable tables", e);
- }
-
- try {
- getTaskSchemaManager().schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping task tables", e);
- }
-
- try {
- getEventSubscriptionSchemaManager().schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping event subscription tables", e);
- }
-
- try {
- getEntityLinkSchemaManager().schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping entity link tables", e);
- }
-
- try {
- getIdentityLinkSchemaManager().schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping identity link tables", e);
- }
-
- try {
- getCommonSchemaManager().schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping common tables", e);
- }
+ protected String getEngineTableName() {
+ return "ACT_CMMN_RU_CASE_INST";
}
@Override
- public String schemaUpdate() {
- try {
-
- getCommonSchemaManager().schemaUpdate();
-
- if (CommandContextUtil.getCmmnEngineConfiguration().isExecuteServiceSchemaManagers()) {
- getIdentityLinkSchemaManager().schemaUpdate();
- getEntityLinkSchemaManager().schemaUpdate();
- getEventSubscriptionSchemaManager().schemaUpdate();
- getTaskSchemaManager().schemaUpdate();
- getVariableSchemaManager().schemaUpdate();
- getJobSchemaManager().schemaUpdate();
- getBatchSchemaManager().schemaUpdate();
- }
-
- super.schemaUpdate();
-
- } catch (Exception e) {
- throw new FlowableException("Error updating CMMN engine tables", e);
- }
- return null;
- }
-
- protected SchemaManager getCommonSchemaManager() {
- return CommandContextUtil.getCmmnEngineConfiguration().getCommonSchemaManager();
- }
-
- protected SchemaManager getIdentityLinkSchemaManager() {
- return CommandContextUtil.getCmmnEngineConfiguration().getIdentityLinkSchemaManager();
- }
-
- protected SchemaManager getEntityLinkSchemaManager() {
- return CommandContextUtil.getCmmnEngineConfiguration().getEntityLinkSchemaManager();
- }
-
- protected SchemaManager getEventSubscriptionSchemaManager() {
- return CommandContextUtil.getCmmnEngineConfiguration().getEventSubscriptionSchemaManager();
+ protected String getChangeLogTableName() {
+ return "ACT_CMMN_DATABASECHANGELOG";
}
- protected SchemaManager getVariableSchemaManager() {
- return CommandContextUtil.getCmmnEngineConfiguration().getVariableSchemaManager();
+ @Override
+ protected String getChangeLogTablePrefixName() {
+ return "ACT_CMMN";
}
-
- protected SchemaManager getTaskSchemaManager() {
- return CommandContextUtil.getCmmnEngineConfiguration().getTaskSchemaManager();
+
+ @Override
+ protected String getDbVersionForChangelogVersion(String changeLogVersion) {
+ if (StringUtils.isNotEmpty(changeLogVersion) && changeLogVersionMap.containsKey(changeLogVersion)) {
+ return changeLogVersionMap.get(changeLogVersion);
+ }
+ return "6.1.2.0";
}
-
- protected SchemaManager getJobSchemaManager() {
- return CommandContextUtil.getCmmnEngineConfiguration().getJobSchemaManager();
+
+ @Override
+ protected AbstractEngineConfiguration getEngineConfiguration() {
+ return CommandContextUtil.getCmmnEngineConfiguration();
}
- protected SchemaManager getBatchSchemaManager() {
- return CommandContextUtil.getCmmnEngineConfiguration().getBatchSchemaManager();
+ @Override
+ protected String getResourcesRootDirectory() {
+ return "org/flowable/cmmn/db/";
}
}
diff --git a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/db/DbSchemaDrop.java b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/db/DbSchemaDrop.java
index 24423dd5f0e..998fec90c7d 100644
--- a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/db/DbSchemaDrop.java
+++ b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/db/DbSchemaDrop.java
@@ -18,11 +18,9 @@
import org.flowable.cmmn.engine.CmmnEngine;
import org.flowable.cmmn.engine.CmmnEngineConfiguration;
-import org.flowable.cmmn.engine.impl.util.CommandContextUtil;
import org.flowable.cmmn.engine.test.FlowableCmmnTestCase;
-import org.flowable.common.engine.impl.interceptor.Command;
+import org.flowable.common.engine.impl.db.SchemaOperationsEngineDropDbCmd;
import org.flowable.common.engine.impl.interceptor.CommandConfig;
-import org.flowable.common.engine.impl.interceptor.CommandContext;
import org.flowable.common.engine.impl.interceptor.CommandExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -39,13 +37,7 @@ public static void main(String[] args) {
CmmnEngine cmmnEngine = CmmnEngineConfiguration.createCmmnEngineConfigurationFromInputStream(inputStream).buildCmmnEngine();
CommandExecutor commandExecutor = cmmnEngine.getCmmnEngineConfiguration().getCommandExecutor();
CommandConfig config = new CommandConfig().transactionNotSupported();
- commandExecutor.execute(config, new Command<>() {
- @Override
- public Object execute(CommandContext commandContext) {
- CommandContextUtil.getCmmnEngineConfiguration(commandContext).getSchemaManager().schemaDrop();
- return null;
- }
- });
+ commandExecutor.execute(config, new SchemaOperationsEngineDropDbCmd(cmmnEngine.getCmmnEngineConfiguration().getEngineScopeType()));
} catch (IOException e) {
LOGGER.error("Could not create CMMN engine", e);
diff --git a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/eventregistry/CmmnEventRegistryEventConsumer.java b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/eventregistry/CmmnEventRegistryEventConsumer.java
index e86cc08400e..9ce59f10e1e 100644
--- a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/eventregistry/CmmnEventRegistryEventConsumer.java
+++ b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/eventregistry/CmmnEventRegistryEventConsumer.java
@@ -31,8 +31,8 @@
import org.flowable.cmmn.model.ExtensionElement;
import org.flowable.cmmn.model.PlanItem;
import org.flowable.common.engine.api.constant.ReferenceTypes;
+import org.flowable.common.engine.api.lock.LockManager;
import org.flowable.common.engine.api.scope.ScopeTypes;
-import org.flowable.common.engine.impl.lock.LockManager;
import org.flowable.eventregistry.api.EventConsumerInfo;
import org.flowable.eventregistry.api.EventRegistryProcessingInfo;
import org.flowable.eventregistry.api.runtime.EventInstance;
diff --git a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/test/impl/CmmnTestRunner.java b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/test/impl/CmmnTestRunner.java
index 4fbd60eb3bf..8fba68646e0 100644
--- a/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/test/impl/CmmnTestRunner.java
+++ b/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/test/impl/CmmnTestRunner.java
@@ -207,17 +207,7 @@ protected void assertDatabaseEmpty(FrameworkMethod method) {
cmmnEngineConfiguration,
TABLENAMES_EXCLUDED_FROM_DB_CLEAN_CHECK,
true,
- new Command<>() {
-
- @Override
- public Void execute(CommandContext commandContext) {
- SchemaManager schemaManager = CommandContextUtil.getCmmnEngineConfiguration(commandContext).getSchemaManager();
- schemaManager.schemaDrop();
- schemaManager.schemaCreate();
- return null;
- }
- }
-
+ cmmnEngineConfiguration.getSchemaManagementCmd()
);
}
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.db2.cmmn.create.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.db2.cmmn.create.sql
deleted file mode 100644
index af05239d57f..00000000000
--- a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.db2.cmmn.create.sql
+++ /dev/null
@@ -1,65 +0,0 @@
-
-CREATE TABLE DATABASECHANGELOG (ID VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, FILENAME VARCHAR(255) NOT NULL, DATEEXECUTED TIMESTAMP NOT NULL, ORDEREXECUTED INTEGER NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35), DESCRIPTION VARCHAR(255), COMMENTS VARCHAR(255), TAG VARCHAR(255), LIQUIBASE VARCHAR(20), CONTEXTS VARCHAR(255), LABELS VARCHAR(255), DEPLOYMENT_ID VARCHAR(10));
-
-CREATE TABLE ACT_CMMN_RE_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), CONSTRAINT PK_ACT_CMMN_RE_DE PRIMARY KEY (ID_));
-
-CREATE TABLE ACT_CMMN_RE_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_ACT_CMMN_RE_DE PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RE_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_RE_DEPLOYMENT (ID_);
-
-CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_RE_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
-
-CREATE TABLE ACT_CMMN_RE_CASEDEF (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ VARCHAR(255) NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), HAS_GRAPHICAL_NOTATION_ SMALLINT, TENANT_ID_ VARCHAR(255) DEFAULT '' NOT NULL, CONSTRAINT PK_ACT_CMMN_RE_CA PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RE_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_RE_DEPLOYMENT (ID_);
-
-CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_RE_CASEDEF(DEPLOYMENT_ID_);
-
-CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CA PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
-
-CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
-
-CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ SMALLINT, ELEMENT_ID_ VARCHAR(255), NAME_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_PL PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
-
-ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
-
-CREATE TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), PLAN_ITEM_INST_ID_ VARCHAR(255), ON_PART_ID_ VARCHAR(255), TIME_STAMP_ TIMESTAMP, CONSTRAINT PK_ACT_CMMN_RU_SE PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_ON_PART_INST(CASE_DEF_ID_);
-
-ALTER TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_ON_PART_INST(CASE_INST_ID_);
-
-ALTER TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
-
-CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_ON_PART_INST(PLAN_ITEM_INST_ID_);
-
-CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MI PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
-
-ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
-
-CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CA PRIMARY KEY (ID_));
-
-CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MI PRIMARY KEY (ID_));
-
-INSERT INTO DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('1', 'flowable', 'org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog.xml', CURRENT TIMESTAMP, 1, '7:28e5931d36abab0185c189c584a7c2d0', 'createTable tableName=ACT_CMMN_RE_DEPLOYMENT; createTable tableName=ACT_CMMN_RE_DEPLOYMENT_RESOURCE; addForeignKeyConstraint baseTableName=ACT_CMMN_RE_DEPLOYMENT_RESOURCE, constraintName=ACT_FK_CMMN_RSRC_DPL, referencedTableName=ACT_CMMN_RE_DEPLOY...', '', 'EXECUTED', NULL, NULL, '3.5.3', '4471204965');
-
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.db2.create.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.db2.create.cmmn.sql
new file mode 100644
index 00000000000..715d0892d3e
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.db2.create.cmmn.sql
@@ -0,0 +1,226 @@
+CREATE TABLE ACT_CMMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), KEY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_DEPLO PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_CMMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_CASEDEF (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ INTEGER NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), HAS_GRAPHICAL_NOTATION_ BOOLEAN, TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_CASED PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_CASEDEF(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CA PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), NAME_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_CMMN_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_SENTRY_PART_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), PLAN_ITEM_INST_ID_ VARCHAR(255), ON_PART_ID_ VARCHAR(255), IF_PART_ID_ VARCHAR(255), TIME_STAMP_ TIMESTAMP, CONSTRAINT PK_CMMN_SENTRY_PART_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_PART_INST(PLAN_ITEM_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MI PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CA PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MI PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD DGRM_RESOURCE_NAME_ VARCHAR(4000);
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD HAS_START_FORM_KEY_ BOOLEAN;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_CASEDEF');
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD GENERATED_ BOOLEAN;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_DEPLOYMENT_RESOURCE');
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_TIME_ TIMESTAMP;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_CASE_INST');
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_TYPE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COMPLETEABLE_ BOOLEAN;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD IS_COMPLETEABLE_ BOOLEAN;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_CASE_INST');
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_STAGE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(STAGE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COUNT_ENABLED_ BOOLEAN;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD VAR_COUNT_ INTEGER;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD SENTRY_PART_INST_COUNT_ INTEGER;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+CREATE TABLE ACT_CMMN_HI_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255), STATE_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), ITEM_DEFINITION_ID_ VARCHAR(255), ITEM_DEFINITION_TYPE_ VARCHAR(255), CREATED_TIME_ TIMESTAMP, LAST_AVAILABLE_TIME_ TIMESTAMP, LAST_ENABLED_TIME_ TIMESTAMP, LAST_DISABLED_TIME_ TIMESTAMP, LAST_STARTED_TIME_ TIMESTAMP, LAST_SUSPENDED_TIME_ TIMESTAMP, COMPLETED_TIME_ TIMESTAMP, OCCURRED_TIME_ TIMESTAMP, TERMINATED_TIME_ TIMESTAMP, EXIT_TIME_ TIMESTAMP, ENDED_TIME_ TIMESTAMP, LAST_UPDATED_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_PL PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '';
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_MIL_INST');
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '';
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_MIL_INST');
+
+CREATE UNIQUE INDEX ACT_IDX_CASE_DEF_UNIQ ON ACT_CMMN_CASEDEF(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST RENAME COLUMN START_TIME_ TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST RENAME COLUMN CREATED_TIME_ TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_AVAILABLE_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_ENABLED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_DISABLED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_STARTED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_SUSPENDED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD COMPLETED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD OCCURRED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD TERMINATED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENDED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD SHOW_IN_OVERVIEW_ BOOLEAN;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_CASE_INST');
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_CASE_INST');
+
+CREATE INDEX ACT_IDX_CASE_INST_REF_ID_ ON ACT_CMMN_RU_CASE_INST(REFERENCE_ID_);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_CASE_INST');
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_CASE_INST');
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_OWNER_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_CASE_INST');
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP(3);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP(3);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_CASE_INST');
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_CASE_INST');
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_CASE_INST');
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_CASE_INST');
+
+CREATE INDEX ACT_IDX_HI_CASE_INST_END ON ACT_CMMN_HI_CASE_INST(END_TIME_);
+
+CREATE INDEX ACT_IDX_HI_PLAN_ITEM_INST_CASE ON ACT_CMMN_HI_PLAN_ITEM_INST(CASE_INST_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('cmmn.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.h2.cmmn.create.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.h2.cmmn.create.sql
deleted file mode 100644
index 927876f96bb..00000000000
--- a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.h2.cmmn.create.sql
+++ /dev/null
@@ -1,65 +0,0 @@
-
-CREATE TABLE PUBLIC.DATABASECHANGELOG (ID VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, FILENAME VARCHAR(255) NOT NULL, DATEEXECUTED TIMESTAMP NOT NULL, ORDEREXECUTED INT NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35), DESCRIPTION VARCHAR(255), COMMENTS VARCHAR(255), TAG VARCHAR(255), LIQUIBASE VARCHAR(20), CONTEXTS VARCHAR(255), LABELS VARCHAR(255), DEPLOYMENT_ID VARCHAR(10));
-
-CREATE TABLE PUBLIC.ACT_CMMN_RE_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), CONSTRAINT PK_ACT_CMMN_RE_DEPLOYMENT PRIMARY KEY (ID_));
-
-CREATE TABLE PUBLIC.ACT_CMMN_RE_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_ACT_CMMN_RE_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
-
-ALTER TABLE PUBLIC.ACT_CMMN_RE_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES PUBLIC.ACT_CMMN_RE_DEPLOYMENT (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_CMMN_RSRC_DPL ON PUBLIC.ACT_CMMN_RE_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
-
-CREATE TABLE PUBLIC.ACT_CMMN_RE_CASEDEF (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ VARCHAR(255) NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), HAS_GRAPHICAL_NOTATION_ BOOLEAN, TENANT_ID_ VARCHAR(255) DEFAULT '' NOT NULL, CONSTRAINT PK_ACT_CMMN_RE_CASEDEF PRIMARY KEY (ID_));
-
-ALTER TABLE PUBLIC.ACT_CMMN_RE_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES PUBLIC.ACT_CMMN_RE_DEPLOYMENT (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_CASE_DEF_DPLY ON PUBLIC.ACT_CMMN_RE_CASEDEF(DEPLOYMENT_ID_);
-
-CREATE TABLE PUBLIC.ACT_CMMN_RU_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES PUBLIC.ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_CASE_INST_CASE_DEF ON PUBLIC.ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_CASE_INST_PARENT ON PUBLIC.ACT_CMMN_RU_CASE_INST(PARENT_ID_);
-
-CREATE TABLE PUBLIC.ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), NAME_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_PLAN_ITEM_INST PRIMARY KEY (ID_));
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES PUBLIC.ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_PLAN_ITEM_CASE_DEF ON PUBLIC.ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES PUBLIC.ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_PLAN_ITEM_CASE_INST ON PUBLIC.ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
-
-CREATE TABLE PUBLIC.ACT_CMMN_RU_SENTRY_ON_PART_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), PLAN_ITEM_INST_ID_ VARCHAR(255), ON_PART_ID_ VARCHAR(255), TIME_STAMP_ TIMESTAMP, CONSTRAINT PK_ACT_CMMN_RU_SENTRY_ON_PART_INST PRIMARY KEY (ID_));
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES PUBLIC.ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_SENTRY_CASE_DEF ON PUBLIC.ACT_CMMN_RU_SENTRY_ON_PART_INST(CASE_DEF_ID_);
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES PUBLIC.ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_SENTRY_CASE_INST ON PUBLIC.ACT_CMMN_RU_SENTRY_ON_PART_INST(CASE_INST_ID_);
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES PUBLIC.ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_SENTRY_PLAN_ITEM ON PUBLIC.ACT_CMMN_RU_SENTRY_ON_PART_INST(PLAN_ITEM_INST_ID_);
-
-CREATE TABLE PUBLIC.ACT_CMMN_RU_MIL_INST (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES PUBLIC.ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_MIL_CASE_DEF ON PUBLIC.ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES PUBLIC.ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_MIL_CASE_INST ON PUBLIC.ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
-
-CREATE TABLE PUBLIC.ACT_CMMN_HI_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
-
-CREATE TABLE PUBLIC.ACT_CMMN_HI_MIL_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
-
-INSERT INTO PUBLIC.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('1', 'flowable', 'org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog.xml', NOW(), 1, '7:28e5931d36abab0185c189c584a7c2d0', 'createTable tableName=ACT_CMMN_RE_DEPLOYMENT; createTable tableName=ACT_CMMN_RE_DEPLOYMENT_RESOURCE; addForeignKeyConstraint baseTableName=ACT_CMMN_RE_DEPLOYMENT_RESOURCE, constraintName=ACT_FK_CMMN_RSRC_DPL, referencedTableName=ACT_CMMN_RE_DEPLOY...', '', 'EXECUTED', NULL, NULL, '3.5.3', '4471205191');
-
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.h2.create.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.h2.create.cmmn.sql
new file mode 100644
index 00000000000..6b210343969
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.h2.create.cmmn.sql
@@ -0,0 +1,168 @@
+CREATE TABLE ACT_CMMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), KEY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_CMMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_CASEDEF (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ INT NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), HAS_GRAPHICAL_NOTATION_ BOOLEAN, TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_CASEDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_CASEDEF(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), NAME_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_CMMN_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_SENTRY_PART_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), PLAN_ITEM_INST_ID_ VARCHAR(255), ON_PART_ID_ VARCHAR(255), IF_PART_ID_ VARCHAR(255), TIME_STAMP_ TIMESTAMP, CONSTRAINT PK_CMMN_SENTRY_PART_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_PART_INST(PLAN_ITEM_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD DGRM_RESOURCE_NAME_ VARCHAR(4000);
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD HAS_START_FORM_KEY_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD GENERATED_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_TYPE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COMPLETEABLE_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD IS_COMPLETEABLE_ BOOLEAN;
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_STAGE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(STAGE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COUNT_ENABLED_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD VAR_COUNT_ INT;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD SENTRY_PART_INST_COUNT_ INT;
+
+CREATE TABLE ACT_CMMN_HI_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255), STATE_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), ITEM_DEFINITION_ID_ VARCHAR(255), ITEM_DEFINITION_TYPE_ VARCHAR(255), CREATED_TIME_ TIMESTAMP, LAST_AVAILABLE_TIME_ TIMESTAMP, LAST_ENABLED_TIME_ TIMESTAMP, LAST_DISABLED_TIME_ TIMESTAMP, LAST_STARTED_TIME_ TIMESTAMP, LAST_SUSPENDED_TIME_ TIMESTAMP, COMPLETED_TIME_ TIMESTAMP, OCCURRED_TIME_ TIMESTAMP, TERMINATED_TIME_ TIMESTAMP, EXIT_TIME_ TIMESTAMP, ENDED_TIME_ TIMESTAMP, LAST_UPDATED_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '';
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '';
+
+CREATE UNIQUE INDEX ACT_IDX_CASE_DEF_UNIQ ON ACT_CMMN_CASEDEF(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ALTER COLUMN START_TIME_ RENAME TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ALTER COLUMN CREATED_TIME_ RENAME TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_AVAILABLE_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_ENABLED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_DISABLED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_STARTED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_SUSPENDED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD COMPLETED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD OCCURRED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD TERMINATED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENDED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD SHOW_IN_OVERVIEW_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255);
+
+CREATE INDEX ACT_IDX_CASE_INST_REF_ID_ ON ACT_CMMN_RU_CASE_INST(REFERENCE_ID_);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_OWNER_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255);
+
+CREATE INDEX ACT_IDX_HI_CASE_INST_END ON ACT_CMMN_HI_CASE_INST(END_TIME_);
+
+CREATE INDEX ACT_IDX_HI_PLAN_ITEM_INST_CASE ON ACT_CMMN_HI_PLAN_ITEM_INST(CASE_INST_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('cmmn.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.hsql.cmmn.create.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.hsql.cmmn.create.sql
deleted file mode 100644
index 1f0fd553cd4..00000000000
--- a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.hsql.cmmn.create.sql
+++ /dev/null
@@ -1,65 +0,0 @@
-
-CREATE TABLE PUBLIC.DATABASECHANGELOG (ID VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, FILENAME VARCHAR(255) NOT NULL, DATEEXECUTED TIMESTAMP NOT NULL, ORDEREXECUTED INT NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35), DESCRIPTION VARCHAR(255), COMMENTS VARCHAR(255), TAG VARCHAR(255), LIQUIBASE VARCHAR(20), CONTEXTS VARCHAR(255), LABELS VARCHAR(255), DEPLOYMENT_ID VARCHAR(10));
-
-CREATE TABLE PUBLIC.ACT_CMMN_RE_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), CONSTRAINT PK_ACT_CMMN_RE_DEPLOYMENT PRIMARY KEY (ID_));
-
-CREATE TABLE PUBLIC.ACT_CMMN_RE_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_ACT_CMMN_RE_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
-
-ALTER TABLE PUBLIC.ACT_CMMN_RE_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES PUBLIC.ACT_CMMN_RE_DEPLOYMENT (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_CMMN_RSRC_DPL ON PUBLIC.ACT_CMMN_RE_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
-
-CREATE TABLE PUBLIC.ACT_CMMN_RE_CASEDEF (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ VARCHAR(255) NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), HAS_GRAPHICAL_NOTATION_ BOOLEAN, TENANT_ID_ VARCHAR(255) DEFAULT '' NOT NULL, CONSTRAINT PK_ACT_CMMN_RE_CASEDEF PRIMARY KEY (ID_));
-
-ALTER TABLE PUBLIC.ACT_CMMN_RE_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES PUBLIC.ACT_CMMN_RE_DEPLOYMENT (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_CASE_DEF_DPLY ON PUBLIC.ACT_CMMN_RE_CASEDEF(DEPLOYMENT_ID_);
-
-CREATE TABLE PUBLIC.ACT_CMMN_RU_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES PUBLIC.ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_CASE_INST_CASE_DEF ON PUBLIC.ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_CASE_INST_PARENT ON PUBLIC.ACT_CMMN_RU_CASE_INST(PARENT_ID_);
-
-CREATE TABLE PUBLIC.ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), NAME_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_PLAN_ITEM_INST PRIMARY KEY (ID_));
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES PUBLIC.ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_PLAN_ITEM_CASE_DEF ON PUBLIC.ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES PUBLIC.ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_PLAN_ITEM_CASE_INST ON PUBLIC.ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
-
-CREATE TABLE PUBLIC.ACT_CMMN_RU_SENTRY_ON_PART_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), PLAN_ITEM_INST_ID_ VARCHAR(255), ON_PART_ID_ VARCHAR(255), TIME_STAMP_ TIMESTAMP, CONSTRAINT PK_ACT_CMMN_RU_SENTRY_ON_PART_INST PRIMARY KEY (ID_));
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES PUBLIC.ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_SENTRY_CASE_DEF ON PUBLIC.ACT_CMMN_RU_SENTRY_ON_PART_INST(CASE_DEF_ID_);
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES PUBLIC.ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_SENTRY_CASE_INST ON PUBLIC.ACT_CMMN_RU_SENTRY_ON_PART_INST(CASE_INST_ID_);
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES PUBLIC.ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_SENTRY_PLAN_ITEM ON PUBLIC.ACT_CMMN_RU_SENTRY_ON_PART_INST(PLAN_ITEM_INST_ID_);
-
-CREATE TABLE PUBLIC.ACT_CMMN_RU_MIL_INST (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES PUBLIC.ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_MIL_CASE_DEF ON PUBLIC.ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
-
-ALTER TABLE PUBLIC.ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES PUBLIC.ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX PUBLIC.ACT_IDX_MIL_CASE_INST ON PUBLIC.ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
-
-CREATE TABLE PUBLIC.ACT_CMMN_HI_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
-
-CREATE TABLE PUBLIC.ACT_CMMN_HI_MIL_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
-
-INSERT INTO PUBLIC.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('1', 'flowable', 'org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog.xml', NOW, 1, '7:28e5931d36abab0185c189c584a7c2d0', 'createTable tableName=ACT_CMMN_RE_DEPLOYMENT; createTable tableName=ACT_CMMN_RE_DEPLOYMENT_RESOURCE; addForeignKeyConstraint baseTableName=ACT_CMMN_RE_DEPLOYMENT_RESOURCE, constraintName=ACT_FK_CMMN_RSRC_DPL, referencedTableName=ACT_CMMN_RE_DEPLOY...', '', 'EXECUTED', NULL, NULL, '3.5.3', '4471205090');
-
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.hsql.create.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.hsql.create.cmmn.sql
new file mode 100644
index 00000000000..6b210343969
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.hsql.create.cmmn.sql
@@ -0,0 +1,168 @@
+CREATE TABLE ACT_CMMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), KEY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_CMMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_CASEDEF (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ INT NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), HAS_GRAPHICAL_NOTATION_ BOOLEAN, TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_CASEDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_CASEDEF(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), NAME_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_CMMN_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_SENTRY_PART_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), PLAN_ITEM_INST_ID_ VARCHAR(255), ON_PART_ID_ VARCHAR(255), IF_PART_ID_ VARCHAR(255), TIME_STAMP_ TIMESTAMP, CONSTRAINT PK_CMMN_SENTRY_PART_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_PART_INST(PLAN_ITEM_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD DGRM_RESOURCE_NAME_ VARCHAR(4000);
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD HAS_START_FORM_KEY_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD GENERATED_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_TYPE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COMPLETEABLE_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD IS_COMPLETEABLE_ BOOLEAN;
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_STAGE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(STAGE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COUNT_ENABLED_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD VAR_COUNT_ INT;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD SENTRY_PART_INST_COUNT_ INT;
+
+CREATE TABLE ACT_CMMN_HI_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255), STATE_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), ITEM_DEFINITION_ID_ VARCHAR(255), ITEM_DEFINITION_TYPE_ VARCHAR(255), CREATED_TIME_ TIMESTAMP, LAST_AVAILABLE_TIME_ TIMESTAMP, LAST_ENABLED_TIME_ TIMESTAMP, LAST_DISABLED_TIME_ TIMESTAMP, LAST_STARTED_TIME_ TIMESTAMP, LAST_SUSPENDED_TIME_ TIMESTAMP, COMPLETED_TIME_ TIMESTAMP, OCCURRED_TIME_ TIMESTAMP, TERMINATED_TIME_ TIMESTAMP, EXIT_TIME_ TIMESTAMP, ENDED_TIME_ TIMESTAMP, LAST_UPDATED_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '';
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '';
+
+CREATE UNIQUE INDEX ACT_IDX_CASE_DEF_UNIQ ON ACT_CMMN_CASEDEF(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ALTER COLUMN START_TIME_ RENAME TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ALTER COLUMN CREATED_TIME_ RENAME TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_AVAILABLE_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_ENABLED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_DISABLED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_STARTED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_SUSPENDED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD COMPLETED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD OCCURRED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD TERMINATED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENDED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD SHOW_IN_OVERVIEW_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255);
+
+CREATE INDEX ACT_IDX_CASE_INST_REF_ID_ ON ACT_CMMN_RU_CASE_INST(REFERENCE_ID_);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_OWNER_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255);
+
+CREATE INDEX ACT_IDX_HI_CASE_INST_END ON ACT_CMMN_HI_CASE_INST(END_TIME_);
+
+CREATE INDEX ACT_IDX_HI_PLAN_ITEM_INST_CASE ON ACT_CMMN_HI_PLAN_ITEM_INST(CASE_INST_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('cmmn.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.mssql.cmmn.create.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.mssql.cmmn.create.sql
deleted file mode 100644
index 78b824fd5f9..00000000000
--- a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.mssql.cmmn.create.sql
+++ /dev/null
@@ -1,97 +0,0 @@
-
-CREATE TABLE [DATABASECHANGELOG] ([ID] [nvarchar](255) NOT NULL, [AUTHOR] [nvarchar](255) NOT NULL, [FILENAME] [nvarchar](255) NOT NULL, [DATEEXECUTED] [datetime2](3) NOT NULL, [ORDEREXECUTED] [int] NOT NULL, [EXECTYPE] [nvarchar](10) NOT NULL, [MD5SUM] [nvarchar](35), [DESCRIPTION] [nvarchar](255), [COMMENTS] [nvarchar](255), [TAG] [nvarchar](255), [LIQUIBASE] [nvarchar](20), [CONTEXTS] [nvarchar](255), [LABELS] [nvarchar](255), [DEPLOYMENT_ID] [nvarchar](10))
-GO
-
-CREATE TABLE [ACT_CMMN_RE_DEPLOYMENT] ([ID_] [varchar](255) NOT NULL, [NAME_] [varchar](255), [CATEGORY_] [varchar](255), [DEPLOY_TIME_] [datetime], [PARENT_DEPLOYMENT_ID_] [varchar](255), [TENANT_ID_] [varchar](255), CONSTRAINT [PK_ACT_CMMN_RE_DEPLOYMENT] PRIMARY KEY ([ID_]))
-GO
-
-CREATE TABLE [ACT_CMMN_RE_DEPLOYMENT_RESOURCE] ([ID_] [varchar](255) NOT NULL, [NAME_] [varchar](255), [DEPLOYMENT_ID_] [varchar](255), [RESOURCE_BYTES_] [varbinary](MAX), CONSTRAINT [PK_ACT_CMMN_RE_DEPLOYMENT_RESOURCE] PRIMARY KEY ([ID_]))
-GO
-
-ALTER TABLE [ACT_CMMN_RE_DEPLOYMENT_RESOURCE] ADD CONSTRAINT [ACT_FK_CMMN_RSRC_DPL] FOREIGN KEY ([DEPLOYMENT_ID_]) REFERENCES [ACT_CMMN_RE_DEPLOYMENT] ([ID_])
-GO
-
-CREATE NONCLUSTERED INDEX ACT_IDX_CMMN_RSRC_DPL ON [ACT_CMMN_RE_DEPLOYMENT_RESOURCE]([DEPLOYMENT_ID_])
-GO
-
-CREATE TABLE [ACT_CMMN_RE_CASEDEF] ([ID_] [varchar](255) NOT NULL, [REV_] [int] NOT NULL, [NAME_] [varchar](255), [KEY_] [varchar](255) NOT NULL, [VERSION_] [varchar](255) NOT NULL, [CATEGORY_] [varchar](255), [DEPLOYMENT_ID_] [varchar](255), [RESOURCE_NAME_] [varchar](4000), [DESCRIPTION_] [varchar](4000), [HAS_GRAPHICAL_NOTATION_] [bit], [TENANT_ID_] [varchar](255) CONSTRAINT [DF_ACT_CMMN_RE_CASEDEF_TENANT_ID_] DEFAULT '' NOT NULL, CONSTRAINT [PK_ACT_CMMN_RE_CASEDEF] PRIMARY KEY ([ID_]))
-GO
-
-ALTER TABLE [ACT_CMMN_RE_CASEDEF] ADD CONSTRAINT [ACT_FK_CASE_DEF_DPLY] FOREIGN KEY ([DEPLOYMENT_ID_]) REFERENCES [ACT_CMMN_RE_DEPLOYMENT] ([ID_])
-GO
-
-CREATE NONCLUSTERED INDEX ACT_IDX_CASE_DEF_DPLY ON [ACT_CMMN_RE_CASEDEF]([DEPLOYMENT_ID_])
-GO
-
-CREATE TABLE [ACT_CMMN_RU_CASE_INST] ([ID_] [varchar](255) NOT NULL, [REV_] [int] NOT NULL, [BUSINESS_KEY_] [varchar](255), [NAME_] [varchar](255), [PARENT_ID_] [varchar](255), [CASE_DEF_ID_] [varchar](255), [STATE_] [varchar](255), [START_TIME_] [datetime], [START_USER_ID_] [varchar](255), [CALLBACK_ID_] [varchar](255), [CALLBACK_TYPE_] [varchar](255), [TENANT_ID_] [varchar](255) CONSTRAINT [DF_ACT_CMMN_RU_CASE_INST_TENANT_ID_] DEFAULT '', CONSTRAINT [PK_ACT_CMMN_RU_CASE_INST] PRIMARY KEY ([ID_]))
-GO
-
-ALTER TABLE [ACT_CMMN_RU_CASE_INST] ADD CONSTRAINT [ACT_FK_CASE_INST_CASE_DEF] FOREIGN KEY ([CASE_DEF_ID_]) REFERENCES [ACT_CMMN_RE_CASEDEF] ([ID_])
-GO
-
-CREATE NONCLUSTERED INDEX ACT_IDX_CASE_INST_CASE_DEF ON [ACT_CMMN_RU_CASE_INST]([CASE_DEF_ID_])
-GO
-
-CREATE NONCLUSTERED INDEX ACT_IDX_CASE_INST_PARENT ON [ACT_CMMN_RU_CASE_INST]([PARENT_ID_])
-GO
-
-CREATE TABLE [ACT_CMMN_RU_PLAN_ITEM_INST] ([ID_] [varchar](255) NOT NULL, [REV_] [int] NOT NULL, [CASE_DEF_ID_] [varchar](255), [CASE_INST_ID_] [varchar](255), [STAGE_INST_ID_] [varchar](255), [IS_STAGE_] [bit], [ELEMENT_ID_] [varchar](255), [NAME_] [varchar](255), [STATE_] [varchar](255), [START_TIME_] [datetime], [START_USER_ID_] [varchar](255), [REFERENCE_ID_] [varchar](255), [REFERENCE_TYPE_] [varchar](255), [TENANT_ID_] [varchar](255) CONSTRAINT [DF_ACT_CMMN_RU_PLAN_ITEM_INST_TENANT_ID_] DEFAULT '', CONSTRAINT [PK_ACT_CMMN_RU_PLAN_ITEM_INST] PRIMARY KEY ([ID_]))
-GO
-
-ALTER TABLE [ACT_CMMN_RU_PLAN_ITEM_INST] ADD CONSTRAINT [ACT_FK_PLAN_ITEM_CASE_DEF] FOREIGN KEY ([CASE_DEF_ID_]) REFERENCES [ACT_CMMN_RE_CASEDEF] ([ID_])
-GO
-
-CREATE NONCLUSTERED INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON [ACT_CMMN_RU_PLAN_ITEM_INST]([CASE_DEF_ID_])
-GO
-
-ALTER TABLE [ACT_CMMN_RU_PLAN_ITEM_INST] ADD CONSTRAINT [ACT_FK_PLAN_ITEM_CASE_INST] FOREIGN KEY ([CASE_INST_ID_]) REFERENCES [ACT_CMMN_RU_CASE_INST] ([ID_])
-GO
-
-CREATE NONCLUSTERED INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON [ACT_CMMN_RU_PLAN_ITEM_INST]([CASE_INST_ID_])
-GO
-
-CREATE TABLE [ACT_CMMN_RU_SENTRY_ON_PART_INST] ([ID_] [varchar](255) NOT NULL, [REV_] [int] NOT NULL, [CASE_DEF_ID_] [varchar](255), [CASE_INST_ID_] [varchar](255), [PLAN_ITEM_INST_ID_] [varchar](255), [ON_PART_ID_] [varchar](255), [TIME_STAMP_] [datetime], CONSTRAINT [PK_ACT_CMMN_RU_SENTRY_ON_PART_INST] PRIMARY KEY ([ID_]))
-GO
-
-ALTER TABLE [ACT_CMMN_RU_SENTRY_ON_PART_INST] ADD CONSTRAINT [ACT_FK_SENTRY_CASE_DEF] FOREIGN KEY ([CASE_DEF_ID_]) REFERENCES [ACT_CMMN_RE_CASEDEF] ([ID_])
-GO
-
-CREATE NONCLUSTERED INDEX ACT_IDX_SENTRY_CASE_DEF ON [ACT_CMMN_RU_SENTRY_ON_PART_INST]([CASE_DEF_ID_])
-GO
-
-ALTER TABLE [ACT_CMMN_RU_SENTRY_ON_PART_INST] ADD CONSTRAINT [ACT_FK_SENTRY_CASE_INST] FOREIGN KEY ([CASE_INST_ID_]) REFERENCES [ACT_CMMN_RU_CASE_INST] ([ID_])
-GO
-
-CREATE NONCLUSTERED INDEX ACT_IDX_SENTRY_CASE_INST ON [ACT_CMMN_RU_SENTRY_ON_PART_INST]([CASE_INST_ID_])
-GO
-
-ALTER TABLE [ACT_CMMN_RU_SENTRY_ON_PART_INST] ADD CONSTRAINT [ACT_FK_SENTRY_PLAN_ITEM] FOREIGN KEY ([PLAN_ITEM_INST_ID_]) REFERENCES [ACT_CMMN_RU_PLAN_ITEM_INST] ([ID_])
-GO
-
-CREATE NONCLUSTERED INDEX ACT_IDX_SENTRY_PLAN_ITEM ON [ACT_CMMN_RU_SENTRY_ON_PART_INST]([PLAN_ITEM_INST_ID_])
-GO
-
-CREATE TABLE [ACT_CMMN_RU_MIL_INST] ([ID_] [varchar](255) NOT NULL, [NAME_] [varchar](255) NOT NULL, [TIME_STAMP_] [datetime] NOT NULL, [CASE_INST_ID_] [varchar](255) NOT NULL, [CASE_DEF_ID_] [varchar](255) NOT NULL, [ELEMENT_ID_] [varchar](255) NOT NULL, CONSTRAINT [PK_ACT_CMMN_RU_MIL_INST] PRIMARY KEY ([ID_]))
-GO
-
-ALTER TABLE [ACT_CMMN_RU_MIL_INST] ADD CONSTRAINT [ACT_FK_MIL_CASE_DEF] FOREIGN KEY ([CASE_DEF_ID_]) REFERENCES [ACT_CMMN_RE_CASEDEF] ([ID_])
-GO
-
-CREATE NONCLUSTERED INDEX ACT_IDX_MIL_CASE_DEF ON [ACT_CMMN_RU_MIL_INST]([CASE_DEF_ID_])
-GO
-
-ALTER TABLE [ACT_CMMN_RU_MIL_INST] ADD CONSTRAINT [ACT_FK_MIL_CASE_INST] FOREIGN KEY ([CASE_INST_ID_]) REFERENCES [ACT_CMMN_RU_CASE_INST] ([ID_])
-GO
-
-CREATE NONCLUSTERED INDEX ACT_IDX_MIL_CASE_INST ON [ACT_CMMN_RU_MIL_INST]([CASE_INST_ID_])
-GO
-
-CREATE TABLE [ACT_CMMN_HI_CASE_INST] ([ID_] [varchar](255) NOT NULL, [REV_] [int] NOT NULL, [BUSINESS_KEY_] [varchar](255), [NAME_] [varchar](255), [PARENT_ID_] [varchar](255), [CASE_DEF_ID_] [varchar](255), [STATE_] [varchar](255), [START_TIME_] [datetime], [END_TIME_] [datetime], [START_USER_ID_] [varchar](255), [CALLBACK_ID_] [varchar](255), [CALLBACK_TYPE_] [varchar](255), [TENANT_ID_] [varchar](255) CONSTRAINT [DF_ACT_CMMN_HI_CASE_INST_TENANT_ID_] DEFAULT '', CONSTRAINT [PK_ACT_CMMN_HI_CASE_INST] PRIMARY KEY ([ID_]))
-GO
-
-CREATE TABLE [ACT_CMMN_HI_MIL_INST] ([ID_] [varchar](255) NOT NULL, [REV_] [int] NOT NULL, [NAME_] [varchar](255) NOT NULL, [TIME_STAMP_] [datetime] NOT NULL, [CASE_INST_ID_] [varchar](255) NOT NULL, [CASE_DEF_ID_] [varchar](255) NOT NULL, [ELEMENT_ID_] [varchar](255) NOT NULL, CONSTRAINT [PK_ACT_CMMN_HI_MIL_INST] PRIMARY KEY ([ID_]))
-GO
-
-INSERT INTO [DATABASECHANGELOG] ([ID], [AUTHOR], [FILENAME], [DATEEXECUTED], [ORDEREXECUTED], [MD5SUM], [DESCRIPTION], [COMMENTS], [EXECTYPE], [CONTEXTS], [LABELS], [LIQUIBASE], [DEPLOYMENT_ID]) VALUES ('1', 'flowable', 'org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog.xml', GETDATE(), 1, '7:28e5931d36abab0185c189c584a7c2d0', 'createTable tableName=ACT_CMMN_RE_DEPLOYMENT; createTable tableName=ACT_CMMN_RE_DEPLOYMENT_RESOURCE; addForeignKeyConstraint baseTableName=ACT_CMMN_RE_DEPLOYMENT_RESOURCE, constraintName=ACT_FK_CMMN_RSRC_DPL, referencedTableName=ACT_CMMN_RE_DEPLOY...', '', 'EXECUTED', NULL, NULL, '3.5.3', '4471205429')
-GO
-
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.mssql.create.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.mssql.create.cmmn.sql
new file mode 100644
index 00000000000..c11feb348d3
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.mssql.create.cmmn.sql
@@ -0,0 +1,200 @@
+CREATE TABLE ACT_CMMN_DEPLOYMENT (ID_ varchar(255) NOT NULL, NAME_ varchar(255), CATEGORY_ varchar(255), KEY_ varchar(255), DEPLOY_TIME_ datetime, PARENT_DEPLOYMENT_ID_ varchar(255), TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_DEPLOYMENT_TENANT_ID_ DEFAULT '', CONSTRAINT PK_ACT_CMMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_DEPLOYMENT_RESOURCE (ID_ varchar(255) NOT NULL, NAME_ varchar(255), DEPLOYMENT_ID_ varchar(255), RESOURCE_BYTES_ varbinary(MAX), CONSTRAINT PK_CMMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_CASEDEF (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, NAME_ varchar(255), KEY_ varchar(255) NOT NULL, VERSION_ int NOT NULL, CATEGORY_ varchar(255), DEPLOYMENT_ID_ varchar(255), RESOURCE_NAME_ varchar(4000), DESCRIPTION_ varchar(4000), HAS_GRAPHICAL_NOTATION_ bit, TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_CASEDEF_TENANT_ID_ DEFAULT '', CONSTRAINT PK_ACT_CMMN_CASEDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_CASEDEF(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, BUSINESS_KEY_ varchar(255), NAME_ varchar(255), PARENT_ID_ varchar(255), CASE_DEF_ID_ varchar(255), STATE_ varchar(255), START_TIME_ datetime, START_USER_ID_ varchar(255), CALLBACK_ID_ varchar(255), CALLBACK_TYPE_ varchar(255), TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_RU_CASE_INST_TENANT_ID_ DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, CASE_DEF_ID_ varchar(255), CASE_INST_ID_ varchar(255), STAGE_INST_ID_ varchar(255), IS_STAGE_ bit, ELEMENT_ID_ varchar(255), NAME_ varchar(255), STATE_ varchar(255), START_TIME_ datetime, START_USER_ID_ varchar(255), REFERENCE_ID_ varchar(255), REFERENCE_TYPE_ varchar(255), TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_RU_PLAN_ITEM_INST_TENANT_ID_ DEFAULT '', CONSTRAINT PK_CMMN_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_SENTRY_PART_INST (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, CASE_DEF_ID_ varchar(255), CASE_INST_ID_ varchar(255), PLAN_ITEM_INST_ID_ varchar(255), ON_PART_ID_ varchar(255), IF_PART_ID_ varchar(255), TIME_STAMP_ datetime, CONSTRAINT PK_CMMN_SENTRY_PART_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_PART_INST(PLAN_ITEM_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ varchar(255) NOT NULL, NAME_ varchar(255) NOT NULL, TIME_STAMP_ datetime NOT NULL, CASE_INST_ID_ varchar(255) NOT NULL, CASE_DEF_ID_ varchar(255) NOT NULL, ELEMENT_ID_ varchar(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, BUSINESS_KEY_ varchar(255), NAME_ varchar(255), PARENT_ID_ varchar(255), CASE_DEF_ID_ varchar(255), STATE_ varchar(255), START_TIME_ datetime, END_TIME_ datetime, START_USER_ID_ varchar(255), CALLBACK_ID_ varchar(255), CALLBACK_TYPE_ varchar(255), TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_HI_CASE_INST_TENANT_ID_ DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, NAME_ varchar(255) NOT NULL, TIME_STAMP_ datetime NOT NULL, CASE_INST_ID_ varchar(255) NOT NULL, CASE_DEF_ID_ varchar(255) NOT NULL, ELEMENT_ID_ varchar(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD DGRM_RESOURCE_NAME_ varchar(4000);
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD HAS_START_FORM_KEY_ bit;
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD GENERATED_ bit;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_TYPE_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COMPLETEABLE_ bit;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD IS_COMPLETEABLE_ bit;
+
+CREATE NONCLUSTERED INDEX ACT_IDX_PLAN_ITEM_STAGE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(STAGE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COUNT_ENABLED_ bit;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD VAR_COUNT_ int;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD SENTRY_PART_INST_COUNT_ int;
+
+CREATE TABLE ACT_CMMN_HI_PLAN_ITEM_INST (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, NAME_ varchar(255), STATE_ varchar(255), CASE_DEF_ID_ varchar(255), CASE_INST_ID_ varchar(255), STAGE_INST_ID_ varchar(255), IS_STAGE_ bit, ELEMENT_ID_ varchar(255), ITEM_DEFINITION_ID_ varchar(255), ITEM_DEFINITION_TYPE_ varchar(255), CREATED_TIME_ datetime, LAST_AVAILABLE_TIME_ datetime, LAST_ENABLED_TIME_ datetime, LAST_DISABLED_TIME_ datetime, LAST_STARTED_TIME_ datetime, LAST_SUSPENDED_TIME_ datetime, COMPLETED_TIME_ datetime, OCCURRED_TIME_ datetime, TERMINATED_TIME_ datetime, EXIT_TIME_ datetime, ENDED_TIME_ datetime, LAST_UPDATED_TIME_ datetime, START_USER_ID_ varchar(255), REFERENCE_ID_ varchar(255), REFERENCE_TYPE_ varchar(255), TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_HI_PLAN_ITEM_INST_TENANT_ID_ DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_RU_MIL_INST_TENANT_ID_ DEFAULT '';
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ADD TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_HI_MIL_INST_TENANT_ID_ DEFAULT '';
+
+CREATE UNIQUE NONCLUSTERED INDEX ACT_IDX_CASE_DEF_UNIQ ON ACT_CMMN_CASEDEF(KEY_, VERSION_, TENANT_ID_);
+
+exec sp_rename 'ACT_CMMN_RU_PLAN_ITEM_INST.START_TIME_', 'CREATE_TIME_', 'COLUMN';
+
+exec sp_rename 'ACT_CMMN_HI_PLAN_ITEM_INST.CREATED_TIME_', 'CREATE_TIME_', 'COLUMN';
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_AVAILABLE_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_ENABLED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_DISABLED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_STARTED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_SUSPENDED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD COMPLETED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD OCCURRED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD TERMINATED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENDED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD SHOW_IN_OVERVIEW_ bit;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXTRA_VALUE_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXTRA_VALUE_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_TYPE_ varchar(255);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_CASE_INST_REF_ID_ ON ACT_CMMN_RU_CASE_INST(REFERENCE_ID_);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_TYPE_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_OWNER_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_USER_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_USER_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD BUSINESS_STATUS_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD BUSINESS_STATUS_ varchar(255);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_HI_CASE_INST_END ON ACT_CMMN_HI_CASE_INST(END_TIME_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_HI_PLAN_ITEM_INST_CASE ON ACT_CMMN_HI_PLAN_ITEM_INST(CASE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_CASEDEF ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_CASEDEF ALTER COLUMN RESOURCE_NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_CASEDEF ALTER COLUMN DGRM_RESOURCE_NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ALTER COLUMN BUSINESS_KEY_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ALTER COLUMN BUSINESS_STATUS_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ALTER COLUMN BUSINESS_KEY_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ALTER COLUMN BUSINESS_STATUS_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_CASEDEF ALTER COLUMN DESCRIPTION_ nvarchar(4000);
+
+insert into ACT_GE_PROPERTY
+values ('cmmn.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.mysql.cmmn.create.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.mysql.cmmn.create.sql
deleted file mode 100644
index eeeb2fbec41..00000000000
--- a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.mysql.cmmn.create.sql
+++ /dev/null
@@ -1,65 +0,0 @@
-
-CREATE TABLE DATABASECHANGELOG (ID VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, FILENAME VARCHAR(255) NOT NULL, DATEEXECUTED datetime NOT NULL, ORDEREXECUTED INT NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35) NULL, DESCRIPTION VARCHAR(255) NULL, COMMENTS VARCHAR(255) NULL, TAG VARCHAR(255) NULL, LIQUIBASE VARCHAR(20) NULL, CONTEXTS VARCHAR(255) NULL, LABELS VARCHAR(255) NULL, DEPLOYMENT_ID VARCHAR(10) NULL);
-
-CREATE TABLE ACT_CMMN_RE_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOY_TIME_ datetime NULL, PARENT_DEPLOYMENT_ID_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) NULL, CONSTRAINT PK_ACT_CMMN_RE_DEPLOYMENT PRIMARY KEY (ID_));
-
-CREATE TABLE ACT_CMMN_RE_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, RESOURCE_BYTES_ LONGBLOB NULL, CONSTRAINT PK_ACT_CMMN_RE_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RE_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_RE_DEPLOYMENT (ID_);
-
-CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_RE_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
-
-CREATE TABLE ACT_CMMN_RE_CASEDEF (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NULL, KEY_ VARCHAR(255) NOT NULL, VERSION_ VARCHAR(255) NOT NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, RESOURCE_NAME_ VARCHAR(4000) NULL, DESCRIPTION_ VARCHAR(4000) NULL, HAS_GRAPHICAL_NOTATION_ BIT(1) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NOT NULL, CONSTRAINT PK_ACT_CMMN_RE_CASEDEF PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RE_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_RE_DEPLOYMENT (ID_);
-
-CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_RE_CASEDEF(DEPLOYMENT_ID_);
-
-CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255) NULL, NAME_ VARCHAR(255) NULL, PARENT_ID_ VARCHAR(255) NULL, CASE_DEF_ID_ VARCHAR(255) NULL, STATE_ VARCHAR(255) NULL, START_TIME_ datetime NULL, START_USER_ID_ VARCHAR(255) NULL, CALLBACK_ID_ VARCHAR(255) NULL, CALLBACK_TYPE_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
-
-CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
-
-CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255) NULL, CASE_INST_ID_ VARCHAR(255) NULL, STAGE_INST_ID_ VARCHAR(255) NULL, IS_STAGE_ BIT(1) NULL, ELEMENT_ID_ VARCHAR(255) NULL, NAME_ VARCHAR(255) NULL, STATE_ VARCHAR(255) NULL, START_TIME_ datetime NULL, START_USER_ID_ VARCHAR(255) NULL, REFERENCE_ID_ VARCHAR(255) NULL, REFERENCE_TYPE_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_CMMN_RU_PLAN_ITEM_INST PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
-
-ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
-
-CREATE TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255) NULL, CASE_INST_ID_ VARCHAR(255) NULL, PLAN_ITEM_INST_ID_ VARCHAR(255) NULL, ON_PART_ID_ VARCHAR(255) NULL, TIME_STAMP_ datetime NULL, CONSTRAINT PK_ACT_CMMN_RU_SENTRY_ON_PART_INST PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_ON_PART_INST(CASE_DEF_ID_);
-
-ALTER TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_ON_PART_INST(CASE_INST_ID_);
-
-ALTER TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
-
-CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_ON_PART_INST(PLAN_ITEM_INST_ID_);
-
-CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ datetime NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
-
-ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
-
-CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255) NULL, NAME_ VARCHAR(255) NULL, PARENT_ID_ VARCHAR(255) NULL, CASE_DEF_ID_ VARCHAR(255) NULL, STATE_ VARCHAR(255) NULL, START_TIME_ datetime NULL, END_TIME_ datetime NULL, START_USER_ID_ VARCHAR(255) NULL, CALLBACK_ID_ VARCHAR(255) NULL, CALLBACK_TYPE_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
-
-CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ datetime NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
-
-INSERT INTO DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('1', 'flowable', 'org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog.xml', NOW(), 1, '7:28e5931d36abab0185c189c584a7c2d0', 'createTable tableName=ACT_CMMN_RE_DEPLOYMENT; createTable tableName=ACT_CMMN_RE_DEPLOYMENT_RESOURCE; addForeignKeyConstraint baseTableName=ACT_CMMN_RE_DEPLOYMENT_RESOURCE, constraintName=ACT_FK_CMMN_RSRC_DPL, referencedTableName=ACT_CMMN_RE_DEPLOY...', '', 'EXECUTED', NULL, NULL, '3.5.3', '4471205295');
-
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.mysql.create.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.mysql.create.cmmn.sql
new file mode 100644
index 00000000000..2200d2bcf07
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.mysql.create.cmmn.sql
@@ -0,0 +1,178 @@
+CREATE TABLE ACT_CMMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, KEY_ VARCHAR(255) NULL, DEPLOY_TIME_ datetime NULL, PARENT_DEPLOYMENT_ID_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_CMMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, RESOURCE_BYTES_ LONGBLOB NULL, CONSTRAINT PK_CMMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_CASEDEF (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NULL, KEY_ VARCHAR(255) NOT NULL, VERSION_ INT NOT NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, RESOURCE_NAME_ VARCHAR(4000) NULL, DESCRIPTION_ VARCHAR(4000) NULL, HAS_GRAPHICAL_NOTATION_ TINYINT NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_CMMN_CASEDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_CASEDEF(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255) NULL, NAME_ VARCHAR(255) NULL, PARENT_ID_ VARCHAR(255) NULL, CASE_DEF_ID_ VARCHAR(255) NULL, STATE_ VARCHAR(255) NULL, START_TIME_ datetime NULL, START_USER_ID_ VARCHAR(255) NULL, CALLBACK_ID_ VARCHAR(255) NULL, CALLBACK_TYPE_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255) NULL, CASE_INST_ID_ VARCHAR(255) NULL, STAGE_INST_ID_ VARCHAR(255) NULL, IS_STAGE_ TINYINT NULL, ELEMENT_ID_ VARCHAR(255) NULL, NAME_ VARCHAR(255) NULL, STATE_ VARCHAR(255) NULL, START_TIME_ datetime NULL, START_USER_ID_ VARCHAR(255) NULL, REFERENCE_ID_ VARCHAR(255) NULL, REFERENCE_TYPE_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_CMMN_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_SENTRY_PART_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255) NULL, CASE_INST_ID_ VARCHAR(255) NULL, PLAN_ITEM_INST_ID_ VARCHAR(255) NULL, ON_PART_ID_ VARCHAR(255) NULL, IF_PART_ID_ VARCHAR(255) NULL, TIME_STAMP_ datetime NULL, CONSTRAINT PK_CMMN_SENTRY_PART_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_PART_INST(PLAN_ITEM_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ datetime NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255) NULL, NAME_ VARCHAR(255) NULL, PARENT_ID_ VARCHAR(255) NULL, CASE_DEF_ID_ VARCHAR(255) NULL, STATE_ VARCHAR(255) NULL, START_TIME_ datetime NULL, END_TIME_ datetime NULL, START_USER_ID_ VARCHAR(255) NULL, CALLBACK_ID_ VARCHAR(255) NULL, CALLBACK_TYPE_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ datetime NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD DGRM_RESOURCE_NAME_ VARCHAR(4000) NULL, ADD HAS_START_FORM_KEY_ TINYINT NULL;
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD GENERATED_ TINYINT NULL;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_TIME_ datetime NULL;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_ID_ VARCHAR(255) NULL, ADD ITEM_DEFINITION_TYPE_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COMPLETEABLE_ TINYINT NULL;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD IS_COMPLETEABLE_ TINYINT NULL;
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_STAGE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(STAGE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COUNT_ENABLED_ TINYINT NULL;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD VAR_COUNT_ INT NULL;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD SENTRY_PART_INST_COUNT_ INT NULL;
+
+CREATE TABLE ACT_CMMN_HI_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NULL, STATE_ VARCHAR(255) NULL, CASE_DEF_ID_ VARCHAR(255) NULL, CASE_INST_ID_ VARCHAR(255) NULL, STAGE_INST_ID_ VARCHAR(255) NULL, IS_STAGE_ TINYINT NULL, ELEMENT_ID_ VARCHAR(255) NULL, ITEM_DEFINITION_ID_ VARCHAR(255) NULL, ITEM_DEFINITION_TYPE_ VARCHAR(255) NULL, CREATED_TIME_ datetime NULL, LAST_AVAILABLE_TIME_ datetime NULL, LAST_ENABLED_TIME_ datetime NULL, LAST_DISABLED_TIME_ datetime NULL, LAST_STARTED_TIME_ datetime NULL, LAST_SUSPENDED_TIME_ datetime NULL, COMPLETED_TIME_ datetime NULL, OCCURRED_TIME_ datetime NULL, TERMINATED_TIME_ datetime NULL, EXIT_TIME_ datetime NULL, ENDED_TIME_ datetime NULL, LAST_UPDATED_TIME_ datetime NULL, START_USER_ID_ VARCHAR(255) NULL, REFERENCE_ID_ VARCHAR(255) NULL, REFERENCE_TYPE_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_CMMN_HI_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '' NULL;
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '' NULL;
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT MODIFY DEPLOY_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST MODIFY START_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST MODIFY START_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST MODIFY TIME_STAMP_ datetime(3);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST MODIFY TIME_STAMP_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST MODIFY START_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST MODIFY END_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST MODIFY TIME_STAMP_ datetime(3);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST MODIFY LOCK_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY CREATED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY LAST_AVAILABLE_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY LAST_ENABLED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY LAST_DISABLED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY LAST_STARTED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY LAST_SUSPENDED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY COMPLETED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY OCCURRED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY TERMINATED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY EXIT_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY ENDED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY LAST_UPDATED_TIME_ datetime(3);
+
+CREATE UNIQUE INDEX ACT_IDX_CASE_DEF_UNIQ ON ACT_CMMN_CASEDEF(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST CHANGE START_TIME_ CREATE_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST CHANGE CREATED_TIME_ CREATE_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_AVAILABLE_TIME_ datetime(3) NULL, ADD LAST_ENABLED_TIME_ datetime(3) NULL, ADD LAST_DISABLED_TIME_ datetime(3) NULL, ADD LAST_STARTED_TIME_ datetime(3) NULL, ADD LAST_SUSPENDED_TIME_ datetime(3) NULL, ADD COMPLETED_TIME_ datetime(3) NULL, ADD OCCURRED_TIME_ datetime(3) NULL, ADD TERMINATED_TIME_ datetime(3) NULL, ADD EXIT_TIME_ datetime(3) NULL, ADD ENDED_TIME_ datetime(3) NULL, ADD ENTRY_CRITERION_ID_ VARCHAR(255) NULL, ADD EXIT_CRITERION_ID_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255) NULL, ADD EXIT_CRITERION_ID_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD SHOW_IN_OVERVIEW_ TINYINT NULL;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_ID_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255) NULL;
+
+CREATE INDEX ACT_IDX_CASE_INST_REF_ID_ ON ACT_CMMN_RU_CASE_INST(REFERENCE_ID_);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_ID_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_OWNER_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ datetime(3) NULL;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ datetime(3) NULL;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_TIME_ datetime(3) NULL, ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_TIME_ datetime(3) NULL, ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255) NULL;
+
+CREATE INDEX ACT_IDX_HI_CASE_INST_END ON ACT_CMMN_HI_CASE_INST(END_TIME_);
+
+CREATE INDEX ACT_IDX_HI_PLAN_ITEM_INST_CASE ON ACT_CMMN_HI_PLAN_ITEM_INST(CASE_INST_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('cmmn.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.oracle.cmmn.create.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.oracle.cmmn.create.sql
deleted file mode 100644
index 5869471358d..00000000000
--- a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.oracle.cmmn.create.sql
+++ /dev/null
@@ -1,67 +0,0 @@
-
-SET DEFINE OFF;
-
-CREATE TABLE DATABASECHANGELOG (ID VARCHAR2(255) NOT NULL, AUTHOR VARCHAR2(255) NOT NULL, FILENAME VARCHAR2(255) NOT NULL, DATEEXECUTED TIMESTAMP NOT NULL, ORDEREXECUTED INTEGER NOT NULL, EXECTYPE VARCHAR2(10) NOT NULL, MD5SUM VARCHAR2(35), DESCRIPTION VARCHAR2(255), COMMENTS VARCHAR2(255), TAG VARCHAR2(255), LIQUIBASE VARCHAR2(20), CONTEXTS VARCHAR2(255), LABELS VARCHAR2(255), DEPLOYMENT_ID VARCHAR2(10));
-
-CREATE TABLE ACT_CMMN_RE_DEPLOYMENT (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), DEPLOY_TIME_ TIMESTAMP, PARENT_DEPLOYMENT_ID_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255), CONSTRAINT PK_ACT_CMMN_RE_DEPLOYMENT PRIMARY KEY (ID_));
-
-CREATE TABLE ACT_CMMN_RE_DEPLOYMENT_RESOURCE (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_ACT_CMMN_RE_DEPLOYMENT_RESO PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RE_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_RE_DEPLOYMENT (ID_);
-
-CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_RE_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
-
-CREATE TABLE ACT_CMMN_RE_CASEDEF (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR2(255), KEY_ VARCHAR2(255) NOT NULL, VERSION_ VARCHAR2(255) NOT NULL, CATEGORY_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), RESOURCE_NAME_ VARCHAR2(4000), DESCRIPTION_ VARCHAR2(4000), HAS_GRAPHICAL_NOTATION_ NUMBER(1), TENANT_ID_ VARCHAR2(255) DEFAULT '' NOT NULL, CONSTRAINT PK_ACT_CMMN_RE_CASEDEF PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RE_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_RE_DEPLOYMENT (ID_);
-
-CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_RE_CASEDEF(DEPLOYMENT_ID_);
-
-CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, BUSINESS_KEY_ VARCHAR2(255), NAME_ VARCHAR2(255), PARENT_ID_ VARCHAR2(255), CASE_DEF_ID_ VARCHAR2(255), STATE_ VARCHAR2(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR2(255), CALLBACK_ID_ VARCHAR2(255), CALLBACK_TYPE_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
-
-CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
-
-CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, CASE_DEF_ID_ VARCHAR2(255), CASE_INST_ID_ VARCHAR2(255), STAGE_INST_ID_ VARCHAR2(255), IS_STAGE_ NUMBER(1), ELEMENT_ID_ VARCHAR2(255), NAME_ VARCHAR2(255), STATE_ VARCHAR2(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR2(255), REFERENCE_ID_ VARCHAR2(255), REFERENCE_TYPE_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_PLAN_ITEM_INST PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
-
-ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
-
-CREATE TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, CASE_DEF_ID_ VARCHAR2(255), CASE_INST_ID_ VARCHAR2(255), PLAN_ITEM_INST_ID_ VARCHAR2(255), ON_PART_ID_ VARCHAR2(255), TIME_STAMP_ TIMESTAMP, CONSTRAINT PK_ACT_CMMN_RU_SENTRY_ON_PART_ PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_ON_PART_INST(CASE_DEF_ID_);
-
-ALTER TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_ON_PART_INST(CASE_INST_ID_);
-
-ALTER TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
-
-CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_ON_PART_INST(PLAN_ITEM_INST_ID_);
-
-CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR2(255) NOT NULL, CASE_DEF_ID_ VARCHAR2(255) NOT NULL, ELEMENT_ID_ VARCHAR2(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
-
-ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
-
-CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, BUSINESS_KEY_ VARCHAR2(255), NAME_ VARCHAR2(255), PARENT_ID_ VARCHAR2(255), CASE_DEF_ID_ VARCHAR2(255), STATE_ VARCHAR2(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR2(255), CALLBACK_ID_ VARCHAR2(255), CALLBACK_TYPE_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
-
-CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR2(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR2(255) NOT NULL, CASE_DEF_ID_ VARCHAR2(255) NOT NULL, ELEMENT_ID_ VARCHAR2(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
-
-INSERT INTO DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('1', 'flowable', 'org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog.xml', SYSTIMESTAMP, 1, '7:28e5931d36abab0185c189c584a7c2d0', 'createTable tableName=ACT_CMMN_RE_DEPLOYMENT; createTable tableName=ACT_CMMN_RE_DEPLOYMENT_RESOURCE; addForeignKeyConstraint baseTableName=ACT_CMMN_RE_DEPLOYMENT_RESOURCE, constraintName=ACT_FK_CMMN_RSRC_DPL, referencedTableName=ACT_CMMN_RE_DEPLOY...', '', 'EXECUTED', NULL, NULL, '3.5.3', '4471204819');
-
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.oracle.create.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.oracle.create.cmmn.sql
new file mode 100644
index 00000000000..a9bfedb5f70
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.oracle.create.cmmn.sql
@@ -0,0 +1,168 @@
+CREATE TABLE ACT_CMMN_DEPLOYMENT (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), KEY_ VARCHAR2(255), DEPLOY_TIME_ TIMESTAMP, PARENT_DEPLOYMENT_ID_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_CMMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_CASEDEF (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR2(255), KEY_ VARCHAR2(255) NOT NULL, VERSION_ INTEGER NOT NULL, CATEGORY_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), RESOURCE_NAME_ VARCHAR2(4000), DESCRIPTION_ VARCHAR2(4000), HAS_GRAPHICAL_NOTATION_ NUMBER(1), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_CASEDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_CASEDEF(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, BUSINESS_KEY_ VARCHAR2(255), NAME_ VARCHAR2(255), PARENT_ID_ VARCHAR2(255), CASE_DEF_ID_ VARCHAR2(255), STATE_ VARCHAR2(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR2(255), CALLBACK_ID_ VARCHAR2(255), CALLBACK_TYPE_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, CASE_DEF_ID_ VARCHAR2(255), CASE_INST_ID_ VARCHAR2(255), STAGE_INST_ID_ VARCHAR2(255), IS_STAGE_ NUMBER(1), ELEMENT_ID_ VARCHAR2(255), NAME_ VARCHAR2(255), STATE_ VARCHAR2(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR2(255), REFERENCE_ID_ VARCHAR2(255), REFERENCE_TYPE_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_CMMN_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_SENTRY_PART_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, CASE_DEF_ID_ VARCHAR2(255), CASE_INST_ID_ VARCHAR2(255), PLAN_ITEM_INST_ID_ VARCHAR2(255), ON_PART_ID_ VARCHAR2(255), IF_PART_ID_ VARCHAR2(255), TIME_STAMP_ TIMESTAMP, CONSTRAINT PK_CMMN_SENTRY_PART_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_PART_INST(PLAN_ITEM_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR2(255) NOT NULL, CASE_DEF_ID_ VARCHAR2(255) NOT NULL, ELEMENT_ID_ VARCHAR2(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, BUSINESS_KEY_ VARCHAR2(255), NAME_ VARCHAR2(255), PARENT_ID_ VARCHAR2(255), CASE_DEF_ID_ VARCHAR2(255), STATE_ VARCHAR2(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR2(255), CALLBACK_ID_ VARCHAR2(255), CALLBACK_TYPE_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR2(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR2(255) NOT NULL, CASE_DEF_ID_ VARCHAR2(255) NOT NULL, ELEMENT_ID_ VARCHAR2(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD DGRM_RESOURCE_NAME_ VARCHAR2(4000);
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD HAS_START_FORM_KEY_ NUMBER(1);
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD GENERATED_ NUMBER(1);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_TYPE_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COMPLETEABLE_ NUMBER(1);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD IS_COMPLETEABLE_ NUMBER(1);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_STAGE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(STAGE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COUNT_ENABLED_ NUMBER(1);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD VAR_COUNT_ INTEGER;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD SENTRY_PART_INST_COUNT_ INTEGER;
+
+CREATE TABLE ACT_CMMN_HI_PLAN_ITEM_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR2(255), STATE_ VARCHAR2(255), CASE_DEF_ID_ VARCHAR2(255), CASE_INST_ID_ VARCHAR2(255), STAGE_INST_ID_ VARCHAR2(255), IS_STAGE_ NUMBER(1), ELEMENT_ID_ VARCHAR2(255), ITEM_DEFINITION_ID_ VARCHAR2(255), ITEM_DEFINITION_TYPE_ VARCHAR2(255), CREATED_TIME_ TIMESTAMP, LAST_AVAILABLE_TIME_ TIMESTAMP, LAST_ENABLED_TIME_ TIMESTAMP, LAST_DISABLED_TIME_ TIMESTAMP, LAST_STARTED_TIME_ TIMESTAMP, LAST_SUSPENDED_TIME_ TIMESTAMP, COMPLETED_TIME_ TIMESTAMP, OCCURRED_TIME_ TIMESTAMP, TERMINATED_TIME_ TIMESTAMP, EXIT_TIME_ TIMESTAMP, ENDED_TIME_ TIMESTAMP, LAST_UPDATED_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR2(255), REFERENCE_ID_ VARCHAR2(255), REFERENCE_TYPE_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD TENANT_ID_ VARCHAR2(255) DEFAULT '';
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ADD TENANT_ID_ VARCHAR2(255) DEFAULT '';
+
+CREATE UNIQUE INDEX ACT_IDX_CASE_DEF_UNIQ ON ACT_CMMN_CASEDEF(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST RENAME COLUMN START_TIME_ TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST RENAME COLUMN CREATED_TIME_ TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_AVAILABLE_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_ENABLED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_DISABLED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_STARTED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_SUSPENDED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD COMPLETED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD OCCURRED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD TERMINATED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENDED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD SHOW_IN_OVERVIEW_ NUMBER(1);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_TYPE_ VARCHAR2(255);
+
+CREATE INDEX ACT_IDX_CASE_INST_REF_ID_ ON ACT_CMMN_RU_CASE_INST(REFERENCE_ID_);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_TYPE_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_OWNER_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD BUSINESS_STATUS_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD BUSINESS_STATUS_ VARCHAR2(255);
+
+CREATE INDEX ACT_IDX_HI_CASE_INST_END ON ACT_CMMN_HI_CASE_INST(END_TIME_);
+
+CREATE INDEX ACT_IDX_HI_PLAN_ITEM_INST_CASE ON ACT_CMMN_HI_PLAN_ITEM_INST(CASE_INST_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('cmmn.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.postgres.cmmn.create.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.postgres.cmmn.create.sql
deleted file mode 100644
index 92a21b2e091..00000000000
--- a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.postgres.cmmn.create.sql
+++ /dev/null
@@ -1,65 +0,0 @@
-
-CREATE TABLE databasechangelog (ID VARCHAR(255) NOT NULL, AUTHOR VARCHAR(255) NOT NULL, FILENAME VARCHAR(255) NOT NULL, DATEEXECUTED TIMESTAMP WITHOUT TIME ZONE NOT NULL, ORDEREXECUTED INT NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35), DESCRIPTION VARCHAR(255), COMMENTS VARCHAR(255), TAG VARCHAR(255), LIQUIBASE VARCHAR(20), CONTEXTS VARCHAR(255), LABELS VARCHAR(255), DEPLOYMENT_ID VARCHAR(10));
-
-CREATE TABLE ACT_CMMN_RE_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP WITHOUT TIME ZONE, PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), CONSTRAINT PK_ACT_CMMN_RE_DEPLOYMENT PRIMARY KEY (ID_));
-
-CREATE TABLE ACT_CMMN_RE_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BYTEA, CONSTRAINT PK_ACT_CMMN_RE_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RE_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_RE_DEPLOYMENT (ID_);
-
-CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_RE_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
-
-CREATE TABLE ACT_CMMN_RE_CASEDEF (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ VARCHAR(255) NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), HAS_GRAPHICAL_NOTATION_ BOOLEAN, TENANT_ID_ VARCHAR(255) DEFAULT '' NOT NULL, CONSTRAINT PK_ACT_CMMN_RE_CASEDEF PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RE_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_RE_DEPLOYMENT (ID_);
-
-CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_RE_CASEDEF(DEPLOYMENT_ID_);
-
-CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP WITHOUT TIME ZONE, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
-
-CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
-
-CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), NAME_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP WITHOUT TIME ZONE, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_PLAN_ITEM_INST PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
-
-ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
-
-CREATE TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), PLAN_ITEM_INST_ID_ VARCHAR(255), ON_PART_ID_ VARCHAR(255), TIME_STAMP_ TIMESTAMP WITHOUT TIME ZONE, CONSTRAINT PK_ACT_CMMN_RU_SENTRY_ON_PART_INST PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_ON_PART_INST(CASE_DEF_ID_);
-
-ALTER TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_ON_PART_INST(CASE_INST_ID_);
-
-ALTER TABLE ACT_CMMN_RU_SENTRY_ON_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
-
-CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_ON_PART_INST(PLAN_ITEM_INST_ID_);
-
-CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP WITHOUT TIME ZONE NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
-
-ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_RE_CASEDEF (ID_);
-
-CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
-
-ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
-
-CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
-
-CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP WITHOUT TIME ZONE, END_TIME_ TIMESTAMP WITHOUT TIME ZONE, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
-
-CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP WITHOUT TIME ZONE NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
-
-INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('1', 'flowable', 'org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog.xml', NOW(), 1, '7:28e5931d36abab0185c189c584a7c2d0', 'createTable tableName=ACT_CMMN_RE_DEPLOYMENT; createTable tableName=ACT_CMMN_RE_DEPLOYMENT_RESOURCE; addForeignKeyConstraint baseTableName=ACT_CMMN_RE_DEPLOYMENT_RESOURCE, constraintName=ACT_FK_CMMN_RSRC_DPL, referencedTableName=ACT_CMMN_RE_DEPLOY...', '', 'EXECUTED', NULL, NULL, '3.5.3', '4471205537');
-
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.postgres.create.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.postgres.create.cmmn.sql
new file mode 100644
index 00000000000..2b94aacc93f
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/create/flowable.postgres.create.cmmn.sql
@@ -0,0 +1,168 @@
+CREATE TABLE ACT_CMMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), KEY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP WITHOUT TIME ZONE, PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT "ACT_CMMN_DEPLOYMENT_pkey" PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BYTEA, CONSTRAINT PK_CMMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_CASEDEF (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ INTEGER NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), HAS_GRAPHICAL_NOTATION_ BOOLEAN, TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT "ACT_CMMN_CASEDEF_pkey" PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_CASEDEF(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP WITHOUT TIME ZONE, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT "ACT_CMMN_RU_CASE_INST_pkey" PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), NAME_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP WITHOUT TIME ZONE, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_CMMN_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_SENTRY_PART_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), PLAN_ITEM_INST_ID_ VARCHAR(255), ON_PART_ID_ VARCHAR(255), IF_PART_ID_ VARCHAR(255), TIME_STAMP_ TIMESTAMP WITHOUT TIME ZONE, CONSTRAINT PK_CMMN_SENTRY_PART_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_PART_INST(PLAN_ITEM_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP WITHOUT TIME ZONE NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT "ACT_CMMN_RU_MIL_INST_pkey" PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP WITHOUT TIME ZONE, END_TIME_ TIMESTAMP WITHOUT TIME ZONE, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT "ACT_CMMN_HI_CASE_INST_pkey" PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP WITHOUT TIME ZONE NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT "ACT_CMMN_HI_MIL_INST_pkey" PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD DGRM_RESOURCE_NAME_ VARCHAR(4000);
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD HAS_START_FORM_KEY_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD GENERATED_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_TIME_ TIMESTAMP WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_TYPE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COMPLETEABLE_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD IS_COMPLETEABLE_ BOOLEAN;
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_STAGE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(STAGE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COUNT_ENABLED_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD VAR_COUNT_ INTEGER;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD SENTRY_PART_INST_COUNT_ INTEGER;
+
+CREATE TABLE ACT_CMMN_HI_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255), STATE_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), ITEM_DEFINITION_ID_ VARCHAR(255), ITEM_DEFINITION_TYPE_ VARCHAR(255), CREATED_TIME_ TIMESTAMP WITHOUT TIME ZONE, LAST_AVAILABLE_TIME_ TIMESTAMP WITHOUT TIME ZONE, LAST_ENABLED_TIME_ TIMESTAMP WITHOUT TIME ZONE, LAST_DISABLED_TIME_ TIMESTAMP WITHOUT TIME ZONE, LAST_STARTED_TIME_ TIMESTAMP WITHOUT TIME ZONE, LAST_SUSPENDED_TIME_ TIMESTAMP WITHOUT TIME ZONE, COMPLETED_TIME_ TIMESTAMP WITHOUT TIME ZONE, OCCURRED_TIME_ TIMESTAMP WITHOUT TIME ZONE, TERMINATED_TIME_ TIMESTAMP WITHOUT TIME ZONE, EXIT_TIME_ TIMESTAMP WITHOUT TIME ZONE, ENDED_TIME_ TIMESTAMP WITHOUT TIME ZONE, LAST_UPDATED_TIME_ TIMESTAMP WITHOUT TIME ZONE, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT "ACT_CMMN_HI_PLAN_ITEM_INST_pkey" PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '';
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '';
+
+CREATE UNIQUE INDEX ACT_IDX_CASE_DEF_UNIQ ON ACT_CMMN_CASEDEF(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST RENAME COLUMN START_TIME_ TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST RENAME COLUMN CREATED_TIME_ TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_AVAILABLE_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_ENABLED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_DISABLED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_STARTED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_SUSPENDED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD COMPLETED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD OCCURRED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD TERMINATED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENDED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD SHOW_IN_OVERVIEW_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255);
+
+CREATE INDEX ACT_IDX_CASE_INST_REF_ID_ ON ACT_CMMN_RU_CASE_INST(REFERENCE_ID_);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_OWNER_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255);
+
+CREATE INDEX ACT_IDX_HI_CASE_INST_END ON ACT_CMMN_HI_CASE_INST(END_TIME_);
+
+CREATE INDEX ACT_IDX_HI_PLAN_ITEM_INST_CASE ON ACT_CMMN_HI_PLAN_ITEM_INST(CASE_INST_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('cmmn.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog-crdb.xml b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog-crdb.xml
deleted file mode 100644
index 8be6ebbb9fe..00000000000
--- a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog-crdb.xml
+++ /dev/null
@@ -1,579 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog.xml b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog.xml
deleted file mode 100644
index aefd19d300f..00000000000
--- a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/liquibase/flowable-cmmn-db-changelog.xml
+++ /dev/null
@@ -1,616 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/mapping/mappings.xml b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/mapping/mappings.xml
index 44767de5b23..8563d1edf21 100644
--- a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/mapping/mappings.xml
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/mapping/mappings.xml
@@ -27,6 +27,7 @@
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.all.upgradestep.7100.to.7101.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.all.upgradestep.7100.to.7101.cmmn.sql
new file mode 100644
index 00000000000..04f88fb1aa8
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.all.upgradestep.7100.to.7101.cmmn.sql
@@ -0,0 +1,5 @@
+insert into ACT_GE_PROPERTY
+values ('cmmn.schema.version', '7.1.0.1', 1);
+
+drop table ACT_CMMN_DATABASECHANGELOG;
+drop table ACT_CMMN_DATABASECHANGELOGLOCK;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6120.to.6200.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6120.to.6200.cmmn.sql
new file mode 100644
index 00000000000..2a9f418fc19
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6120.to.6200.cmmn.sql
@@ -0,0 +1,61 @@
+CREATE TABLE ACT_CMMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), KEY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_DEPLO PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_CMMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_CASEDEF (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ INTEGER NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), HAS_GRAPHICAL_NOTATION_ BOOLEAN, TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_CASED PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_CASEDEF(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CA PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), NAME_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_CMMN_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_SENTRY_PART_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), PLAN_ITEM_INST_ID_ VARCHAR(255), ON_PART_ID_ VARCHAR(255), IF_PART_ID_ VARCHAR(255), TIME_STAMP_ TIMESTAMP, CONSTRAINT PK_CMMN_SENTRY_PART_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_PART_INST(PLAN_ITEM_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MI PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CA PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MI PRIMARY KEY (ID_));
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6200.to.6210.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6200.to.6210.cmmn.sql
new file mode 100644
index 00000000000..6bac3251e33
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6200.to.6210.cmmn.sql
@@ -0,0 +1,21 @@
+ALTER TABLE ACT_CMMN_CASEDEF ADD DGRM_RESOURCE_NAME_ VARCHAR(4000);
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD HAS_START_FORM_KEY_ BOOLEAN;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_CASEDEF');
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD GENERATED_ BOOLEAN;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_DEPLOYMENT_RESOURCE');
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_TIME_ TIMESTAMP;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_CASE_INST');
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_TYPE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6210.to.6300.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6210.to.6300.cmmn.sql
new file mode 100644
index 00000000000..f99166e0367
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6210.to.6300.cmmn.sql
@@ -0,0 +1,23 @@
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COMPLETEABLE_ BOOLEAN;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD IS_COMPLETEABLE_ BOOLEAN;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_CASE_INST');
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_STAGE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(STAGE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COUNT_ENABLED_ BOOLEAN;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD VAR_COUNT_ INTEGER;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD SENTRY_PART_INST_COUNT_ INTEGER;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6300.to.6301.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6300.to.6301.cmmn.sql
new file mode 100644
index 00000000000..4900419a462
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6300.to.6301.cmmn.sql
@@ -0,0 +1,11 @@
+CREATE TABLE ACT_CMMN_HI_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR(255), STATE_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), ITEM_DEFINITION_ID_ VARCHAR(255), ITEM_DEFINITION_TYPE_ VARCHAR(255), CREATED_TIME_ TIMESTAMP, LAST_AVAILABLE_TIME_ TIMESTAMP, LAST_ENABLED_TIME_ TIMESTAMP, LAST_DISABLED_TIME_ TIMESTAMP, LAST_STARTED_TIME_ TIMESTAMP, LAST_SUSPENDED_TIME_ TIMESTAMP, COMPLETED_TIME_ TIMESTAMP, OCCURRED_TIME_ TIMESTAMP, TERMINATED_TIME_ TIMESTAMP, EXIT_TIME_ TIMESTAMP, ENDED_TIME_ TIMESTAMP, LAST_UPDATED_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_PL PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '';
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_MIL_INST');
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '';
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_MIL_INST');
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6400.to.6410.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6400.to.6410.cmmn.sql
new file mode 100644
index 00000000000..6be842d6c07
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6400.to.6410.cmmn.sql
@@ -0,0 +1,37 @@
+CREATE UNIQUE INDEX ACT_IDX_CASE_DEF_UNIQ ON ACT_CMMN_CASEDEF(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST RENAME COLUMN START_TIME_ TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST RENAME COLUMN CREATED_TIME_ TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_AVAILABLE_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_ENABLED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_DISABLED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_STARTED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_SUSPENDED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD COMPLETED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD OCCURRED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD TERMINATED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENDED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_PLAN_ITEM_INST');
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6501.to.6502.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6501.to.6502.cmmn.sql
new file mode 100644
index 00000000000..98bf75198bb
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6501.to.6502.cmmn.sql
@@ -0,0 +1,39 @@
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD SHOW_IN_OVERVIEW_ BOOLEAN;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_CASE_INST');
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_CASE_INST');
+
+CREATE INDEX ACT_IDX_CASE_INST_REF_ID_ ON ACT_CMMN_RU_CASE_INST(REFERENCE_ID_);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_CASE_INST');
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_CASE_INST');
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_PLAN_ITEM_INST');
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6511.to.6512.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6511.to.6512.cmmn.sql
new file mode 100644
index 00000000000..7aec452acb7
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6511.to.6512.cmmn.sql
@@ -0,0 +1,13 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_OWNER_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_CASE_INST');
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP(3);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_PLAN_ITEM_INST');
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP(3);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_PLAN_ITEM_INST');
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6601.to.6610.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6601.to.6610.cmmn.sql
new file mode 100644
index 00000000000..27791c9cab3
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6601.to.6610.cmmn.sql
@@ -0,0 +1,13 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_CASE_INST');
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_CASE_INST');
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6701.to.6710.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6701.to.6710.cmmn.sql
new file mode 100644
index 00000000000..3f2d3d4242b
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6701.to.6710.cmmn.sql
@@ -0,0 +1,9 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_RU_CASE_INST');
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_CMMN_HI_CASE_INST');
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6723.to.6800.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6723.to.6800.cmmn.sql
new file mode 100644
index 00000000000..4aac6aebcdd
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.6723.to.6800.cmmn.sql
@@ -0,0 +1,3 @@
+CREATE INDEX ACT_IDX_HI_CASE_INST_END ON ACT_CMMN_HI_CASE_INST(END_TIME_);
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.7000.to.7010.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.7000.to.7010.cmmn.sql
new file mode 100644
index 00000000000..caa1f35eae5
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.db2.upgradestep.7000.to.7010.cmmn.sql
@@ -0,0 +1,3 @@
+CREATE INDEX ACT_IDX_HI_PLAN_ITEM_INST_CASE ON ACT_CMMN_HI_PLAN_ITEM_INST(CASE_INST_ID_);
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6120.to.6200.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6120.to.6200.cmmn.sql
new file mode 100644
index 00000000000..b2a4b129af1
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6120.to.6200.cmmn.sql
@@ -0,0 +1,59 @@
+CREATE TABLE ACT_CMMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), KEY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_CMMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_CASEDEF (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ INT NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), HAS_GRAPHICAL_NOTATION_ BOOLEAN, TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_CASEDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_CASEDEF(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), NAME_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_CMMN_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_SENTRY_PART_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), PLAN_ITEM_INST_ID_ VARCHAR(255), ON_PART_ID_ VARCHAR(255), IF_PART_ID_ VARCHAR(255), TIME_STAMP_ TIMESTAMP, CONSTRAINT PK_CMMN_SENTRY_PART_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_PART_INST(PLAN_ITEM_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6200.to.6210.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6200.to.6210.cmmn.sql
new file mode 100644
index 00000000000..b517bacb76d
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6200.to.6210.cmmn.sql
@@ -0,0 +1,11 @@
+ALTER TABLE ACT_CMMN_CASEDEF ADD DGRM_RESOURCE_NAME_ VARCHAR(4000);
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD HAS_START_FORM_KEY_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD GENERATED_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_TYPE_ VARCHAR(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6210.to.6300.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6210.to.6300.cmmn.sql
new file mode 100644
index 00000000000..4402d66f34c
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6210.to.6300.cmmn.sql
@@ -0,0 +1,11 @@
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COMPLETEABLE_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD IS_COMPLETEABLE_ BOOLEAN;
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_STAGE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(STAGE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COUNT_ENABLED_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD VAR_COUNT_ INT;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD SENTRY_PART_INST_COUNT_ INT;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6300.to.6301.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6300.to.6301.cmmn.sql
new file mode 100644
index 00000000000..82af67c2997
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6300.to.6301.cmmn.sql
@@ -0,0 +1,5 @@
+CREATE TABLE ACT_CMMN_HI_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255), STATE_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), ITEM_DEFINITION_ID_ VARCHAR(255), ITEM_DEFINITION_TYPE_ VARCHAR(255), CREATED_TIME_ TIMESTAMP, LAST_AVAILABLE_TIME_ TIMESTAMP, LAST_ENABLED_TIME_ TIMESTAMP, LAST_DISABLED_TIME_ TIMESTAMP, LAST_STARTED_TIME_ TIMESTAMP, LAST_SUSPENDED_TIME_ TIMESTAMP, COMPLETED_TIME_ TIMESTAMP, OCCURRED_TIME_ TIMESTAMP, TERMINATED_TIME_ TIMESTAMP, EXIT_TIME_ TIMESTAMP, ENDED_TIME_ TIMESTAMP, LAST_UPDATED_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '';
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '';
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6400.to.6410.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6400.to.6410.cmmn.sql
new file mode 100644
index 00000000000..f6b7bd45267
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6400.to.6410.cmmn.sql
@@ -0,0 +1,33 @@
+CREATE UNIQUE INDEX ACT_IDX_CASE_DEF_UNIQ ON ACT_CMMN_CASEDEF(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ALTER COLUMN START_TIME_ RENAME TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ALTER COLUMN CREATED_TIME_ RENAME TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_AVAILABLE_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_ENABLED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_DISABLED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_STARTED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_SUSPENDED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD COMPLETED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD OCCURRED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD TERMINATED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENDED_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6501.to.6502.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6501.to.6502.cmmn.sql
new file mode 100644
index 00000000000..2fc19f4c58b
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6501.to.6502.cmmn.sql
@@ -0,0 +1,19 @@
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD SHOW_IN_OVERVIEW_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255);
+
+CREATE INDEX ACT_IDX_CASE_INST_REF_ID_ ON ACT_CMMN_RU_CASE_INST(REFERENCE_ID_);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6511.to.6512.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6511.to.6512.cmmn.sql
new file mode 100644
index 00000000000..cfd8003f8a9
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6511.to.6512.cmmn.sql
@@ -0,0 +1,5 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_OWNER_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6601.to.6610.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6601.to.6610.cmmn.sql
new file mode 100644
index 00000000000..70d8c8ec871
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6601.to.6610.cmmn.sql
@@ -0,0 +1,7 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6701.to.6710.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6701.to.6710.cmmn.sql
new file mode 100644
index 00000000000..548bb70cc5c
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6701.to.6710.cmmn.sql
@@ -0,0 +1,3 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6723.to.6800.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6723.to.6800.cmmn.sql
new file mode 100644
index 00000000000..31273e933a5
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.6723.to.6800.cmmn.sql
@@ -0,0 +1 @@
+CREATE INDEX ACT_IDX_HI_CASE_INST_END ON ACT_CMMN_HI_CASE_INST(END_TIME_);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.7000.to.7010.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.7000.to.7010.cmmn.sql
new file mode 100644
index 00000000000..7854c48581d
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.h2.upgradestep.7000.to.7010.cmmn.sql
@@ -0,0 +1 @@
+CREATE INDEX ACT_IDX_HI_PLAN_ITEM_INST_CASE ON ACT_CMMN_HI_PLAN_ITEM_INST(CASE_INST_ID_);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6120.to.6200.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6120.to.6200.cmmn.sql
new file mode 100644
index 00000000000..31a07bdc992
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6120.to.6200.cmmn.sql
@@ -0,0 +1,59 @@
+CREATE TABLE ACT_CMMN_DEPLOYMENT (ID_ varchar(255) NOT NULL, NAME_ varchar(255), CATEGORY_ varchar(255), KEY_ varchar(255), DEPLOY_TIME_ datetime, PARENT_DEPLOYMENT_ID_ varchar(255), TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_DEPLOYMENT_TENANT_ID_ DEFAULT '', CONSTRAINT PK_ACT_CMMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_DEPLOYMENT_RESOURCE (ID_ varchar(255) NOT NULL, NAME_ varchar(255), DEPLOYMENT_ID_ varchar(255), RESOURCE_BYTES_ varbinary(MAX), CONSTRAINT PK_CMMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_CASEDEF (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, NAME_ varchar(255), KEY_ varchar(255) NOT NULL, VERSION_ int NOT NULL, CATEGORY_ varchar(255), DEPLOYMENT_ID_ varchar(255), RESOURCE_NAME_ varchar(4000), DESCRIPTION_ varchar(4000), HAS_GRAPHICAL_NOTATION_ bit, TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_CASEDEF_TENANT_ID_ DEFAULT '', CONSTRAINT PK_ACT_CMMN_CASEDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_CASEDEF(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, BUSINESS_KEY_ varchar(255), NAME_ varchar(255), PARENT_ID_ varchar(255), CASE_DEF_ID_ varchar(255), STATE_ varchar(255), START_TIME_ datetime, START_USER_ID_ varchar(255), CALLBACK_ID_ varchar(255), CALLBACK_TYPE_ varchar(255), TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_RU_CASE_INST_TENANT_ID_ DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, CASE_DEF_ID_ varchar(255), CASE_INST_ID_ varchar(255), STAGE_INST_ID_ varchar(255), IS_STAGE_ bit, ELEMENT_ID_ varchar(255), NAME_ varchar(255), STATE_ varchar(255), START_TIME_ datetime, START_USER_ID_ varchar(255), REFERENCE_ID_ varchar(255), REFERENCE_TYPE_ varchar(255), TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_RU_PLAN_ITEM_INST_TENANT_ID_ DEFAULT '', CONSTRAINT PK_CMMN_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_SENTRY_PART_INST (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, CASE_DEF_ID_ varchar(255), CASE_INST_ID_ varchar(255), PLAN_ITEM_INST_ID_ varchar(255), ON_PART_ID_ varchar(255), IF_PART_ID_ varchar(255), TIME_STAMP_ datetime, CONSTRAINT PK_CMMN_SENTRY_PART_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_PART_INST(PLAN_ITEM_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ varchar(255) NOT NULL, NAME_ varchar(255) NOT NULL, TIME_STAMP_ datetime NOT NULL, CASE_INST_ID_ varchar(255) NOT NULL, CASE_DEF_ID_ varchar(255) NOT NULL, ELEMENT_ID_ varchar(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, BUSINESS_KEY_ varchar(255), NAME_ varchar(255), PARENT_ID_ varchar(255), CASE_DEF_ID_ varchar(255), STATE_ varchar(255), START_TIME_ datetime, END_TIME_ datetime, START_USER_ID_ varchar(255), CALLBACK_ID_ varchar(255), CALLBACK_TYPE_ varchar(255), TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_HI_CASE_INST_TENANT_ID_ DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, NAME_ varchar(255) NOT NULL, TIME_STAMP_ datetime NOT NULL, CASE_INST_ID_ varchar(255) NOT NULL, CASE_DEF_ID_ varchar(255) NOT NULL, ELEMENT_ID_ varchar(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6200.to.6210.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6200.to.6210.cmmn.sql
new file mode 100644
index 00000000000..7d71b6fbace
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6200.to.6210.cmmn.sql
@@ -0,0 +1,11 @@
+ALTER TABLE ACT_CMMN_CASEDEF ADD DGRM_RESOURCE_NAME_ varchar(4000);
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD HAS_START_FORM_KEY_ bit;
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD GENERATED_ bit;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_TYPE_ varchar(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6210.to.6300.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6210.to.6300.cmmn.sql
new file mode 100644
index 00000000000..2ac6942d9b3
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6210.to.6300.cmmn.sql
@@ -0,0 +1,11 @@
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COMPLETEABLE_ bit;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD IS_COMPLETEABLE_ bit;
+
+CREATE NONCLUSTERED INDEX ACT_IDX_PLAN_ITEM_STAGE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(STAGE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COUNT_ENABLED_ bit;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD VAR_COUNT_ int;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD SENTRY_PART_INST_COUNT_ int;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6300.to.6301.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6300.to.6301.cmmn.sql
new file mode 100644
index 00000000000..8bf973e42af
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6300.to.6301.cmmn.sql
@@ -0,0 +1,5 @@
+CREATE TABLE ACT_CMMN_HI_PLAN_ITEM_INST (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, NAME_ varchar(255), STATE_ varchar(255), CASE_DEF_ID_ varchar(255), CASE_INST_ID_ varchar(255), STAGE_INST_ID_ varchar(255), IS_STAGE_ bit, ELEMENT_ID_ varchar(255), ITEM_DEFINITION_ID_ varchar(255), ITEM_DEFINITION_TYPE_ varchar(255), CREATED_TIME_ datetime, LAST_AVAILABLE_TIME_ datetime, LAST_ENABLED_TIME_ datetime, LAST_DISABLED_TIME_ datetime, LAST_STARTED_TIME_ datetime, LAST_SUSPENDED_TIME_ datetime, COMPLETED_TIME_ datetime, OCCURRED_TIME_ datetime, TERMINATED_TIME_ datetime, EXIT_TIME_ datetime, ENDED_TIME_ datetime, LAST_UPDATED_TIME_ datetime, START_USER_ID_ varchar(255), REFERENCE_ID_ varchar(255), REFERENCE_TYPE_ varchar(255), TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_HI_PLAN_ITEM_INST_TENANT_ID_ DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_RU_MIL_INST_TENANT_ID_ DEFAULT '';
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ADD TENANT_ID_ varchar(255) CONSTRAINT DF_ACT_CMMN_HI_MIL_INST_TENANT_ID_ DEFAULT '';
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6400.to.6410.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6400.to.6410.cmmn.sql
new file mode 100644
index 00000000000..99f151b9344
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6400.to.6410.cmmn.sql
@@ -0,0 +1,33 @@
+CREATE UNIQUE NONCLUSTERED INDEX ACT_IDX_CASE_DEF_UNIQ ON ACT_CMMN_CASEDEF(KEY_, VERSION_, TENANT_ID_);
+
+exec sp_rename 'ACT_CMMN_RU_PLAN_ITEM_INST.START_TIME_', 'CREATE_TIME_', 'COLUMN';
+
+exec sp_rename 'ACT_CMMN_HI_PLAN_ITEM_INST.CREATED_TIME_', 'CREATE_TIME_', 'COLUMN';
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_AVAILABLE_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_ENABLED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_DISABLED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_STARTED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_SUSPENDED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD COMPLETED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD OCCURRED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD TERMINATED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENDED_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ varchar(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6501.to.6502.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6501.to.6502.cmmn.sql
new file mode 100644
index 00000000000..0d288ba0cc8
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6501.to.6502.cmmn.sql
@@ -0,0 +1,19 @@
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD SHOW_IN_OVERVIEW_ bit;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXTRA_VALUE_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXTRA_VALUE_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_TYPE_ varchar(255);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_CASE_INST_REF_ID_ ON ACT_CMMN_RU_CASE_INST(REFERENCE_ID_);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_TYPE_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ varchar(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6511.to.6512.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6511.to.6512.cmmn.sql
new file mode 100644
index 00000000000..19ab1660c8b
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6511.to.6512.cmmn.sql
@@ -0,0 +1,5 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_OWNER_ varchar(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ datetime;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6601.to.6610.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6601.to.6610.cmmn.sql
new file mode 100644
index 00000000000..f3df9ee3019
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6601.to.6610.cmmn.sql
@@ -0,0 +1,7 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_USER_ID_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_TIME_ datetime;
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_USER_ID_ varchar(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6701.to.6710.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6701.to.6710.cmmn.sql
new file mode 100644
index 00000000000..68338a4ee89
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6701.to.6710.cmmn.sql
@@ -0,0 +1,3 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD BUSINESS_STATUS_ varchar(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD BUSINESS_STATUS_ varchar(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6723.to.6800.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6723.to.6800.cmmn.sql
new file mode 100644
index 00000000000..c20047638ba
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.6723.to.6800.cmmn.sql
@@ -0,0 +1 @@
+CREATE NONCLUSTERED INDEX ACT_IDX_HI_CASE_INST_END ON ACT_CMMN_HI_CASE_INST(END_TIME_);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.7000.to.7010.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.7000.to.7010.cmmn.sql
new file mode 100644
index 00000000000..93543dc7614
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.7000.to.7010.cmmn.sql
@@ -0,0 +1 @@
+CREATE NONCLUSTERED INDEX ACT_IDX_HI_PLAN_ITEM_INST_CASE ON ACT_CMMN_HI_PLAN_ITEM_INST(CASE_INST_ID_);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.7010.to.7100.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.7010.to.7100.cmmn.sql
new file mode 100644
index 00000000000..fe452f42156
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mssql.upgradestep.7010.to.7100.cmmn.sql
@@ -0,0 +1,31 @@
+ALTER TABLE ACT_CMMN_DEPLOYMENT ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_CASEDEF ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_CASEDEF ALTER COLUMN RESOURCE_NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_CASEDEF ALTER COLUMN DGRM_RESOURCE_NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ALTER COLUMN BUSINESS_KEY_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ALTER COLUMN BUSINESS_STATUS_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ALTER COLUMN BUSINESS_KEY_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ALTER COLUMN BUSINESS_STATUS_ nvarchar(255);
+
+ALTER TABLE ACT_CMMN_CASEDEF ALTER COLUMN DESCRIPTION_ nvarchar(4000);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6120.to.6200.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6120.to.6200.cmmn.sql
new file mode 100644
index 00000000000..32cb6bc4f91
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6120.to.6200.cmmn.sql
@@ -0,0 +1,60 @@
+CREATE TABLE ACT_CMMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, KEY_ VARCHAR(255) NULL, DEPLOY_TIME_ datetime NULL, PARENT_DEPLOYMENT_ID_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_CMMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, RESOURCE_BYTES_ LONGBLOB NULL, CONSTRAINT PK_CMMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_CASEDEF (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NULL, KEY_ VARCHAR(255) NOT NULL, VERSION_ INT NOT NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, RESOURCE_NAME_ VARCHAR(4000) NULL, DESCRIPTION_ VARCHAR(4000) NULL, HAS_GRAPHICAL_NOTATION_ BIT(1) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_CMMN_CASEDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_CASEDEF(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255) NULL, NAME_ VARCHAR(255) NULL, PARENT_ID_ VARCHAR(255) NULL, CASE_DEF_ID_ VARCHAR(255) NULL, STATE_ VARCHAR(255) NULL, START_TIME_ datetime NULL, START_USER_ID_ VARCHAR(255) NULL, CALLBACK_ID_ VARCHAR(255) NULL, CALLBACK_TYPE_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255) NULL, CASE_INST_ID_ VARCHAR(255) NULL, STAGE_INST_ID_ VARCHAR(255) NULL, IS_STAGE_ BIT(1) NULL, ELEMENT_ID_ VARCHAR(255) NULL, NAME_ VARCHAR(255) NULL, STATE_ VARCHAR(255) NULL, START_TIME_ datetime NULL, START_USER_ID_ VARCHAR(255) NULL, REFERENCE_ID_ VARCHAR(255) NULL, REFERENCE_TYPE_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_CMMN_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_SENTRY_PART_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255) NULL, CASE_INST_ID_ VARCHAR(255) NULL, PLAN_ITEM_INST_ID_ VARCHAR(255) NULL, ON_PART_ID_ VARCHAR(255) NULL, IF_PART_ID_ VARCHAR(255) NULL, TIME_STAMP_ datetime NULL, CONSTRAINT PK_CMMN_SENTRY_PART_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_PART_INST(PLAN_ITEM_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ datetime NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255) NULL, NAME_ VARCHAR(255) NULL, PARENT_ID_ VARCHAR(255) NULL, CASE_DEF_ID_ VARCHAR(255) NULL, STATE_ VARCHAR(255) NULL, START_TIME_ datetime NULL, END_TIME_ datetime NULL, START_USER_ID_ VARCHAR(255) NULL, CALLBACK_ID_ VARCHAR(255) NULL, CALLBACK_TYPE_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ datetime NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6200.to.6210.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6200.to.6210.cmmn.sql
new file mode 100644
index 00000000000..0003a559dc5
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6200.to.6210.cmmn.sql
@@ -0,0 +1,7 @@
+ALTER TABLE ACT_CMMN_CASEDEF ADD DGRM_RESOURCE_NAME_ VARCHAR(4000) NULL, ADD HAS_START_FORM_KEY_ BIT(1) NULL;
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD GENERATED_ BIT(1) NULL;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_TIME_ datetime NULL;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_ID_ VARCHAR(255) NULL, ADD ITEM_DEFINITION_TYPE_ VARCHAR(255) NULL;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6210.to.6300.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6210.to.6300.cmmn.sql
new file mode 100644
index 00000000000..4d101c17974
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6210.to.6300.cmmn.sql
@@ -0,0 +1,11 @@
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COMPLETEABLE_ BIT(1) NULL;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD IS_COMPLETEABLE_ BIT(1) NULL;
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_STAGE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(STAGE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COUNT_ENABLED_ BIT(1) NULL;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD VAR_COUNT_ INT NULL;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD SENTRY_PART_INST_COUNT_ INT NULL;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6300.to.6301.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6300.to.6301.cmmn.sql
new file mode 100644
index 00000000000..f4c1851c9f2
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6300.to.6301.cmmn.sql
@@ -0,0 +1,5 @@
+CREATE TABLE ACT_CMMN_HI_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NULL, STATE_ VARCHAR(255) NULL, CASE_DEF_ID_ VARCHAR(255) NULL, CASE_INST_ID_ VARCHAR(255) NULL, STAGE_INST_ID_ VARCHAR(255) NULL, IS_STAGE_ BIT(1) NULL, ELEMENT_ID_ VARCHAR(255) NULL, ITEM_DEFINITION_ID_ VARCHAR(255) NULL, ITEM_DEFINITION_TYPE_ VARCHAR(255) NULL, CREATED_TIME_ datetime NULL, LAST_AVAILABLE_TIME_ datetime NULL, LAST_ENABLED_TIME_ datetime NULL, LAST_DISABLED_TIME_ datetime NULL, LAST_STARTED_TIME_ datetime NULL, LAST_SUSPENDED_TIME_ datetime NULL, COMPLETED_TIME_ datetime NULL, OCCURRED_TIME_ datetime NULL, TERMINATED_TIME_ datetime NULL, EXIT_TIME_ datetime NULL, ENDED_TIME_ datetime NULL, LAST_UPDATED_TIME_ datetime NULL, START_USER_ID_ VARCHAR(255) NULL, REFERENCE_ID_ VARCHAR(255) NULL, REFERENCE_TYPE_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) DEFAULT '' NULL, CONSTRAINT PK_ACT_CMMN_HI_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '' NULL;
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '' NULL;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6310.to.6320.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6310.to.6320.cmmn.sql
new file mode 100644
index 00000000000..d8768a69e50
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6310.to.6320.cmmn.sql
@@ -0,0 +1,41 @@
+ALTER TABLE ACT_CMMN_DEPLOYMENT MODIFY DEPLOY_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST MODIFY START_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST MODIFY START_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST MODIFY TIME_STAMP_ datetime(3);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST MODIFY TIME_STAMP_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST MODIFY START_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST MODIFY END_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST MODIFY TIME_STAMP_ datetime(3);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST MODIFY LOCK_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY CREATED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY LAST_AVAILABLE_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY LAST_ENABLED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY LAST_DISABLED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY LAST_STARTED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY LAST_SUSPENDED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY COMPLETED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY OCCURRED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY TERMINATED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY EXIT_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY ENDED_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST MODIFY LAST_UPDATED_TIME_ datetime(3);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6400.to.6410.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6400.to.6410.cmmn.sql
new file mode 100644
index 00000000000..52ec43ec43f
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6400.to.6410.cmmn.sql
@@ -0,0 +1,9 @@
+CREATE UNIQUE INDEX ACT_IDX_CASE_DEF_UNIQ ON ACT_CMMN_CASEDEF(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST CHANGE START_TIME_ CREATE_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST CHANGE CREATED_TIME_ CREATE_TIME_ datetime(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_AVAILABLE_TIME_ datetime(3) NULL, ADD LAST_ENABLED_TIME_ datetime(3) NULL, ADD LAST_DISABLED_TIME_ datetime(3) NULL, ADD LAST_STARTED_TIME_ datetime(3) NULL, ADD LAST_SUSPENDED_TIME_ datetime(3) NULL, ADD COMPLETED_TIME_ datetime(3) NULL, ADD OCCURRED_TIME_ datetime(3) NULL, ADD TERMINATED_TIME_ datetime(3) NULL, ADD EXIT_TIME_ datetime(3) NULL, ADD ENDED_TIME_ datetime(3) NULL, ADD ENTRY_CRITERION_ID_ VARCHAR(255) NULL, ADD EXIT_CRITERION_ID_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255) NULL, ADD EXIT_CRITERION_ID_ VARCHAR(255) NULL;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6501.to.6502.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6501.to.6502.cmmn.sql
new file mode 100644
index 00000000000..c4954e0c95c
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6501.to.6502.cmmn.sql
@@ -0,0 +1,19 @@
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD SHOW_IN_OVERVIEW_ BIT(1) NULL;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_ID_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255) NULL;
+
+CREATE INDEX ACT_IDX_CASE_INST_REF_ID_ ON ACT_CMMN_RU_CASE_INST(REFERENCE_ID_);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_ID_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255) NULL;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6511.to.6512.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6511.to.6512.cmmn.sql
new file mode 100644
index 00000000000..67475f98cb1
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6511.to.6512.cmmn.sql
@@ -0,0 +1,5 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_OWNER_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ datetime(3) NULL;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ datetime(3) NULL;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6601.to.6610.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6601.to.6610.cmmn.sql
new file mode 100644
index 00000000000..98f8134185b
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6601.to.6610.cmmn.sql
@@ -0,0 +1,3 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_TIME_ datetime(3) NULL, ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_TIME_ datetime(3) NULL, ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255) NULL;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6701.to.6710.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6701.to.6710.cmmn.sql
new file mode 100644
index 00000000000..ed09718e4b7
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6701.to.6710.cmmn.sql
@@ -0,0 +1,3 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255) NULL;
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255) NULL;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6723.to.6800.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6723.to.6800.cmmn.sql
new file mode 100644
index 00000000000..31273e933a5
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.6723.to.6800.cmmn.sql
@@ -0,0 +1 @@
+CREATE INDEX ACT_IDX_HI_CASE_INST_END ON ACT_CMMN_HI_CASE_INST(END_TIME_);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.7000.to.7010.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.7000.to.7010.cmmn.sql
new file mode 100644
index 00000000000..7854c48581d
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.mysql.upgradestep.7000.to.7010.cmmn.sql
@@ -0,0 +1 @@
+CREATE INDEX ACT_IDX_HI_PLAN_ITEM_INST_CASE ON ACT_CMMN_HI_PLAN_ITEM_INST(CASE_INST_ID_);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6120.to.6200.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6120.to.6200.cmmn.sql
new file mode 100644
index 00000000000..24414939064
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6120.to.6200.cmmn.sql
@@ -0,0 +1,61 @@
+CREATE TABLE ACT_CMMN_DEPLOYMENT (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), KEY_ VARCHAR2(255), DEPLOY_TIME_ TIMESTAMP, PARENT_DEPLOYMENT_ID_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_CMMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_CASEDEF (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR2(255), KEY_ VARCHAR2(255) NOT NULL, VERSION_ INTEGER NOT NULL, CATEGORY_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), RESOURCE_NAME_ VARCHAR2(4000), DESCRIPTION_ VARCHAR2(4000), HAS_GRAPHICAL_NOTATION_ NUMBER(1), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_CASEDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_CASEDEF(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, BUSINESS_KEY_ VARCHAR2(255), NAME_ VARCHAR2(255), PARENT_ID_ VARCHAR2(255), CASE_DEF_ID_ VARCHAR2(255), STATE_ VARCHAR2(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR2(255), CALLBACK_ID_ VARCHAR2(255), CALLBACK_TYPE_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, CASE_DEF_ID_ VARCHAR2(255), CASE_INST_ID_ VARCHAR2(255), STAGE_INST_ID_ VARCHAR2(255), IS_STAGE_ NUMBER(1), ELEMENT_ID_ VARCHAR2(255), NAME_ VARCHAR2(255), STATE_ VARCHAR2(255), START_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR2(255), REFERENCE_ID_ VARCHAR2(255), REFERENCE_TYPE_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_CMMN_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_SENTRY_PART_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, CASE_DEF_ID_ VARCHAR2(255), CASE_INST_ID_ VARCHAR2(255), PLAN_ITEM_INST_ID_ VARCHAR2(255), ON_PART_ID_ VARCHAR2(255), IF_PART_ID_ VARCHAR2(255), TIME_STAMP_ TIMESTAMP, CONSTRAINT PK_CMMN_SENTRY_PART_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_PART_INST(PLAN_ITEM_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR2(255) NOT NULL, CASE_DEF_ID_ VARCHAR2(255) NOT NULL, ELEMENT_ID_ VARCHAR2(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, BUSINESS_KEY_ VARCHAR2(255), NAME_ VARCHAR2(255), PARENT_ID_ VARCHAR2(255), CASE_DEF_ID_ VARCHAR2(255), STATE_ VARCHAR2(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR2(255), CALLBACK_ID_ VARCHAR2(255), CALLBACK_TYPE_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR2(255) NOT NULL, TIME_STAMP_ TIMESTAMP NOT NULL, CASE_INST_ID_ VARCHAR2(255) NOT NULL, CASE_DEF_ID_ VARCHAR2(255) NOT NULL, ELEMENT_ID_ VARCHAR2(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6200.to.6210.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6200.to.6210.cmmn.sql
new file mode 100644
index 00000000000..903f40696b2
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6200.to.6210.cmmn.sql
@@ -0,0 +1,13 @@
+ALTER TABLE ACT_CMMN_CASEDEF ADD DGRM_RESOURCE_NAME_ VARCHAR2(4000);
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD HAS_START_FORM_KEY_ NUMBER(1);
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD GENERATED_ NUMBER(1);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_TIME_ TIMESTAMP;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_TYPE_ VARCHAR2(255);
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6210.to.6300.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6210.to.6300.cmmn.sql
new file mode 100644
index 00000000000..b7921d64eff
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6210.to.6300.cmmn.sql
@@ -0,0 +1,13 @@
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COMPLETEABLE_ NUMBER(1);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD IS_COMPLETEABLE_ NUMBER(1);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_STAGE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(STAGE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COUNT_ENABLED_ NUMBER(1);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD VAR_COUNT_ INTEGER;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD SENTRY_PART_INST_COUNT_ INTEGER;
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6300.to.6301.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6300.to.6301.cmmn.sql
new file mode 100644
index 00000000000..ded49342f99
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6300.to.6301.cmmn.sql
@@ -0,0 +1,7 @@
+CREATE TABLE ACT_CMMN_HI_PLAN_ITEM_INST (ID_ VARCHAR2(255) NOT NULL, REV_ INTEGER NOT NULL, NAME_ VARCHAR2(255), STATE_ VARCHAR2(255), CASE_DEF_ID_ VARCHAR2(255), CASE_INST_ID_ VARCHAR2(255), STAGE_INST_ID_ VARCHAR2(255), IS_STAGE_ NUMBER(1), ELEMENT_ID_ VARCHAR2(255), ITEM_DEFINITION_ID_ VARCHAR2(255), ITEM_DEFINITION_TYPE_ VARCHAR2(255), CREATED_TIME_ TIMESTAMP, LAST_AVAILABLE_TIME_ TIMESTAMP, LAST_ENABLED_TIME_ TIMESTAMP, LAST_DISABLED_TIME_ TIMESTAMP, LAST_STARTED_TIME_ TIMESTAMP, LAST_SUSPENDED_TIME_ TIMESTAMP, COMPLETED_TIME_ TIMESTAMP, OCCURRED_TIME_ TIMESTAMP, TERMINATED_TIME_ TIMESTAMP, EXIT_TIME_ TIMESTAMP, ENDED_TIME_ TIMESTAMP, LAST_UPDATED_TIME_ TIMESTAMP, START_USER_ID_ VARCHAR2(255), REFERENCE_ID_ VARCHAR2(255), REFERENCE_TYPE_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD TENANT_ID_ VARCHAR2(255) DEFAULT '';
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ADD TENANT_ID_ VARCHAR2(255) DEFAULT '';
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6400.to.6410.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6400.to.6410.cmmn.sql
new file mode 100644
index 00000000000..bffe5037c2a
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6400.to.6410.cmmn.sql
@@ -0,0 +1,35 @@
+CREATE UNIQUE INDEX ACT_IDX_CASE_DEF_UNIQ ON ACT_CMMN_CASEDEF(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST RENAME COLUMN START_TIME_ TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST RENAME COLUMN CREATED_TIME_ TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_AVAILABLE_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_ENABLED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_DISABLED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_STARTED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_SUSPENDED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD COMPLETED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD OCCURRED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD TERMINATED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENDED_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR2(255);
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6501.to.6502.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6501.to.6502.cmmn.sql
new file mode 100644
index 00000000000..a939172f88a
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6501.to.6502.cmmn.sql
@@ -0,0 +1,21 @@
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD SHOW_IN_OVERVIEW_ NUMBER(1);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_TYPE_ VARCHAR2(255);
+
+CREATE INDEX ACT_IDX_CASE_INST_REF_ID_ ON ACT_CMMN_RU_CASE_INST(REFERENCE_ID_);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_TYPE_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR2(255);
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6511.to.6512.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6511.to.6512.cmmn.sql
new file mode 100644
index 00000000000..c2138469246
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6511.to.6512.cmmn.sql
@@ -0,0 +1,7 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_OWNER_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP(3);
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6601.to.6610.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6601.to.6610.cmmn.sql
new file mode 100644
index 00000000000..1c160f67f7d
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6601.to.6610.cmmn.sql
@@ -0,0 +1,9 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP(3);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR2(255);
+
+
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6701.to.6710.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6701.to.6710.cmmn.sql
new file mode 100644
index 00000000000..8265519e822
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6701.to.6710.cmmn.sql
@@ -0,0 +1,3 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD BUSINESS_STATUS_ VARCHAR2(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD BUSINESS_STATUS_ VARCHAR2(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6723.to.6800.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6723.to.6800.cmmn.sql
new file mode 100644
index 00000000000..31273e933a5
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.6723.to.6800.cmmn.sql
@@ -0,0 +1 @@
+CREATE INDEX ACT_IDX_HI_CASE_INST_END ON ACT_CMMN_HI_CASE_INST(END_TIME_);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.7000.to.7010.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.7000.to.7010.cmmn.sql
new file mode 100644
index 00000000000..7854c48581d
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.oracle.upgradestep.7000.to.7010.cmmn.sql
@@ -0,0 +1 @@
+CREATE INDEX ACT_IDX_HI_PLAN_ITEM_INST_CASE ON ACT_CMMN_HI_PLAN_ITEM_INST(CASE_INST_ID_);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6120.to.6200.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6120.to.6200.cmmn.sql
new file mode 100644
index 00000000000..4c0f4039419
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6120.to.6200.cmmn.sql
@@ -0,0 +1,59 @@
+CREATE TABLE ACT_CMMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), KEY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP WITHOUT TIME ZONE, PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BYTEA, CONSTRAINT PK_CMMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD CONSTRAINT ACT_FK_CMMN_RSRC_DPL FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CMMN_RSRC_DPL ON ACT_CMMN_DEPLOYMENT_RESOURCE(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_CASEDEF (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255), KEY_ VARCHAR(255) NOT NULL, VERSION_ INT NOT NULL, CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(4000), DESCRIPTION_ VARCHAR(4000), HAS_GRAPHICAL_NOTATION_ BOOLEAN, TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_CASEDEF PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD CONSTRAINT ACT_FK_CASE_DEF_DPLY FOREIGN KEY (DEPLOYMENT_ID_) REFERENCES ACT_CMMN_DEPLOYMENT (ID_);
+
+CREATE INDEX ACT_IDX_CASE_DEF_DPLY ON ACT_CMMN_CASEDEF(DEPLOYMENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP WITHOUT TIME ZONE, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_RU_CASE_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD CONSTRAINT ACT_FK_CASE_INST_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_CASE_DEF ON ACT_CMMN_RU_CASE_INST(CASE_DEF_ID_);
+
+CREATE INDEX ACT_IDX_CASE_INST_PARENT ON ACT_CMMN_RU_CASE_INST(PARENT_ID_);
+
+CREATE TABLE ACT_CMMN_RU_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), NAME_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP WITHOUT TIME ZONE, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_CMMN_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_DEF ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD CONSTRAINT ACT_FK_PLAN_ITEM_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_CASE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_SENTRY_PART_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), PLAN_ITEM_INST_ID_ VARCHAR(255), ON_PART_ID_ VARCHAR(255), IF_PART_ID_ VARCHAR(255), TIME_STAMP_ TIMESTAMP WITHOUT TIME ZONE, CONSTRAINT PK_CMMN_SENTRY_PART_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_DEF ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_CASE_INST ON ACT_CMMN_RU_SENTRY_PART_INST(CASE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_SENTRY_PART_INST ADD CONSTRAINT ACT_FK_SENTRY_PLAN_ITEM FOREIGN KEY (PLAN_ITEM_INST_ID_) REFERENCES ACT_CMMN_RU_PLAN_ITEM_INST (ID_);
+
+CREATE INDEX ACT_IDX_SENTRY_PLAN_ITEM ON ACT_CMMN_RU_SENTRY_PART_INST(PLAN_ITEM_INST_ID_);
+
+CREATE TABLE ACT_CMMN_RU_MIL_INST (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP WITHOUT TIME ZONE NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_RU_MIL_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_DEF FOREIGN KEY (CASE_DEF_ID_) REFERENCES ACT_CMMN_CASEDEF (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_DEF ON ACT_CMMN_RU_MIL_INST(CASE_DEF_ID_);
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD CONSTRAINT ACT_FK_MIL_CASE_INST FOREIGN KEY (CASE_INST_ID_) REFERENCES ACT_CMMN_RU_CASE_INST (ID_);
+
+CREATE INDEX ACT_IDX_MIL_CASE_INST ON ACT_CMMN_RU_MIL_INST(CASE_INST_ID_);
+
+CREATE TABLE ACT_CMMN_HI_CASE_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, BUSINESS_KEY_ VARCHAR(255), NAME_ VARCHAR(255), PARENT_ID_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), STATE_ VARCHAR(255), START_TIME_ TIMESTAMP WITHOUT TIME ZONE, END_TIME_ TIMESTAMP WITHOUT TIME ZONE, START_USER_ID_ VARCHAR(255), CALLBACK_ID_ VARCHAR(255), CALLBACK_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_CASE_INST PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_CMMN_HI_MIL_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255) NOT NULL, TIME_STAMP_ TIMESTAMP WITHOUT TIME ZONE NOT NULL, CASE_INST_ID_ VARCHAR(255) NOT NULL, CASE_DEF_ID_ VARCHAR(255) NOT NULL, ELEMENT_ID_ VARCHAR(255) NOT NULL, CONSTRAINT PK_ACT_CMMN_HI_MIL_INST PRIMARY KEY (ID_));
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6200.to.6210.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6200.to.6210.cmmn.sql
new file mode 100644
index 00000000000..2e70b47d00c
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6200.to.6210.cmmn.sql
@@ -0,0 +1,11 @@
+ALTER TABLE ACT_CMMN_CASEDEF ADD DGRM_RESOURCE_NAME_ VARCHAR(4000);
+
+ALTER TABLE ACT_CMMN_CASEDEF ADD HAS_START_FORM_KEY_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_DEPLOYMENT_RESOURCE ADD GENERATED_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_TIME_ TIMESTAMP WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ITEM_DEFINITION_TYPE_ VARCHAR(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6210.to.6300.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6210.to.6300.cmmn.sql
new file mode 100644
index 00000000000..18e93f1e8d5
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6210.to.6300.cmmn.sql
@@ -0,0 +1,11 @@
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COMPLETEABLE_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD IS_COMPLETEABLE_ BOOLEAN;
+
+CREATE INDEX ACT_IDX_PLAN_ITEM_STAGE_INST ON ACT_CMMN_RU_PLAN_ITEM_INST(STAGE_INST_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD IS_COUNT_ENABLED_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD VAR_COUNT_ INTEGER;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD SENTRY_PART_INST_COUNT_ INTEGER;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6300.to.6301.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6300.to.6301.cmmn.sql
new file mode 100644
index 00000000000..34b16cbca11
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6300.to.6301.cmmn.sql
@@ -0,0 +1,5 @@
+CREATE TABLE ACT_CMMN_HI_PLAN_ITEM_INST (ID_ VARCHAR(255) NOT NULL, REV_ INT NOT NULL, NAME_ VARCHAR(255), STATE_ VARCHAR(255), CASE_DEF_ID_ VARCHAR(255), CASE_INST_ID_ VARCHAR(255), STAGE_INST_ID_ VARCHAR(255), IS_STAGE_ BOOLEAN, ELEMENT_ID_ VARCHAR(255), ITEM_DEFINITION_ID_ VARCHAR(255), ITEM_DEFINITION_TYPE_ VARCHAR(255), CREATED_TIME_ TIMESTAMP WITHOUT TIME ZONE, LAST_AVAILABLE_TIME_ TIMESTAMP WITHOUT TIME ZONE, LAST_ENABLED_TIME_ TIMESTAMP WITHOUT TIME ZONE, LAST_DISABLED_TIME_ TIMESTAMP WITHOUT TIME ZONE, LAST_STARTED_TIME_ TIMESTAMP WITHOUT TIME ZONE, LAST_SUSPENDED_TIME_ TIMESTAMP WITHOUT TIME ZONE, COMPLETED_TIME_ TIMESTAMP WITHOUT TIME ZONE, OCCURRED_TIME_ TIMESTAMP WITHOUT TIME ZONE, TERMINATED_TIME_ TIMESTAMP WITHOUT TIME ZONE, EXIT_TIME_ TIMESTAMP WITHOUT TIME ZONE, ENDED_TIME_ TIMESTAMP WITHOUT TIME ZONE, LAST_UPDATED_TIME_ TIMESTAMP WITHOUT TIME ZONE, START_USER_ID_ VARCHAR(255), REFERENCE_ID_ VARCHAR(255), REFERENCE_TYPE_ VARCHAR(255), TENANT_ID_ VARCHAR(255) DEFAULT '', CONSTRAINT PK_ACT_CMMN_HI_PLAN_ITEM_INST PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_CMMN_RU_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '';
+
+ALTER TABLE ACT_CMMN_HI_MIL_INST ADD TENANT_ID_ VARCHAR(255) DEFAULT '';
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6400.to.6410.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6400.to.6410.cmmn.sql
new file mode 100644
index 00000000000..5c17d76da85
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6400.to.6410.cmmn.sql
@@ -0,0 +1,33 @@
+CREATE UNIQUE INDEX ACT_IDX_CASE_DEF_UNIQ ON ACT_CMMN_CASEDEF(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST RENAME COLUMN START_TIME_ TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST RENAME COLUMN CREATED_TIME_ TO CREATE_TIME_;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_AVAILABLE_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_ENABLED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_DISABLED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_STARTED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_SUSPENDED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD COMPLETED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD OCCURRED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD TERMINATED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENDED_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD ENTRY_CRITERION_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXIT_CRITERION_ID_ VARCHAR(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6501.to.6502.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6501.to.6502.cmmn.sql
new file mode 100644
index 00000000000..2fc19f4c58b
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6501.to.6502.cmmn.sql
@@ -0,0 +1,19 @@
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD SHOW_IN_OVERVIEW_ BOOLEAN;
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD EXTRA_VALUE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255);
+
+CREATE INDEX ACT_IDX_CASE_INST_REF_ID_ ON ACT_CMMN_RU_CASE_INST(REFERENCE_ID_);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD REFERENCE_TYPE_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD DERIVED_CASE_DEF_ID_ VARCHAR(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6511.to.6512.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6511.to.6512.cmmn.sql
new file mode 100644
index 00000000000..6675b30c851
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6511.to.6512.cmmn.sql
@@ -0,0 +1,5 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LOCK_OWNER_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_RU_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_HI_PLAN_ITEM_INST ADD LAST_UNAVAILABLE_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6601.to.6610.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6601.to.6610.cmmn.sql
new file mode 100644
index 00000000000..8e41cec91ca
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6601.to.6610.cmmn.sql
@@ -0,0 +1,7 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE;
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD LAST_REACTIVATION_USER_ID_ VARCHAR(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6701.to.6710.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6701.to.6710.cmmn.sql
new file mode 100644
index 00000000000..548bb70cc5c
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6701.to.6710.cmmn.sql
@@ -0,0 +1,3 @@
+ALTER TABLE ACT_CMMN_RU_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255);
+
+ALTER TABLE ACT_CMMN_HI_CASE_INST ADD BUSINESS_STATUS_ VARCHAR(255);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6723.to.6800.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6723.to.6800.cmmn.sql
new file mode 100644
index 00000000000..31273e933a5
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.6723.to.6800.cmmn.sql
@@ -0,0 +1 @@
+CREATE INDEX ACT_IDX_HI_CASE_INST_END ON ACT_CMMN_HI_CASE_INST(END_TIME_);
diff --git a/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.7000.to.7010.cmmn.sql b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.7000.to.7010.cmmn.sql
new file mode 100644
index 00000000000..7854c48581d
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/upgrade/flowable.postgres.upgradestep.7000.to.7010.cmmn.sql
@@ -0,0 +1 @@
+CREATE INDEX ACT_IDX_HI_PLAN_ITEM_INST_CASE ON ACT_CMMN_HI_PLAN_ITEM_INST(CASE_INST_ID_);
diff --git a/modules/flowable-cmmn-engine/src/test/java/org/flowable/cmmn/test/initialization/CmmnEngineInitializationTest.java b/modules/flowable-cmmn-engine/src/test/java/org/flowable/cmmn/test/initialization/CmmnEngineInitializationTest.java
new file mode 100644
index 00000000000..f5f704ca056
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/test/java/org/flowable/cmmn/test/initialization/CmmnEngineInitializationTest.java
@@ -0,0 +1,105 @@
+/* Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.flowable.cmmn.test.initialization;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.function.Consumer;
+
+import org.apache.ibatis.session.SqlSession;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.flowable.cmmn.engine.CmmnEngine;
+import org.flowable.cmmn.engine.CmmnEngineConfiguration;
+import org.flowable.common.engine.api.FlowableException;
+import org.flowable.common.engine.api.FlowableWrongDbException;
+import org.flowable.common.engine.impl.AbstractEngineConfiguration;
+import org.flowable.common.engine.impl.db.DbSqlSession;
+import org.flowable.common.engine.impl.db.DbSqlSessionFactory;
+import org.flowable.common.engine.impl.db.SchemaOperationsEngineDropDbCmd;
+import org.junit.jupiter.api.Test;
+
+/**
+ * @author Filip Hrisafov
+ */
+class CmmnEngineInitializationTest {
+
+ @Test
+ void noTables() {
+ CmmnEngineConfiguration engineConfiguration = CmmnEngineConfiguration.createCmmnEngineConfigurationFromResource(
+ "org/flowable/cmmn/test/initialization/notables.flowable.cmmn.cfg.xml");
+
+ assertThatThrownBy(engineConfiguration::buildEngine)
+ .isInstanceOf(FlowableException.class)
+ .hasMessageContaining("No flowable tables in DB");
+ }
+
+ @Test
+ void versionMismatch() {
+ // first create the schema
+ CmmnEngineConfiguration engineConfiguration = CmmnEngineConfiguration.createCmmnEngineConfigurationFromResource(
+ "org/flowable/cmmn/test/initialization/notables.flowable.cmmn.cfg.xml");
+ engineConfiguration.setDatabaseSchemaUpdate(AbstractEngineConfiguration.DB_SCHEMA_UPDATE_CREATE);
+
+ try {
+ CmmnEngine cmmnEngine = engineConfiguration.buildEngine();
+
+ // then update the version to something that is different to the library version
+ DbSqlSessionFactory dbSqlSessionFactory = (DbSqlSessionFactory) cmmnEngine.getCmmnEngineConfiguration()
+ .getSessionFactories()
+ .get(DbSqlSession.class);
+ SqlSessionFactory sqlSessionFactory = dbSqlSessionFactory.getSqlSessionFactory();
+ SqlSession sqlSession = sqlSessionFactory.openSession();
+ boolean success = false;
+ try {
+ Map parameters = new HashMap<>();
+ parameters.put("name", "cmmn.schema.version");
+ parameters.put("value", "25.7");
+ parameters.put("revision", 1);
+ parameters.put("newRevision", 2);
+ sqlSession.update("updateProperty", parameters);
+ success = true;
+ } catch (Exception e) {
+ throw new FlowableException("couldn't update db schema version", e);
+ } finally {
+ if (success) {
+ sqlSession.commit();
+ } else {
+ sqlSession.rollback();
+ }
+ sqlSession.close();
+ }
+
+ // now we can see what happens if when a cmmn engine is being
+ // build with a version mismatch between library and db tables
+ Consumer flowableWrongDbExceptionRequirements = flowableWrongDbException -> {
+ assertThat(flowableWrongDbException.getDbVersion()).isEqualTo("25.7");
+ assertThat(flowableWrongDbException.getLibraryVersion()).isEqualTo(CmmnEngine.VERSION);
+ };
+ assertThatThrownBy(() -> CmmnEngineConfiguration
+ .createCmmnEngineConfigurationFromResource("org/flowable/cmmn/test/initialization/notables.flowable.cmmn.cfg.xml")
+ .buildCmmnEngine())
+ .isInstanceOfSatisfying(FlowableWrongDbException.class, flowableWrongDbExceptionRequirements)
+ .hasMessageContaining("version mismatch");
+
+ // closing the original process engine to drop the db tables
+ cmmnEngine.close();
+ } finally {
+ engineConfiguration.getCommandExecutor().execute(new SchemaOperationsEngineDropDbCmd(engineConfiguration.getEngineScopeType()));
+ }
+
+ }
+
+}
diff --git a/modules/flowable-cmmn-engine/src/test/resources/log4j.properties b/modules/flowable-cmmn-engine/src/test/resources/log4j.properties
index af13413e8dc..e7d24815f3a 100644
--- a/modules/flowable-cmmn-engine/src/test/resources/log4j.properties
+++ b/modules/flowable-cmmn-engine/src/test/resources/log4j.properties
@@ -9,7 +9,6 @@ log4j.appender.CA.layout.ConversionPattern= %d{hh:mm:ss,SSS} [%t] %-5p %c %x - %
log4j.logger.org.apache.ibatis=DEBUG
log4j.logger.jakarta.activation=INFO
log4j.logger.org.springframework=INFO
-log4j.logger.liquibase=INFO
log4j.logger.org.flowable.task.service.impl.persistence=DEBUG
log4j.logger.org.flowable.cmmn.engine.impl.agenda=DEBUG
diff --git a/modules/flowable-cmmn-engine/src/test/resources/org/flowable/cmmn/test/initialization/notables.flowable.cmmn.cfg.xml b/modules/flowable-cmmn-engine/src/test/resources/org/flowable/cmmn/test/initialization/notables.flowable.cmmn.cfg.xml
new file mode 100644
index 00000000000..7ebea60175d
--- /dev/null
+++ b/modules/flowable-cmmn-engine/src/test/resources/org/flowable/cmmn/test/initialization/notables.flowable.cmmn.cfg.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/flowable-cmmn-rest/src/test/java/org/flowable/cmmn/rest/service/BaseSpringRestTestCase.java b/modules/flowable-cmmn-rest/src/test/java/org/flowable/cmmn/rest/service/BaseSpringRestTestCase.java
index 12313f9a806..0e1cdd0066a 100644
--- a/modules/flowable-cmmn-rest/src/test/java/org/flowable/cmmn/rest/service/BaseSpringRestTestCase.java
+++ b/modules/flowable-cmmn-rest/src/test/java/org/flowable/cmmn/rest/service/BaseSpringRestTestCase.java
@@ -312,12 +312,7 @@ protected void assertAndEnsureCleanDb() throws Throwable {
cmmnEngineConfiguration,
TABLENAMES_EXCLUDED_FROM_DB_CLEAN_CHECK,
exception == null,
- commandContext -> {
- SchemaManager schemaManager = CommandContextUtil.getCmmnEngineConfiguration(commandContext).getSchemaManager();
- schemaManager.schemaDrop();
- schemaManager.schemaCreate();
- return null;
- }
+ cmmnEngineConfiguration.getSchemaManagementCmd()
);
}
diff --git a/modules/flowable-cmmn-spring-configurator/src/main/java/org/flowable/cmmn/spring/configurator/SpringCmmnEngineConfigurator.java b/modules/flowable-cmmn-spring-configurator/src/main/java/org/flowable/cmmn/spring/configurator/SpringCmmnEngineConfigurator.java
index 65c59f6c850..9d766e48a66 100644
--- a/modules/flowable-cmmn-spring-configurator/src/main/java/org/flowable/cmmn/spring/configurator/SpringCmmnEngineConfigurator.java
+++ b/modules/flowable-cmmn-spring-configurator/src/main/java/org/flowable/cmmn/spring/configurator/SpringCmmnEngineConfigurator.java
@@ -12,7 +12,6 @@
*/
package org.flowable.cmmn.spring.configurator;
-import org.flowable.cmmn.engine.CmmnEngine;
import org.flowable.cmmn.engine.configurator.CmmnEngineConfigurator;
import org.flowable.cmmn.spring.SpringCmmnEngineConfiguration;
import org.flowable.common.engine.api.FlowableException;
@@ -62,7 +61,7 @@ public void configure(AbstractEngineConfiguration engineConfiguration) {
cmmnEngineConfiguration.setBeans(springEngineConfiguration.getBeans());
}
- initCmmnEngine();
+ initEngine();
if (springProcessEngineConfiguration != null) {
cmmnEngineConfiguration.getJobServiceConfiguration().getInternalJobManager()
@@ -81,15 +80,6 @@ public void configure(AbstractEngineConfiguration engineConfiguration) {
initServiceConfigurations(engineConfiguration, cmmnEngineConfiguration);
}
- @Override
- protected synchronized CmmnEngine initCmmnEngine() {
- if (cmmnEngineConfiguration == null) {
- throw new FlowableException("CmmnEngineConfiguration is required");
- }
-
- return cmmnEngineConfiguration.buildCmmnEngine();
- }
-
@Override
public SpringCmmnEngineConfiguration getCmmnEngineConfiguration() {
return (SpringCmmnEngineConfiguration) cmmnEngineConfiguration;
diff --git a/modules/flowable-cmmn-spring/src/main/java/org/flowable/cmmn/spring/SpringCmmnEngineConfiguration.java b/modules/flowable-cmmn-spring/src/main/java/org/flowable/cmmn/spring/SpringCmmnEngineConfiguration.java
index f16ce92a526..82b961680ef 100644
--- a/modules/flowable-cmmn-spring/src/main/java/org/flowable/cmmn/spring/SpringCmmnEngineConfiguration.java
+++ b/modules/flowable-cmmn-spring/src/main/java/org/flowable/cmmn/spring/SpringCmmnEngineConfiguration.java
@@ -68,8 +68,8 @@ public SpringCmmnEngineConfiguration() {
}
@Override
- public CmmnEngine buildCmmnEngine() {
- CmmnEngine cmmnEngine = super.buildCmmnEngine();
+ public CmmnEngine buildEngine() {
+ CmmnEngine cmmnEngine = super.buildEngine();
CmmnEngines.setInitialized(true);
enginesBuild.add(cmmnEngine.getName());
return cmmnEngine;
diff --git a/modules/flowable-cmmn-spring/src/main/java/org/flowable/cmmn/spring/autodeployment/AbstractCmmnAutoDeploymentStrategy.java b/modules/flowable-cmmn-spring/src/main/java/org/flowable/cmmn/spring/autodeployment/AbstractCmmnAutoDeploymentStrategy.java
index d1ad10149b8..11308ac3e7a 100644
--- a/modules/flowable-cmmn-spring/src/main/java/org/flowable/cmmn/spring/autodeployment/AbstractCmmnAutoDeploymentStrategy.java
+++ b/modules/flowable-cmmn-spring/src/main/java/org/flowable/cmmn/spring/autodeployment/AbstractCmmnAutoDeploymentStrategy.java
@@ -19,7 +19,7 @@
import org.flowable.cmmn.api.repository.CmmnDeploymentBuilder;
import org.flowable.cmmn.engine.CmmnEngine;
-import org.flowable.common.engine.impl.lock.LockManager;
+import org.flowable.common.engine.api.lock.LockManager;
import org.flowable.common.spring.CommonAutoDeploymentProperties;
import org.flowable.common.spring.CommonAutoDeploymentStrategy;
import org.springframework.core.io.Resource;
diff --git a/modules/flowable-dmn-api/src/main/java/org/flowable/dmn/api/DmnManagementService.java b/modules/flowable-dmn-api/src/main/java/org/flowable/dmn/api/DmnManagementService.java
index dacd7afac7e..da9679acfaf 100644
--- a/modules/flowable-dmn-api/src/main/java/org/flowable/dmn/api/DmnManagementService.java
+++ b/modules/flowable-dmn-api/src/main/java/org/flowable/dmn/api/DmnManagementService.java
@@ -14,6 +14,7 @@
import java.util.Map;
+import org.flowable.common.engine.api.lock.LockManager;
import org.flowable.common.engine.api.management.TableMetaData;
import org.flowable.common.engine.api.management.TablePageQuery;
import org.flowable.common.engine.api.tenant.ChangeTenantIdBuilder;
@@ -54,4 +55,15 @@ public interface DmnManagementService {
*/
ChangeTenantIdBuilder createChangeTenantIdBuilder(String fromTenantId, String toTenantId);
+ /**
+ * Acquire a lock manager for the requested lock.
+ * This is a stateless call, this means that every time a lock manager
+ * is requested a new one would be created. Make sure that you release the lock
+ * once you are done.
+ *
+ * @param lockName the name of the lock that is being requested
+ *
+ * @return the lock manager for the given lock
+ */
+ LockManager getLockManager(String lockName);
}
diff --git a/modules/flowable-dmn-engine-configurator/src/main/java/org/flowable/dmn/engine/configurator/DmnEngineConfigurator.java b/modules/flowable-dmn-engine-configurator/src/main/java/org/flowable/dmn/engine/configurator/DmnEngineConfigurator.java
index 0fa940796e0..39ff7cd0384 100644
--- a/modules/flowable-dmn-engine-configurator/src/main/java/org/flowable/dmn/engine/configurator/DmnEngineConfigurator.java
+++ b/modules/flowable-dmn-engine-configurator/src/main/java/org/flowable/dmn/engine/configurator/DmnEngineConfigurator.java
@@ -31,7 +31,7 @@
* @author Tijs Rademakers
* @author Joram Barrez
*/
-public class DmnEngineConfigurator extends AbstractEngineConfigurator {
+public class DmnEngineConfigurator extends AbstractEngineConfigurator {
protected DmnEngineConfiguration dmnEngineConfiguration;
@@ -60,7 +60,7 @@ public void configure(AbstractEngineConfiguration engineConfiguration) {
initialiseCommonProperties(engineConfiguration, dmnEngineConfiguration);
- initDmnEngine();
+ initEngine();
initServiceConfigurations(engineConfiguration, dmnEngineConfiguration);
}
@@ -75,7 +75,8 @@ protected List> getEntityDeletionOrder() {
return EntityDependencyOrder.DELETE_ORDER;
}
- protected synchronized DmnEngine initDmnEngine() {
+ @Override
+ protected DmnEngine buildEngine() {
if (dmnEngineConfiguration == null) {
throw new FlowableException("DmnEngineConfiguration is required");
}
diff --git a/modules/flowable-dmn-engine/pom.xml b/modules/flowable-dmn-engine/pom.xml
index 55b63b32a1a..a41d11a5938 100755
--- a/modules/flowable-dmn-engine/pom.xml
+++ b/modules/flowable-dmn-engine/pom.xml
@@ -17,6 +17,12 @@
org.flowable.dmn.engine
+
+ org.flowable.dmn.db.create,
+ org.flowable.dmn.db.upgrade,
+ org.flowable.dmn.db.mapping,
+ org.flowable.dmn.db.mapping.entity,
+
org.springframework*;resolution:=optional,
@@ -82,11 +88,6 @@
-
- org.liquibase
- liquibase-core
-
-
com.h2database
h2
diff --git a/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/DmnEngineConfiguration.java b/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/DmnEngineConfiguration.java
index 7af73cec92f..10a350b0b63 100755
--- a/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/DmnEngineConfiguration.java
+++ b/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/DmnEngineConfiguration.java
@@ -28,10 +28,12 @@
import org.apache.ibatis.transaction.TransactionFactory;
import org.flowable.common.engine.api.delegate.FlowableFunctionDelegate;
import org.flowable.common.engine.api.scope.ScopeTypes;
+import org.flowable.common.engine.impl.AbstractBuildableEngineConfiguration;
import org.flowable.common.engine.impl.AbstractEngineConfiguration;
import org.flowable.common.engine.impl.HasExpressionManagerEngineConfiguration;
import org.flowable.common.engine.impl.cfg.BeansConfigurationHelper;
import org.flowable.common.engine.impl.db.DbSqlSessionFactory;
+import org.flowable.common.engine.impl.db.SchemaManager;
import org.flowable.common.engine.impl.el.DefaultExpressionManager;
import org.flowable.common.engine.impl.el.ExpressionManager;
import org.flowable.common.engine.impl.interceptor.CommandInterceptor;
@@ -52,6 +54,7 @@
import org.flowable.dmn.api.DmnRepositoryService;
import org.flowable.dmn.engine.impl.DmnDecisionServiceImpl;
import org.flowable.dmn.engine.impl.DmnEngineImpl;
+import org.flowable.dmn.engine.impl.DmnEnginePostEngineBuildConsumer;
import org.flowable.dmn.engine.impl.DmnHistoryServiceImpl;
import org.flowable.dmn.engine.impl.DmnManagementServiceImpl;
import org.flowable.dmn.engine.impl.DmnRepositoryServiceImpl;
@@ -61,7 +64,6 @@
import org.flowable.dmn.engine.impl.agenda.DmnEngineAgendaSessionFactory;
import org.flowable.dmn.engine.impl.cfg.StandaloneDmnEngineConfiguration;
import org.flowable.dmn.engine.impl.cfg.StandaloneInMemDmnEngineConfiguration;
-import org.flowable.dmn.engine.impl.cmd.SchemaOperationsDmnEngineBuild;
import org.flowable.dmn.engine.impl.db.DmnDbSchemaManager;
import org.flowable.dmn.engine.impl.db.EntityDependencyOrder;
import org.flowable.dmn.engine.impl.deployer.CachingAndArtifactsManager;
@@ -113,13 +115,11 @@
import org.flowable.dmn.image.DecisionRequirementsDiagramGenerator;
import org.flowable.dmn.image.impl.DefaultDecisionRequirementsDiagramGenerator;
-public class DmnEngineConfiguration extends AbstractEngineConfiguration
+public class DmnEngineConfiguration extends AbstractBuildableEngineConfiguration
implements DmnEngineConfigurationApi, HasExpressionManagerEngineConfiguration {
public static final String DEFAULT_MYBATIS_MAPPING_FILE = "org/flowable/dmn/db/mapping/mappings.xml";
- public static final String LIQUIBASE_CHANGELOG_PREFIX = "ACT_DMN_";
-
protected String dmnEngineName = DmnEngines.NAME_DEFAULT;
protected DmnEngineAgendaFactory dmnEngineAgendaFactory;
@@ -239,14 +239,24 @@ public static DmnEngineConfiguration createStandaloneInMemDmnEngineConfiguration
// buildDmnEngine
// ///////////////////////////////////////////////////////
- public DmnEngine buildDmnEngine() {
- init();
+ @Override
+ protected DmnEngine createEngine() {
return new DmnEngineImpl(this);
}
+ @Override
+ protected Consumer createPostEngineBuildConsumer() {
+ return new DmnEnginePostEngineBuildConsumer();
+ }
+
+ public DmnEngine buildDmnEngine() {
+ return buildEngine();
+ }
+
// init
// /////////////////////////////////////////////////////////////////////
+ @Override
protected void init() {
initEngineConfigurations();
initClock();
@@ -337,19 +347,8 @@ public void initEntityManagers() {
// ///////////////////////////////////////////////////////////////
@Override
- public void initSchemaManager() {
- super.initSchemaManager();
- if (this.schemaManager == null) {
- this.schemaManager = new DmnDbSchemaManager();
- }
- }
-
- public void initSchemaManagementCommand() {
- if (schemaManagementCmd == null) {
- if (usingRelationalDatabase && databaseSchemaUpdate != null) {
- this.schemaManagementCmd = new SchemaOperationsDmnEngineBuild();
- }
- }
+ protected SchemaManager createEngineSchemaManager() {
+ return new DmnDbSchemaManager();
}
// session factories ////////////////////////////////////////////////////////
diff --git a/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnEnginePostEngineBuildConsumer.java b/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnEnginePostEngineBuildConsumer.java
new file mode 100644
index 00000000000..41c9d6953ba
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnEnginePostEngineBuildConsumer.java
@@ -0,0 +1,35 @@
+/* Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.flowable.dmn.engine.impl;
+
+import java.util.function.Consumer;
+
+import org.flowable.common.engine.api.engine.EngineLifecycleListener;
+import org.flowable.dmn.engine.DmnEngine;
+import org.flowable.dmn.engine.DmnEngineConfiguration;
+
+/**
+ * @author Filip Hrisafov
+ */
+public class DmnEnginePostEngineBuildConsumer implements Consumer {
+
+ @Override
+ public void accept(DmnEngine dmnEngine) {
+ DmnEngineConfiguration engineConfiguration = dmnEngine.getDmnEngineConfiguration();
+ if (engineConfiguration.getEngineLifecycleListeners() != null) {
+ for (EngineLifecycleListener engineLifecycleListener : engineConfiguration.getEngineLifecycleListeners()) {
+ engineLifecycleListener.onEngineBuilt(dmnEngine);
+ }
+ }
+ }
+}
diff --git a/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnManagementServiceImpl.java b/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnManagementServiceImpl.java
index f2daa39c027..e5fbbb0a5d7 100755
--- a/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnManagementServiceImpl.java
+++ b/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnManagementServiceImpl.java
@@ -14,12 +14,14 @@
import java.util.Map;
+import org.flowable.common.engine.api.lock.LockManager;
import org.flowable.common.engine.api.management.TableMetaData;
import org.flowable.common.engine.api.management.TablePageQuery;
import org.flowable.common.engine.api.tenant.ChangeTenantIdBuilder;
import org.flowable.common.engine.impl.cmd.CustomSqlExecution;
import org.flowable.common.engine.impl.cmd.GetTableCountCmd;
import org.flowable.common.engine.impl.cmd.GetTableMetaDataCmd;
+import org.flowable.common.engine.impl.lock.LockManagerImpl;
import org.flowable.common.engine.impl.persistence.entity.TablePageQueryImpl;
import org.flowable.common.engine.impl.service.CommonEngineServiceImpl;
import org.flowable.common.engine.impl.tenant.ChangeTenantIdBuilderImpl;
@@ -66,5 +68,10 @@ public ResultType executeCustomSql(CustomSqlExecution {
-
- @Override
- public Void execute(CommandContext commandContext) {
- ((DmnDbSchemaManager) CommandContextUtil.getDmnEngineConfiguration(commandContext).getSchemaManager()).initSchema();
- return null;
- }
-
-}
diff --git a/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/db/DbSchemaDrop.java b/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/db/DbSchemaDrop.java
index d89b446d3b0..016382c1c14 100644
--- a/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/db/DbSchemaDrop.java
+++ b/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/db/DbSchemaDrop.java
@@ -13,19 +13,11 @@
package org.flowable.dmn.engine.impl.db;
-import javax.sql.DataSource;
-
-import org.apache.commons.lang3.StringUtils;
-import org.flowable.dmn.engine.DmnEngine;
-import org.flowable.dmn.engine.DmnEngineConfiguration;
+import org.flowable.common.engine.impl.db.SchemaOperationsEngineDropDbCmd;
+import org.flowable.common.engine.impl.interceptor.CommandConfig;
+import org.flowable.common.engine.impl.interceptor.CommandExecutor;
import org.flowable.dmn.engine.DmnEngines;
-
-import liquibase.Liquibase;
-import liquibase.database.Database;
-import liquibase.database.DatabaseConnection;
-import liquibase.database.DatabaseFactory;
-import liquibase.database.jvm.JdbcConnection;
-import liquibase.resource.ClassLoaderResourceAccessor;
+import org.flowable.dmn.engine.impl.DmnEngineImpl;
/**
* @author Tijs Rademakers
@@ -33,31 +25,9 @@
public class DbSchemaDrop {
public static void main(String[] args) {
- try {
- DmnEngine dmnEngine = DmnEngines.getDefaultDmnEngine();
- DataSource dataSource = dmnEngine.getDmnEngineConfiguration().getDataSource();
-
- DatabaseConnection connection = new JdbcConnection(dataSource.getConnection());
- Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection);
- database.setDatabaseChangeLogTableName(DmnEngineConfiguration.LIQUIBASE_CHANGELOG_PREFIX + database.getDatabaseChangeLogTableName());
- database.setDatabaseChangeLogLockTableName(DmnEngineConfiguration.LIQUIBASE_CHANGELOG_PREFIX + database.getDatabaseChangeLogLockTableName());
-
- if (StringUtils.isNotEmpty(dmnEngine.getDmnEngineConfiguration().getDatabaseSchema())) {
- database.setDefaultSchemaName(dmnEngine.getDmnEngineConfiguration().getDatabaseSchema());
- database.setLiquibaseSchemaName(dmnEngine.getDmnEngineConfiguration().getDatabaseSchema());
- }
-
- if (StringUtils.isNotEmpty(dmnEngine.getDmnEngineConfiguration().getDatabaseCatalog())) {
- database.setDefaultCatalogName(dmnEngine.getDmnEngineConfiguration().getDatabaseCatalog());
- database.setLiquibaseCatalogName(dmnEngine.getDmnEngineConfiguration().getDatabaseCatalog());
- }
-
- Liquibase liquibase = new Liquibase("org/flowable/dmn/db/liquibase/flowable-dmn-db-changelog.xml", new ClassLoaderResourceAccessor(), database);
- liquibase.dropAll();
- liquibase.getDatabase().close();
-
- } catch (Exception e) {
- e.printStackTrace();
- }
+ DmnEngineImpl dmnEngine = (DmnEngineImpl) DmnEngines.getDefaultDmnEngine();
+ CommandExecutor commandExecutor = dmnEngine.getDmnEngineConfiguration().getCommandExecutor();
+ CommandConfig config = new CommandConfig().transactionNotSupported();
+ commandExecutor.execute(config, new SchemaOperationsEngineDropDbCmd(dmnEngine.getDmnEngineConfiguration().getEngineScopeType()));
}
}
diff --git a/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/db/DmnDbSchemaManager.java b/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/db/DmnDbSchemaManager.java
index 961c861cae6..832039cc4ce 100644
--- a/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/db/DmnDbSchemaManager.java
+++ b/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/db/DmnDbSchemaManager.java
@@ -13,58 +13,80 @@
package org.flowable.dmn.engine.impl.db;
-import org.flowable.common.engine.impl.db.EngineDatabaseConfiguration;
-import org.flowable.common.engine.impl.db.LiquibaseBasedSchemaManager;
-import org.flowable.common.engine.impl.db.LiquibaseDatabaseConfiguration;
-import org.flowable.common.engine.impl.db.SchemaManager;
-import org.flowable.dmn.engine.DmnEngineConfiguration;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.flowable.common.engine.impl.AbstractEngineConfiguration;
+import org.flowable.common.engine.impl.db.EngineSqlScriptBasedDbSchemaManager;
+import org.flowable.dmn.engine.DmnEngine;
import org.flowable.dmn.engine.impl.util.CommandContextUtil;
-public class DmnDbSchemaManager extends LiquibaseBasedSchemaManager {
-
- public static final String LIQUIBASE_CHANGELOG = "org/flowable/dmn/db/liquibase/flowable-dmn-db-changelog.xml";
+public class DmnDbSchemaManager extends EngineSqlScriptBasedDbSchemaManager {
+
+ protected static final String DMN_DB_SCHEMA_LOCK_NAME = "dmnDbSchemaLock";
+
+ protected static final Map changeLogVersionMap = Map.ofEntries(
+ Map.entry("1", "6.0.0.5"),
+ Map.entry("2", "6.1.1.0"),
+ Map.entry("3", "6.3.0.0"),
+ Map.entry("4", "6.3.1.0"),
+ Map.entry("5", "6.4.0.0"),
+ Map.entry("6", "6.4.1.3"),
+ Map.entry("7", "6.6.0.0"),
+ Map.entry("8", "6.6.0.0"),
+ Map.entry("9", "6.8.0.0"),
+ Map.entry("10", "7.1.0.0")
+ );
public DmnDbSchemaManager() {
- super("dmn", LIQUIBASE_CHANGELOG, DmnEngineConfiguration.LIQUIBASE_CHANGELOG_PREFIX);
+ super("dmn");
}
@Override
- protected LiquibaseDatabaseConfiguration getDatabaseConfiguration() {
- return new EngineDatabaseConfiguration(CommandContextUtil.getDmnEngineConfiguration());
+ protected String getEngineVersion() {
+ return DmnEngine.VERSION;
}
- public void initSchema() {
- initSchema(CommandContextUtil.getDmnEngineConfiguration().getDatabaseSchemaUpdate());
+ @Override
+ protected String getSchemaVersionPropertyName() {
+ return "dmn.schema.version";
}
@Override
- public void schemaCreate() {
- getCommonSchemaManager().schemaCreate();
- super.schemaCreate();
+ protected String getDbSchemaLockName() {
+ return DMN_DB_SCHEMA_LOCK_NAME;
}
@Override
- public void schemaDrop() {
- try {
- super.schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping dmn engine tables", e);
- }
+ protected String getEngineTableName() {
+ return "ACT_DMN_DECISION";
+ }
- try {
- getCommonSchemaManager().schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping common tables", e);
+ @Override
+ protected String getChangeLogTableName() {
+ return "ACT_DMN_DATABASECHANGELOG";
+ }
+
+ @Override
+ protected String getChangeLogTablePrefixName() {
+ return "ACT_DMN";
+ }
+
+ @Override
+ protected String getDbVersionForChangelogVersion(String changeLogVersion) {
+ if (StringUtils.isNotEmpty(changeLogVersion) && changeLogVersionMap.containsKey(changeLogVersion)) {
+ return changeLogVersionMap.get(changeLogVersion);
}
+ return "5.99.0.0";
}
@Override
- public String schemaUpdate() {
- getCommonSchemaManager().schemaUpdate();
- return super.schemaUpdate();
+ protected AbstractEngineConfiguration getEngineConfiguration() {
+ return CommandContextUtil.getDmnEngineConfiguration();
}
- protected SchemaManager getCommonSchemaManager() {
- return CommandContextUtil.getDmnEngineConfiguration().getCommonSchemaManager();
+ @Override
+ protected String getResourcesRootDirectory() {
+ return "org/flowable/dmn/db/";
}
}
diff --git a/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/test/DmnTestHelper.java b/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/test/DmnTestHelper.java
index cfa676e75c2..b73a0622fc0 100644
--- a/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/test/DmnTestHelper.java
+++ b/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/test/DmnTestHelper.java
@@ -172,15 +172,7 @@ public static void assertAndEnsureCleanDb(final DmnEngine dmnEngine) {
dmnEngine.getDmnEngineConfiguration(),
TABLENAMES_EXCLUDED_FROM_DB_CLEAN_CHECK,
true,
- new Command<>() {
- @Override
- public Void execute(CommandContext commandContext) {
- SchemaManager schemaManager = CommandContextUtil.getDmnEngineConfiguration().getSchemaManager();
- schemaManager.schemaDrop();
- schemaManager.schemaCreate();
- return null;
- }
- }
+ dmnEngine.getDmnEngineConfiguration().getSchemaManagementCmd()
);
}
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.db2.create.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.db2.create.dmn.sql
new file mode 100644
index 00000000000..71407443be8
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.db2.create.dmn.sql
@@ -0,0 +1,34 @@
+CREATE TABLE ACT_DMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), CONSTRAINT PK_ACT_DMN_DEPLOY PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_ACT_DMN_DEPLOY PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DECISION_TABLE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INTEGER, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT PK_ACT_DMN_DECISI PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_HI_DECISION_EXECUTION (ID_ VARCHAR(255) NOT NULL, DECISION_DEFINITION_ID_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, INSTANCE_ID_ VARCHAR(255), EXECUTION_ID_ VARCHAR(255), ACTIVITY_ID_ VARCHAR(255), FAILED_ SMALLINT DEFAULT 0, TENANT_ID_ VARCHAR(255), EXECUTION_JSON_ CLOB, CONSTRAINT PK_ACT_DMN_HI_DEC PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_DMN_HI_DECISION_EXECUTION ADD SCOPE_TYPE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_DMN_HI_DECISION_EXECUTION');
+
+ALTER TABLE ACT_DMN_DECISION_TABLE DROP COLUMN PARENT_DEPLOYMENT_ID_;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_DMN_DECISION_TABLE');
+
+CREATE UNIQUE INDEX ACT_IDX_DEC_TBL_UNIQ ON ACT_DMN_DECISION_TABLE(KEY_, VERSION_, TENANT_ID_);
+
+DROP INDEX ACT_IDX_DEC_TBL_UNIQ;
+
+RENAME ACT_DMN_DECISION_TABLE TO ACT_DMN_DECISION;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_DMN_DECISION');
+
+CREATE UNIQUE INDEX ACT_IDX_DMN_DEC_UNIQ ON ACT_DMN_DECISION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_DMN_DECISION ADD DECISION_TYPE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_DMN_DECISION');
+
+CREATE INDEX ACT_IDX_DMN_INSTANCE_ID ON ACT_DMN_HI_DECISION_EXECUTION(INSTANCE_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('dmn.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.h2.create.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.h2.create.dmn.sql
new file mode 100644
index 00000000000..9d90304335a
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.h2.create.dmn.sql
@@ -0,0 +1,18 @@
+CREATE TABLE ACT_DMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), CONSTRAINT PK_ACT_DMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_ACT_DMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DECISION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INT, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT PK_ACT_DMN_DECISION_TABLE PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_HI_DECISION_EXECUTION (ID_ VARCHAR(255) NOT NULL, DECISION_DEFINITION_ID_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, INSTANCE_ID_ VARCHAR(255), EXECUTION_ID_ VARCHAR(255), ACTIVITY_ID_ VARCHAR(255), FAILED_ BOOLEAN DEFAULT FALSE, TENANT_ID_ VARCHAR(255), EXECUTION_JSON_ CLOB, CONSTRAINT PK_ACT_DMN_HI_DECISION_EXECUTION PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_DMN_HI_DECISION_EXECUTION ADD SCOPE_TYPE_ VARCHAR(255);
+
+CREATE UNIQUE INDEX ACT_IDX_DMN_DEC_UNIQ ON ACT_DMN_DECISION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_DMN_DECISION ADD DECISION_TYPE_ VARCHAR(255);
+
+CREATE INDEX ACT_IDX_DMN_INSTANCE_ID ON ACT_DMN_HI_DECISION_EXECUTION(INSTANCE_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('dmn.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.mssql.create.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.mssql.create.dmn.sql
new file mode 100644
index 00000000000..48361a900f1
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.mssql.create.dmn.sql
@@ -0,0 +1,42 @@
+CREATE TABLE ACT_DMN_DEPLOYMENT (ID_ varchar(255) NOT NULL, NAME_ varchar(255), CATEGORY_ varchar(255), DEPLOY_TIME_ datetime, TENANT_ID_ varchar(255), PARENT_DEPLOYMENT_ID_ varchar(255), CONSTRAINT PK_ACT_DMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DEPLOYMENT_RESOURCE (ID_ varchar(255) NOT NULL, NAME_ varchar(255), DEPLOYMENT_ID_ varchar(255), RESOURCE_BYTES_ varbinary(MAX), CONSTRAINT PK_ACT_DMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DECISION_TABLE (ID_ varchar(255) NOT NULL, NAME_ varchar(255), VERSION_ int, KEY_ varchar(255), CATEGORY_ varchar(255), DEPLOYMENT_ID_ varchar(255), PARENT_DEPLOYMENT_ID_ varchar(255), TENANT_ID_ varchar(255), RESOURCE_NAME_ varchar(255), DESCRIPTION_ varchar(255), CONSTRAINT PK_ACT_DMN_DECISION_TABLE PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_HI_DECISION_EXECUTION (ID_ varchar(255) NOT NULL, DECISION_DEFINITION_ID_ varchar(255), DEPLOYMENT_ID_ varchar(255), START_TIME_ datetime, END_TIME_ datetime, INSTANCE_ID_ varchar(255), EXECUTION_ID_ varchar(255), ACTIVITY_ID_ varchar(255), FAILED_ bit CONSTRAINT DF_ACT_DMN_HI_DECISION_EXECUTION_FAILED_ DEFAULT 0, TENANT_ID_ varchar(255), EXECUTION_JSON_ varchar(MAX), CONSTRAINT PK_ACT_DMN_HI_DECISION_EXECUTION PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_DMN_HI_DECISION_EXECUTION ADD SCOPE_TYPE_ varchar(255);
+
+DECLARE @sql [nvarchar](MAX)
+SELECT @sql = N'ALTER TABLE ACT_DMN_DECISION_TABLE DROP CONSTRAINT ' + QUOTENAME([df].[name]) FROM [sys].[columns] AS [c] INNER JOIN [sys].[default_constraints] AS [df] ON [df].[object_id] = [c].[default_object_id] WHERE [c].[object_id] = OBJECT_ID(N'ACT_DMN_DECISION_TABLE') AND [c].[name] = N'PARENT_DEPLOYMENT_ID_'
+EXEC sp_executesql @sql;
+
+ALTER TABLE ACT_DMN_DECISION_TABLE DROP COLUMN PARENT_DEPLOYMENT_ID_;
+
+CREATE UNIQUE NONCLUSTERED INDEX ACT_IDX_DEC_TBL_UNIQ ON ACT_DMN_DECISION_TABLE(KEY_, VERSION_, TENANT_ID_);
+
+DROP INDEX ACT_IDX_DEC_TBL_UNIQ ON ACT_DMN_DECISION_TABLE;
+
+exec sp_rename 'ACT_DMN_DECISION_TABLE', 'ACT_DMN_DECISION';
+
+CREATE UNIQUE NONCLUSTERED INDEX ACT_IDX_DMN_DEC_UNIQ ON ACT_DMN_DECISION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_DMN_DECISION ADD DECISION_TYPE_ varchar(255);
+
+CREATE NONCLUSTERED INDEX ACT_IDX_DMN_INSTANCE_ID ON ACT_DMN_HI_DECISION_EXECUTION(INSTANCE_ID_);
+
+ALTER TABLE ACT_DMN_DEPLOYMENT ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_DMN_DEPLOYMENT_RESOURCE ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_DMN_DECISION ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_DMN_DECISION ALTER COLUMN CATEGORY_ nvarchar(255);
+
+ALTER TABLE ACT_DMN_DECISION ALTER COLUMN RESOURCE_NAME_ nvarchar(255);
+
+ALTER TABLE ACT_DMN_DECISION ALTER COLUMN DESCRIPTION_ nvarchar(255);
+
+insert into ACT_GE_PROPERTY
+values ('dmn.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.mysql.create.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.mysql.create.dmn.sql
new file mode 100644
index 00000000000..dcac1a9a74d
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.mysql.create.dmn.sql
@@ -0,0 +1,18 @@
+CREATE TABLE ACT_DMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOY_TIME_ datetime(3) NULL, TENANT_ID_ VARCHAR(255) NULL, PARENT_DEPLOYMENT_ID_ VARCHAR(255) NULL, CONSTRAINT PK_ACT_DMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, RESOURCE_BYTES_ LONGBLOB NULL, CONSTRAINT PK_ACT_DMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DECISION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, VERSION_ INT NULL, KEY_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) NULL, RESOURCE_NAME_ VARCHAR(255) NULL, DESCRIPTION_ VARCHAR(255) NULL, CONSTRAINT PK_ACT_DMN_DECISION_TABLE PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_HI_DECISION_EXECUTION (ID_ VARCHAR(255) NOT NULL, DECISION_DEFINITION_ID_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, START_TIME_ datetime(3) NULL, END_TIME_ datetime(3) NULL, INSTANCE_ID_ VARCHAR(255) NULL, EXECUTION_ID_ VARCHAR(255) NULL, ACTIVITY_ID_ VARCHAR(255) NULL, FAILED_ TINYINT DEFAULT 0 NULL, TENANT_ID_ VARCHAR(255) NULL, EXECUTION_JSON_ LONGTEXT NULL, CONSTRAINT PK_ACT_DMN_HI_DECISION_EXECUTION PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_DMN_HI_DECISION_EXECUTION ADD SCOPE_TYPE_ VARCHAR(255) NULL;
+
+CREATE UNIQUE INDEX ACT_IDX_DMN_DEC_UNIQ ON ACT_DMN_DECISION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_DMN_DECISION ADD DECISION_TYPE_ VARCHAR(255) NULL;
+
+CREATE INDEX ACT_IDX_DMN_INSTANCE_ID ON ACT_DMN_HI_DECISION_EXECUTION(INSTANCE_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('dmn.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.oracle.create.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.oracle.create.dmn.sql
new file mode 100644
index 00000000000..4a11fe146d7
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.oracle.create.dmn.sql
@@ -0,0 +1,26 @@
+CREATE TABLE ACT_DMN_DEPLOYMENT (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), DEPLOY_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR2(255), PARENT_DEPLOYMENT_ID_ VARCHAR2(255), CONSTRAINT PK_ACT_DMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_ACT_DMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DECISION_TABLE (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), VERSION_ INTEGER, KEY_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), PARENT_DEPLOYMENT_ID_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255), RESOURCE_NAME_ VARCHAR2(255), DESCRIPTION_ VARCHAR2(255), CONSTRAINT PK_ACT_DMN_DECISION_TABLE PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_HI_DECISION_EXECUTION (ID_ VARCHAR2(255) NOT NULL, DECISION_DEFINITION_ID_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, INSTANCE_ID_ VARCHAR2(255), EXECUTION_ID_ VARCHAR2(255), ACTIVITY_ID_ VARCHAR2(255), FAILED_ NUMBER(1) DEFAULT 0, TENANT_ID_ VARCHAR2(255), EXECUTION_JSON_ CLOB, CONSTRAINT PK_ACT_DMN_HI_DECISION_EXECUTI PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_DMN_HI_DECISION_EXECUTION ADD SCOPE_TYPE_ VARCHAR2(255);
+
+ALTER TABLE ACT_DMN_DECISION_TABLE DROP COLUMN PARENT_DEPLOYMENT_ID_;
+
+CREATE UNIQUE INDEX ACT_IDX_DEC_TBL_UNIQ ON ACT_DMN_DECISION_TABLE(KEY_, VERSION_, TENANT_ID_);
+
+DROP INDEX ACT_IDX_DEC_TBL_UNIQ;
+
+ALTER TABLE ACT_DMN_DECISION_TABLE RENAME TO ACT_DMN_DECISION;
+
+CREATE UNIQUE INDEX ACT_IDX_DMN_DEC_UNIQ ON ACT_DMN_DECISION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_DMN_DECISION ADD DECISION_TYPE_ VARCHAR2(255);
+
+CREATE INDEX ACT_IDX_DMN_INSTANCE_ID ON ACT_DMN_HI_DECISION_EXECUTION(INSTANCE_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('dmn.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.postgres.create.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.postgres.create.dmn.sql
new file mode 100644
index 00000000000..7c78cb6a9b6
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/create/flowable.postgres.create.dmn.sql
@@ -0,0 +1,18 @@
+CREATE TABLE ACT_DMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP WITHOUT TIME ZONE, TENANT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), CONSTRAINT "ACT_DMN_DEPLOYMENT_pkey" PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BYTEA, CONSTRAINT "ACT_DMN_DEPLOYMENT_RESOURCE_pkey" PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DECISION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INTEGER, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT "ACT_DMN_DECISION_TABLE_pkey" PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_HI_DECISION_EXECUTION (ID_ VARCHAR(255) NOT NULL, DECISION_DEFINITION_ID_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), START_TIME_ TIMESTAMP WITHOUT TIME ZONE, END_TIME_ TIMESTAMP WITHOUT TIME ZONE, INSTANCE_ID_ VARCHAR(255), EXECUTION_ID_ VARCHAR(255), ACTIVITY_ID_ VARCHAR(255), FAILED_ BOOLEAN DEFAULT FALSE, TENANT_ID_ VARCHAR(255), EXECUTION_JSON_ TEXT, CONSTRAINT "ACT_DMN_HI_DECISION_EXECUTION_pkey" PRIMARY KEY (ID_));
+
+ALTER TABLE ACT_DMN_HI_DECISION_EXECUTION ADD SCOPE_TYPE_ VARCHAR(255);
+
+CREATE UNIQUE INDEX ACT_IDX_DMN_DEC_UNIQ ON ACT_DMN_DECISION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_DMN_DECISION ADD DECISION_TYPE_ VARCHAR(255);
+
+CREATE INDEX ACT_IDX_DMN_INSTANCE_ID ON ACT_DMN_HI_DECISION_EXECUTION(INSTANCE_ID_);
+
+insert into ACT_GE_PROPERTY
+values ('dmn.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/drop/flowable.h2.drop.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/drop/flowable.h2.drop.dmn.sql
new file mode 100644
index 00000000000..06cfff2ec5c
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/drop/flowable.h2.drop.dmn.sql
@@ -0,0 +1,7 @@
+drop index if exists ACT_IDX_DMN_INSTANCE_ID;
+drop index if exists ACT_IDX_DMN_DEC_UNIQ;
+
+drop table if exists ACT_DMN_HI_DECISION_EXECUTION cascade constraints;
+drop table if exists ACT_DMN_DECISION cascade constraints;
+drop table if exists ACT_DMN_DEPLOYMENT_RESOURCE cascade constraints;
+drop table if exists ACT_DMN_DEPLOYMENT cascade constraints;
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/drop/flowable.mysql.drop.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/drop/flowable.mysql.drop.dmn.sql
new file mode 100644
index 00000000000..4a90aaa2caa
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/drop/flowable.mysql.drop.dmn.sql
@@ -0,0 +1,7 @@
+drop index ACT_IDX_DMN_INSTANCE_ID on ACT_DMN_HI_DECISION_EXECUTION;
+drop index ACT_IDX_DMN_DEC_UNIQ on ACT_DMN_DECISION;
+
+drop table if exists ACT_DMN_HI_DECISION_EXECUTION;
+drop table if exists ACT_DMN_DECISION;
+drop table if exists ACT_DMN_DEPLOYMENT_RESOURCE;
+drop table if exists ACT_DMN_DEPLOYMENT;
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/drop/flowable.postgres.drop.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/drop/flowable.postgres.drop.dmn.sql
new file mode 100644
index 00000000000..e3706e9a1d6
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/drop/flowable.postgres.drop.dmn.sql
@@ -0,0 +1,4 @@
+drop table if exists ACT_DMN_HI_DECISION_EXECUTION cascade;
+drop table if exists ACT_DMN_DECISION cascade;
+drop table if exists ACT_DMN_DEPLOYMENT_RESOURCE cascade;
+drop table if exists ACT_DMN_DEPLOYMENT cascade;
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/liquibase/flowable-dmn-db-changelog.xml b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/liquibase/flowable-dmn-db-changelog.xml
deleted file mode 100644
index e2a9aa61178..00000000000
--- a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/liquibase/flowable-dmn-db-changelog.xml
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/mapping/mappings.xml b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/mapping/mappings.xml
index a742e75b3fa..293de0f36f3 100644
--- a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/mapping/mappings.xml
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/mapping/mappings.xml
@@ -9,6 +9,7 @@
+
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.all.upgradestep.7100.to.7101.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.all.upgradestep.7100.to.7101.dmn.sql
new file mode 100644
index 00000000000..9cff2606af4
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.all.upgradestep.7100.to.7101.dmn.sql
@@ -0,0 +1,5 @@
+insert into ACT_GE_PROPERTY
+values ('dmn.schema.version', '7.1.0.1', 1);
+
+drop table ACT_DMN_DATABASECHANGELOG;
+drop table ACT_DMN_DATABASECHANGELOGLOCK;
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.59900.to.6000.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.59900.to.6000.dmn.sql
new file mode 100644
index 00000000000..479e8f20934
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.59900.to.6000.dmn.sql
@@ -0,0 +1,7 @@
+CREATE TABLE ACT_DMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), CONSTRAINT PK_ACT_DMN_DEPLOY PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_ACT_DMN_DEPLOY PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DECISION_TABLE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INTEGER, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT PK_ACT_DMN_DECISI PRIMARY KEY (ID_));
+
+
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6100.to.6110.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6100.to.6110.dmn.sql
new file mode 100644
index 00000000000..227bbcaacd4
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6100.to.6110.dmn.sql
@@ -0,0 +1,3 @@
+CREATE TABLE ACT_DMN_HI_DECISION_EXECUTION (ID_ VARCHAR(255) NOT NULL, DECISION_DEFINITION_ID_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, INSTANCE_ID_ VARCHAR(255), EXECUTION_ID_ VARCHAR(255), ACTIVITY_ID_ VARCHAR(255), FAILED_ SMALLINT DEFAULT 0, TENANT_ID_ VARCHAR(255), EXECUTION_JSON_ CLOB, CONSTRAINT PK_ACT_DMN_HI_DEC PRIMARY KEY (ID_));
+
+
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6210.to.6300.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6210.to.6300.dmn.sql
new file mode 100644
index 00000000000..39817d0e966
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6210.to.6300.dmn.sql
@@ -0,0 +1,5 @@
+ALTER TABLE ACT_DMN_HI_DECISION_EXECUTION ADD SCOPE_TYPE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_DMN_HI_DECISION_EXECUTION');
+
+
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6300.to.6301.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6300.to.6301.dmn.sql
new file mode 100644
index 00000000000..75fa33bee2a
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6300.to.6301.dmn.sql
@@ -0,0 +1,5 @@
+ALTER TABLE ACT_DMN_DECISION_TABLE DROP COLUMN PARENT_DEPLOYMENT_ID_;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_DMN_DECISION_TABLE');
+
+
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6400.to.6410.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6400.to.6410.dmn.sql
new file mode 100644
index 00000000000..e835250d9a4
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6400.to.6410.dmn.sql
@@ -0,0 +1,3 @@
+CREATE UNIQUE INDEX ACT_IDX_DEC_TBL_UNIQ ON ACT_DMN_DECISION_TABLE(KEY_, VERSION_, TENANT_ID_);
+
+
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6511.to.6512.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6511.to.6512.dmn.sql
new file mode 100644
index 00000000000..30f3a030913
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6511.to.6512.dmn.sql
@@ -0,0 +1,13 @@
+DROP INDEX ACT_IDX_DEC_TBL_UNIQ;
+
+RENAME ACT_DMN_DECISION_TABLE TO ACT_DMN_DECISION;
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_DMN_DECISION');
+
+CREATE UNIQUE INDEX ACT_IDX_DMN_DEC_UNIQ ON ACT_DMN_DECISION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_DMN_DECISION ADD DECISION_TYPE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE ACT_DMN_DECISION');
+
+
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6723.to.6800.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6723.to.6800.dmn.sql
new file mode 100644
index 00000000000..adb9d4c0557
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.db2.upgradestep.6723.to.6800.dmn.sql
@@ -0,0 +1 @@
+CREATE INDEX ACT_IDX_DMN_INSTANCE_ID ON ACT_DMN_HI_DECISION_EXECUTION(INSTANCE_ID_);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.59900.to.6000.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.59900.to.6000.dmn.sql
new file mode 100644
index 00000000000..bbe9a82963f
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.59900.to.6000.dmn.sql
@@ -0,0 +1,5 @@
+CREATE TABLE ACT_DMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), CONSTRAINT PK_ACT_DMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_ACT_DMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DECISION_TABLE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INT, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT PK_ACT_DMN_DECISION_TABLE PRIMARY KEY (ID_));
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6100.to.6110.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6100.to.6110.dmn.sql
new file mode 100644
index 00000000000..b4126421298
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6100.to.6110.dmn.sql
@@ -0,0 +1 @@
+CREATE TABLE ACT_DMN_HI_DECISION_EXECUTION (ID_ VARCHAR(255) NOT NULL, DECISION_DEFINITION_ID_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, INSTANCE_ID_ VARCHAR(255), EXECUTION_ID_ VARCHAR(255), ACTIVITY_ID_ VARCHAR(255), FAILED_ BOOLEAN DEFAULT FALSE, TENANT_ID_ VARCHAR(255), EXECUTION_JSON_ CLOB, CONSTRAINT PK_ACT_DMN_HI_DECISION_EXECUTION PRIMARY KEY (ID_));
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6210.to.6300.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6210.to.6300.dmn.sql
new file mode 100644
index 00000000000..52e54a804ba
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6210.to.6300.dmn.sql
@@ -0,0 +1 @@
+ALTER TABLE ACT_DMN_HI_DECISION_EXECUTION ADD SCOPE_TYPE_ VARCHAR(255);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6300.to.6301.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6300.to.6301.dmn.sql
new file mode 100644
index 00000000000..d45b19fc7fa
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6300.to.6301.dmn.sql
@@ -0,0 +1 @@
+ALTER TABLE ACT_DMN_DECISION_TABLE DROP COLUMN PARENT_DEPLOYMENT_ID_;
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6400.to.6410.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6400.to.6410.dmn.sql
new file mode 100644
index 00000000000..d4e92a24219
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6400.to.6410.dmn.sql
@@ -0,0 +1 @@
+CREATE UNIQUE INDEX ACT_IDX_DEC_TBL_UNIQ ON ACT_DMN_DECISION_TABLE(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6511.to.6512.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6511.to.6512.dmn.sql
new file mode 100644
index 00000000000..fab3f27a64d
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6511.to.6512.dmn.sql
@@ -0,0 +1,7 @@
+DROP INDEX ACT_IDX_DEC_TBL_UNIQ;
+
+ALTER TABLE ACT_DMN_DECISION_TABLE RENAME TO ACT_DMN_DECISION;
+
+CREATE UNIQUE INDEX ACT_IDX_DMN_DEC_UNIQ ON ACT_DMN_DECISION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_DMN_DECISION ADD DECISION_TYPE_ VARCHAR(255);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6723.to.6800.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6723.to.6800.dmn.sql
new file mode 100644
index 00000000000..adb9d4c0557
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.h2.upgradestep.6723.to.6800.dmn.sql
@@ -0,0 +1 @@
+CREATE INDEX ACT_IDX_DMN_INSTANCE_ID ON ACT_DMN_HI_DECISION_EXECUTION(INSTANCE_ID_);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.59900.to.6000.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.59900.to.6000.dmn.sql
new file mode 100644
index 00000000000..0b7d6a25cba
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.59900.to.6000.dmn.sql
@@ -0,0 +1,7 @@
+CREATE TABLE [ACT_DMN_DATABASECHANGELOG] ([ID] [nvarchar](255) NOT NULL, [AUTHOR] [nvarchar](255) NOT NULL, [FILENAME] [nvarchar](255) NOT NULL, [DATEEXECUTED] [datetime2](3) NOT NULL, [ORDEREXECUTED] [int] NOT NULL, [EXECTYPE] [nvarchar](10) NOT NULL, [MD5SUM] [nvarchar](35), [DESCRIPTION] [nvarchar](255), [COMMENTS] [nvarchar](255), [TAG] [nvarchar](255), [LIQUIBASE] [nvarchar](20), [CONTEXTS] [nvarchar](255), [LABELS] [nvarchar](255), [DEPLOYMENT_ID] [nvarchar](10))
+
+CREATE TABLE [ACT_DMN_DEPLOYMENT] ([ID_] [varchar](255) NOT NULL, [NAME_] [varchar](255), [CATEGORY_] [varchar](255), [DEPLOY_TIME_] [datetime], [TENANT_ID_] [varchar](255), [PARENT_DEPLOYMENT_ID_] [varchar](255), CONSTRAINT [PK_ACT_DMN_DEPLOYMENT] PRIMARY KEY ([ID_]))
+
+CREATE TABLE [ACT_DMN_DEPLOYMENT_RESOURCE] ([ID_] [varchar](255) NOT NULL, [NAME_] [varchar](255), [DEPLOYMENT_ID_] [varchar](255), [RESOURCE_BYTES_] [varbinary](MAX), CONSTRAINT [PK_ACT_DMN_DEPLOYMENT_RESOURCE] PRIMARY KEY ([ID_]))
+
+CREATE TABLE [ACT_DMN_DECISION_TABLE] ([ID_] [varchar](255) NOT NULL, [NAME_] [varchar](255), [VERSION_] [int], [KEY_] [varchar](255), [CATEGORY_] [varchar](255), [DEPLOYMENT_ID_] [varchar](255), [PARENT_DEPLOYMENT_ID_] [varchar](255), [TENANT_ID_] [varchar](255), [RESOURCE_NAME_] [varchar](255), [DESCRIPTION_] [varchar](255), CONSTRAINT [PK_ACT_DMN_DECISION_TABLE] PRIMARY KEY ([ID_]))
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6100.to.6110.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6100.to.6110.dmn.sql
new file mode 100644
index 00000000000..05961e57a55
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6100.to.6110.dmn.sql
@@ -0,0 +1 @@
+CREATE TABLE [ACT_DMN_HI_DECISION_EXECUTION] ([ID_] [varchar](255) NOT NULL, [DECISION_DEFINITION_ID_] [varchar](255), [DEPLOYMENT_ID_] [varchar](255), [START_TIME_] [datetime], [END_TIME_] [datetime], [INSTANCE_ID_] [varchar](255), [EXECUTION_ID_] [varchar](255), [ACTIVITY_ID_] [varchar](255), [FAILED_] [bit] CONSTRAINT [DF_ACT_DMN_HI_DECISION_EXECUTION_FAILED_] DEFAULT 0, [TENANT_ID_] [varchar](255), [EXECUTION_JSON_] [varchar](MAX), CONSTRAINT [PK_ACT_DMN_HI_DECISION_EXECUTION] PRIMARY KEY ([ID_]))
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6210.to.6300.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6210.to.6300.dmn.sql
new file mode 100644
index 00000000000..c06ee5c7659
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6210.to.6300.dmn.sql
@@ -0,0 +1 @@
+ALTER TABLE ACT_DMN_HI_DECISION_EXECUTION ADD SCOPE_TYPE_ varchar(255);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6300.to.6301.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6300.to.6301.dmn.sql
new file mode 100644
index 00000000000..c88ac49a27e
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6300.to.6301.dmn.sql
@@ -0,0 +1,5 @@
+DECLARE @sql [nvarchar](MAX)
+SELECT @sql = N'ALTER TABLE ACT_DMN_DECISION_TABLE DROP CONSTRAINT ' + QUOTENAME([df].[name]) FROM [sys].[columns] AS [c] INNER JOIN [sys].[default_constraints] AS [df] ON [df].[object_id] = [c].[default_object_id] WHERE [c].[object_id] = OBJECT_ID(N'ACT_DMN_DECISION_TABLE') AND [c].[name] = N'PARENT_DEPLOYMENT_ID_'
+EXEC sp_executesql @sql;
+
+ALTER TABLE ACT_DMN_DECISION_TABLE DROP COLUMN PARENT_DEPLOYMENT_ID_;
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6400.to.6410.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6400.to.6410.dmn.sql
new file mode 100644
index 00000000000..d8bee94dbfe
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6400.to.6410.dmn.sql
@@ -0,0 +1 @@
+CREATE UNIQUE NONCLUSTERED INDEX ACT_IDX_DEC_TBL_UNIQ ON ACT_DMN_DECISION_TABLE(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6511.to.6512.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6511.to.6512.dmn.sql
new file mode 100644
index 00000000000..d39e7647f99
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6511.to.6512.dmn.sql
@@ -0,0 +1,7 @@
+DROP INDEX ACT_IDX_DEC_TBL_UNIQ ON ACT_DMN_DECISION_TABLE;
+
+exec sp_rename 'ACT_DMN_DECISION_TABLE', 'ACT_DMN_DECISION';
+
+CREATE UNIQUE NONCLUSTERED INDEX ACT_IDX_DMN_DEC_UNIQ ON ACT_DMN_DECISION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_DMN_DECISION ADD DECISION_TYPE_ varchar(255);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6723.to.6800.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6723.to.6800.dmn.sql
new file mode 100644
index 00000000000..239dcd9fa07
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.6723.to.6800.dmn.sql
@@ -0,0 +1 @@
+CREATE NONCLUSTERED INDEX ACT_IDX_DMN_INSTANCE_ID ON ACT_DMN_HI_DECISION_EXECUTION(INSTANCE_ID_);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.7010.to.7100.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.7010.to.7100.dmn.sql
new file mode 100644
index 00000000000..4f1fd1675a4
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mssql.upgradestep.7010.to.7100.dmn.sql
@@ -0,0 +1,11 @@
+ALTER TABLE ACT_DMN_DEPLOYMENT ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_DMN_DEPLOYMENT_RESOURCE ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_DMN_DECISION ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE ACT_DMN_DECISION ALTER COLUMN CATEGORY_ nvarchar(255);
+
+ALTER TABLE ACT_DMN_DECISION ALTER COLUMN RESOURCE_NAME_ nvarchar(255);
+
+ALTER TABLE ACT_DMN_DECISION ALTER COLUMN DESCRIPTION_ nvarchar(255);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.59900.to.6000.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.59900.to.6000.dmn.sql
new file mode 100644
index 00000000000..73f0b5fc560
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.59900.to.6000.dmn.sql
@@ -0,0 +1,5 @@
+CREATE TABLE ACT_DMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOY_TIME_ datetime NULL, TENANT_ID_ VARCHAR(255) NULL, PARENT_DEPLOYMENT_ID_ VARCHAR(255) NULL, CONSTRAINT PK_ACT_DMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, RESOURCE_BYTES_ LONGBLOB NULL, CONSTRAINT PK_ACT_DMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DECISION_TABLE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, VERSION_ INT NULL, KEY_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, PARENT_DEPLOYMENT_ID_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) NULL, RESOURCE_NAME_ VARCHAR(255) NULL, DESCRIPTION_ VARCHAR(255) NULL, CONSTRAINT PK_ACT_DMN_DECISION_TABLE PRIMARY KEY (ID_));
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6100.to.6110.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6100.to.6110.dmn.sql
new file mode 100644
index 00000000000..d64f0b58799
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6100.to.6110.dmn.sql
@@ -0,0 +1 @@
+CREATE TABLE ACT_DMN_HI_DECISION_EXECUTION (ID_ VARCHAR(255) NOT NULL, DECISION_DEFINITION_ID_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, START_TIME_ datetime NULL, END_TIME_ datetime NULL, INSTANCE_ID_ VARCHAR(255) NULL, EXECUTION_ID_ VARCHAR(255) NULL, ACTIVITY_ID_ VARCHAR(255) NULL, FAILED_ BIT(1) DEFAULT 0 NULL, TENANT_ID_ VARCHAR(255) NULL, EXECUTION_JSON_ LONGTEXT NULL, CONSTRAINT PK_ACT_DMN_HI_DECISION_EXECUTION PRIMARY KEY (ID_));
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6210.to.6300.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6210.to.6300.dmn.sql
new file mode 100644
index 00000000000..fbde7455443
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6210.to.6300.dmn.sql
@@ -0,0 +1 @@
+ALTER TABLE ACT_DMN_HI_DECISION_EXECUTION ADD SCOPE_TYPE_ VARCHAR(255) NULL;
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6300.to.6301.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6300.to.6301.dmn.sql
new file mode 100644
index 00000000000..d45b19fc7fa
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6300.to.6301.dmn.sql
@@ -0,0 +1 @@
+ALTER TABLE ACT_DMN_DECISION_TABLE DROP COLUMN PARENT_DEPLOYMENT_ID_;
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6320.to.6400.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6320.to.6400.dmn.sql
new file mode 100644
index 00000000000..ccd44e14089
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6320.to.6400.dmn.sql
@@ -0,0 +1,5 @@
+ALTER TABLE ACT_DMN_DEPLOYMENT MODIFY DEPLOY_TIME_ datetime(3);
+
+ALTER TABLE ACT_DMN_HI_DECISION_EXECUTION MODIFY START_TIME_ datetime(3);
+
+ALTER TABLE ACT_DMN_HI_DECISION_EXECUTION MODIFY END_TIME_ datetime(3);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6400.to.6410.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6400.to.6410.dmn.sql
new file mode 100644
index 00000000000..d4e92a24219
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6400.to.6410.dmn.sql
@@ -0,0 +1 @@
+CREATE UNIQUE INDEX ACT_IDX_DEC_TBL_UNIQ ON ACT_DMN_DECISION_TABLE(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6511.to.6512.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6511.to.6512.dmn.sql
new file mode 100644
index 00000000000..61ab45d0236
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6511.to.6512.dmn.sql
@@ -0,0 +1,7 @@
+DROP INDEX ACT_IDX_DEC_TBL_UNIQ ON ACT_DMN_DECISION_TABLE;
+
+ALTER TABLE ACT_DMN_DECISION_TABLE RENAME ACT_DMN_DECISION;
+
+CREATE UNIQUE INDEX ACT_IDX_DMN_DEC_UNIQ ON ACT_DMN_DECISION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_DMN_DECISION ADD DECISION_TYPE_ VARCHAR(255) NULL;
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6723.to.6800.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6723.to.6800.dmn.sql
new file mode 100644
index 00000000000..adb9d4c0557
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.mysql.upgradestep.6723.to.6800.dmn.sql
@@ -0,0 +1 @@
+CREATE INDEX ACT_IDX_DMN_INSTANCE_ID ON ACT_DMN_HI_DECISION_EXECUTION(INSTANCE_ID_);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.59900.to.6000.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.59900.to.6000.dmn.sql
new file mode 100644
index 00000000000..833aaed4738
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.59900.to.6000.dmn.sql
@@ -0,0 +1,5 @@
+CREATE TABLE ACT_DMN_DEPLOYMENT (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), DEPLOY_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR2(255), PARENT_DEPLOYMENT_ID_ VARCHAR2(255), CONSTRAINT PK_ACT_DMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_ACT_DMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DECISION_TABLE (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), VERSION_ INTEGER, KEY_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), PARENT_DEPLOYMENT_ID_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255), RESOURCE_NAME_ VARCHAR2(255), DESCRIPTION_ VARCHAR2(255), CONSTRAINT PK_ACT_DMN_DECISION_TABLE PRIMARY KEY (ID_));
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6100.to.6110.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6100.to.6110.dmn.sql
new file mode 100644
index 00000000000..7389bdf9906
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6100.to.6110.dmn.sql
@@ -0,0 +1 @@
+CREATE TABLE ACT_DMN_HI_DECISION_EXECUTION (ID_ VARCHAR2(255) NOT NULL, DECISION_DEFINITION_ID_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), START_TIME_ TIMESTAMP, END_TIME_ TIMESTAMP, INSTANCE_ID_ VARCHAR2(255), EXECUTION_ID_ VARCHAR2(255), ACTIVITY_ID_ VARCHAR2(255), FAILED_ NUMBER(1) DEFAULT 0, TENANT_ID_ VARCHAR2(255), EXECUTION_JSON_ CLOB, CONSTRAINT PK_ACT_DMN_HI_DECISION_EXECUTI PRIMARY KEY (ID_));
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6210.to.6300.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6210.to.6300.dmn.sql
new file mode 100644
index 00000000000..cc5138a2dd8
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6210.to.6300.dmn.sql
@@ -0,0 +1 @@
+ALTER TABLE ACT_DMN_HI_DECISION_EXECUTION ADD SCOPE_TYPE_ VARCHAR2(255);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6300.to.6301.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6300.to.6301.dmn.sql
new file mode 100644
index 00000000000..d45b19fc7fa
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6300.to.6301.dmn.sql
@@ -0,0 +1 @@
+ALTER TABLE ACT_DMN_DECISION_TABLE DROP COLUMN PARENT_DEPLOYMENT_ID_;
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6400.to.6410.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6400.to.6410.dmn.sql
new file mode 100644
index 00000000000..d4e92a24219
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6400.to.6410.dmn.sql
@@ -0,0 +1 @@
+CREATE UNIQUE INDEX ACT_IDX_DEC_TBL_UNIQ ON ACT_DMN_DECISION_TABLE(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6511.to.6512.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6511.to.6512.dmn.sql
new file mode 100644
index 00000000000..e80d3c9dbeb
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6511.to.6512.dmn.sql
@@ -0,0 +1,7 @@
+DROP INDEX ACT_IDX_DEC_TBL_UNIQ;
+
+ALTER TABLE ACT_DMN_DECISION_TABLE RENAME TO ACT_DMN_DECISION;
+
+CREATE UNIQUE INDEX ACT_IDX_DMN_DEC_UNIQ ON ACT_DMN_DECISION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_DMN_DECISION ADD DECISION_TYPE_ VARCHAR2(255);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6723.to.6800.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6723.to.6800.dmn.sql
new file mode 100644
index 00000000000..adb9d4c0557
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.oracle.upgradestep.6723.to.6800.dmn.sql
@@ -0,0 +1 @@
+CREATE INDEX ACT_IDX_DMN_INSTANCE_ID ON ACT_DMN_HI_DECISION_EXECUTION(INSTANCE_ID_);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.59900.to.6000.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.59900.to.6000.dmn.sql
new file mode 100644
index 00000000000..5cc4e51e842
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.59900.to.6000.dmn.sql
@@ -0,0 +1,5 @@
+CREATE TABLE ACT_DMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP WITHOUT TIME ZONE, TENANT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), CONSTRAINT PK_ACT_DMN_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BYTEA, CONSTRAINT PK_ACT_DMN_DEPLOYMENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE ACT_DMN_DECISION_TABLE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INT, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT PK_ACT_DMN_DECISION_TABLE PRIMARY KEY (ID_));
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6100.to.6110.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6100.to.6110.dmn.sql
new file mode 100644
index 00000000000..485d76bc16e
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6100.to.6110.dmn.sql
@@ -0,0 +1 @@
+CREATE TABLE ACT_DMN_HI_DECISION_EXECUTION (ID_ VARCHAR(255) NOT NULL, DECISION_DEFINITION_ID_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), START_TIME_ TIMESTAMP WITHOUT TIME ZONE, END_TIME_ TIMESTAMP WITHOUT TIME ZONE, INSTANCE_ID_ VARCHAR(255), EXECUTION_ID_ VARCHAR(255), ACTIVITY_ID_ VARCHAR(255), FAILED_ BOOLEAN DEFAULT FALSE, TENANT_ID_ VARCHAR(255), EXECUTION_JSON_ TEXT, CONSTRAINT PK_ACT_DMN_HI_DECISION_EXECUTION PRIMARY KEY (ID_));
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6210.to.6300.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6210.to.6300.dmn.sql
new file mode 100644
index 00000000000..52e54a804ba
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6210.to.6300.dmn.sql
@@ -0,0 +1 @@
+ALTER TABLE ACT_DMN_HI_DECISION_EXECUTION ADD SCOPE_TYPE_ VARCHAR(255);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6300.to.6301.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6300.to.6301.dmn.sql
new file mode 100644
index 00000000000..d45b19fc7fa
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6300.to.6301.dmn.sql
@@ -0,0 +1 @@
+ALTER TABLE ACT_DMN_DECISION_TABLE DROP COLUMN PARENT_DEPLOYMENT_ID_;
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6400.to.6410.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6400.to.6410.dmn.sql
new file mode 100644
index 00000000000..d4e92a24219
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6400.to.6410.dmn.sql
@@ -0,0 +1 @@
+CREATE UNIQUE INDEX ACT_IDX_DEC_TBL_UNIQ ON ACT_DMN_DECISION_TABLE(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6511.to.6512.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6511.to.6512.dmn.sql
new file mode 100644
index 00000000000..fab3f27a64d
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6511.to.6512.dmn.sql
@@ -0,0 +1,7 @@
+DROP INDEX ACT_IDX_DEC_TBL_UNIQ;
+
+ALTER TABLE ACT_DMN_DECISION_TABLE RENAME TO ACT_DMN_DECISION;
+
+CREATE UNIQUE INDEX ACT_IDX_DMN_DEC_UNIQ ON ACT_DMN_DECISION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE ACT_DMN_DECISION ADD DECISION_TYPE_ VARCHAR(255);
diff --git a/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6723.to.6800.dmn.sql b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6723.to.6800.dmn.sql
new file mode 100644
index 00000000000..adb9d4c0557
--- /dev/null
+++ b/modules/flowable-dmn-engine/src/main/resources/org/flowable/dmn/db/upgrade/flowable.postgres.upgradestep.6723.to.6800.dmn.sql
@@ -0,0 +1 @@
+CREATE INDEX ACT_IDX_DMN_INSTANCE_ID ON ACT_DMN_HI_DECISION_EXECUTION(INSTANCE_ID_);
diff --git a/modules/flowable-dmn-engine/src/test/java/org/flowable/dmn/engine/test/cfg/ForceCloseMybatisConnectionPoolTest.java b/modules/flowable-dmn-engine/src/test/java/org/flowable/dmn/engine/test/cfg/ForceCloseMybatisConnectionPoolTest.java
index f732b62160f..eb442b3d903 100644
--- a/modules/flowable-dmn-engine/src/test/java/org/flowable/dmn/engine/test/cfg/ForceCloseMybatisConnectionPoolTest.java
+++ b/modules/flowable-dmn-engine/src/test/java/org/flowable/dmn/engine/test/cfg/ForceCloseMybatisConnectionPoolTest.java
@@ -34,6 +34,7 @@ public void testForceCloseMybatisConnectionPoolTrue() {
StandaloneInMemDmnEngineConfiguration standaloneInMemDmnEngineConfiguration = new StandaloneInMemDmnEngineConfiguration();
standaloneInMemDmnEngineConfiguration.setJdbcUrl("jdbc:h2:mem:flowable-dmn-" + this.getClass().getName());
standaloneInMemDmnEngineConfiguration.setForceCloseMybatisConnectionPool(true);
+ standaloneInMemDmnEngineConfiguration.setDatabaseSchemaUpdate("true");
DmnEngine dmnEngine = standaloneInMemDmnEngineConfiguration.buildDmnEngine();
@@ -59,6 +60,7 @@ public void testForceCloseMybatisConnectionPoolFalse() {
StandaloneInMemDmnEngineConfiguration standaloneInMemDmnEngineConfiguration = new StandaloneInMemDmnEngineConfiguration();
standaloneInMemDmnEngineConfiguration.setJdbcUrl("jdbc:h2:mem:flowable-dmn-" + this.getClass().getName());
standaloneInMemDmnEngineConfiguration.setForceCloseMybatisConnectionPool(false);
+ standaloneInMemDmnEngineConfiguration.setDatabaseSchemaUpdate("true");
DmnEngine dmnEngine = standaloneInMemDmnEngineConfiguration.buildDmnEngine();
diff --git a/modules/flowable-dmn-engine/src/test/java/org/flowable/dmn/engine/test/mgmt/DmnManagementServiceTest.java b/modules/flowable-dmn-engine/src/test/java/org/flowable/dmn/engine/test/mgmt/DmnManagementServiceTest.java
index 41e404ce6cc..6d044267953 100644
--- a/modules/flowable-dmn-engine/src/test/java/org/flowable/dmn/engine/test/mgmt/DmnManagementServiceTest.java
+++ b/modules/flowable-dmn-engine/src/test/java/org/flowable/dmn/engine/test/mgmt/DmnManagementServiceTest.java
@@ -51,7 +51,7 @@ public void testTableCount() {
String tablePrefix = dmnEngineConfiguration.getDatabaseTablePrefix();
- assertThat(tableCount).containsEntry(tablePrefix + "ACT_GE_PROPERTY", 2L);
+ assertThat(tableCount).containsEntry(tablePrefix + "ACT_GE_PROPERTY", 3L);
assertThat(tableCount.get(tablePrefix + "ACT_DMN_DECISION")).isZero();
assertThat(tableCount.get(tablePrefix + "ACT_DMN_DEPLOYMENT")).isZero();
assertThat(tableCount.get(tablePrefix + "ACT_DMN_DEPLOYMENT_RESOURCE")).isZero();
diff --git a/modules/flowable-dmn-spring-configurator/src/main/java/org/flowable/dmn/spring/configurator/SpringDmnEngineConfigurator.java b/modules/flowable-dmn-spring-configurator/src/main/java/org/flowable/dmn/spring/configurator/SpringDmnEngineConfigurator.java
index 646b566bd98..6864624f7d7 100644
--- a/modules/flowable-dmn-spring-configurator/src/main/java/org/flowable/dmn/spring/configurator/SpringDmnEngineConfigurator.java
+++ b/modules/flowable-dmn-spring-configurator/src/main/java/org/flowable/dmn/spring/configurator/SpringDmnEngineConfigurator.java
@@ -12,10 +12,8 @@
*/
package org.flowable.dmn.spring.configurator;
-import org.flowable.common.engine.api.FlowableException;
import org.flowable.common.engine.impl.AbstractEngineConfiguration;
import org.flowable.common.spring.SpringEngineConfiguration;
-import org.flowable.dmn.engine.DmnEngine;
import org.flowable.dmn.engine.configurator.DmnEngineConfigurator;
import org.flowable.dmn.spring.SpringDmnEngineConfiguration;
@@ -41,17 +39,8 @@ public void configure(AbstractEngineConfiguration engineConfiguration) {
dmnEngineConfiguration.setBeans(springEngineConfiguration.getBeans());
}
- initDmnEngine();
+ initEngine();
initServiceConfigurations(engineConfiguration, dmnEngineConfiguration);
}
-
- @Override
- protected synchronized DmnEngine initDmnEngine() {
- if (dmnEngineConfiguration == null) {
- throw new FlowableException("DmnEngineConfiguration is required");
- }
-
- return dmnEngineConfiguration.buildDmnEngine();
- }
}
diff --git a/modules/flowable-dmn-spring/src/main/java/org/flowable/dmn/spring/SpringDmnEngineConfiguration.java b/modules/flowable-dmn-spring/src/main/java/org/flowable/dmn/spring/SpringDmnEngineConfiguration.java
index 9d1a5bdfa97..da7547bf418 100644
--- a/modules/flowable-dmn-spring/src/main/java/org/flowable/dmn/spring/SpringDmnEngineConfiguration.java
+++ b/modules/flowable-dmn-spring/src/main/java/org/flowable/dmn/spring/SpringDmnEngineConfiguration.java
@@ -66,8 +66,8 @@ public SpringDmnEngineConfiguration() {
}
@Override
- public DmnEngine buildDmnEngine() {
- DmnEngine dmnEngine = super.buildDmnEngine();
+ public DmnEngine buildEngine() {
+ DmnEngine dmnEngine = super.buildEngine();
DmnEngines.setInitialized(true);
enginesBuild.add(dmnEngine.getName());
return dmnEngine;
diff --git a/modules/flowable-dmn-spring/src/main/java/org/flowable/dmn/spring/autodeployment/AbstractDmnAutoDeploymentStrategy.java b/modules/flowable-dmn-spring/src/main/java/org/flowable/dmn/spring/autodeployment/AbstractDmnAutoDeploymentStrategy.java
index f613f9856c8..1258aead69a 100644
--- a/modules/flowable-dmn-spring/src/main/java/org/flowable/dmn/spring/autodeployment/AbstractDmnAutoDeploymentStrategy.java
+++ b/modules/flowable-dmn-spring/src/main/java/org/flowable/dmn/spring/autodeployment/AbstractDmnAutoDeploymentStrategy.java
@@ -17,7 +17,7 @@
import java.io.InputStream;
import java.io.UncheckedIOException;
-import org.flowable.common.engine.impl.lock.LockManager;
+import org.flowable.common.engine.api.lock.LockManager;
import org.flowable.common.spring.CommonAutoDeploymentProperties;
import org.flowable.common.spring.CommonAutoDeploymentStrategy;
import org.flowable.dmn.api.DmnDeploymentBuilder;
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/lock/LockManager.java b/modules/flowable-engine-common-api/src/main/java/org/flowable/common/engine/api/lock/LockManager.java
similarity index 97%
rename from modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/lock/LockManager.java
rename to modules/flowable-engine-common-api/src/main/java/org/flowable/common/engine/api/lock/LockManager.java
index b22ca6fb9a1..aecd27f6b94 100644
--- a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/lock/LockManager.java
+++ b/modules/flowable-engine-common-api/src/main/java/org/flowable/common/engine/api/lock/LockManager.java
@@ -10,7 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.flowable.common.engine.impl.lock;
+package org.flowable.common.engine.api.lock;
import java.time.Duration;
import java.util.function.Supplier;
diff --git a/modules/flowable-engine-common/pom.xml b/modules/flowable-engine-common/pom.xml
index 3d30c94248b..f85c95daa3a 100644
--- a/modules/flowable-engine-common/pom.xml
+++ b/modules/flowable-engine-common/pom.xml
@@ -156,11 +156,6 @@
com.fasterxml.jackson.core
jackson-databind
-
- org.liquibase
- liquibase-core
- true
-
com.fasterxml.uuid
java-uuid-generator
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractBuildableEngineConfiguration.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractBuildableEngineConfiguration.java
new file mode 100644
index 00000000000..28038c78ec3
--- /dev/null
+++ b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractBuildableEngineConfiguration.java
@@ -0,0 +1,64 @@
+/* Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.flowable.common.engine.impl;
+
+import java.util.function.Consumer;
+
+import org.flowable.common.engine.api.Engine;
+
+/**
+ * @author Filip Hrisafov
+ */
+public abstract class AbstractBuildableEngineConfiguration extends AbstractEngineConfiguration {
+
+ protected boolean runPostEngineBuildConsumer = true;
+ protected Consumer postEngineBuildConsumer;
+
+ public E buildEngine() {
+ init();
+ initPostEngineBuildConsumer();
+ E engine = createEngine();
+ if (runPostEngineBuildConsumer) {
+ postEngineBuildConsumer.accept(engine);
+ }
+ return engine;
+ }
+
+ protected abstract E createEngine();
+
+ protected abstract void init();
+
+ protected void initPostEngineBuildConsumer() {
+ if (this.postEngineBuildConsumer == null) {
+ this.postEngineBuildConsumer = createPostEngineBuildConsumer();
+ }
+ }
+
+ protected abstract Consumer createPostEngineBuildConsumer();
+
+ public boolean isRunPostEngineBuildConsumer() {
+ return runPostEngineBuildConsumer;
+ }
+
+ public void setRunPostEngineBuildConsumer(boolean runPostEngineBuildConsumer) {
+ this.runPostEngineBuildConsumer = runPostEngineBuildConsumer;
+ }
+
+ public Consumer getPostEngineBuildConsumer() {
+ return postEngineBuildConsumer;
+ }
+
+ public void setPostEngineBuildConsumer(Consumer postEngineBuildConsumer) {
+ this.postEngineBuildConsumer = postEngineBuildConsumer;
+ }
+}
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractEngineConfiguration.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractEngineConfiguration.java
index 3fde91d9bda..ee0de1306c4 100755
--- a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractEngineConfiguration.java
+++ b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractEngineConfiguration.java
@@ -73,6 +73,7 @@
import org.flowable.common.engine.api.delegate.event.FlowableEventDispatcher;
import org.flowable.common.engine.api.delegate.event.FlowableEventListener;
import org.flowable.common.engine.api.engine.EngineLifecycleListener;
+import org.flowable.common.engine.api.lock.LockManager;
import org.flowable.common.engine.impl.agenda.AgendaOperationExecutionListener;
import org.flowable.common.engine.impl.agenda.AgendaOperationRunner;
import org.flowable.common.engine.impl.cfg.CommandExecutorImpl;
@@ -86,6 +87,7 @@
import org.flowable.common.engine.impl.db.MybatisTypeAliasConfigurator;
import org.flowable.common.engine.impl.db.MybatisTypeHandlerConfigurator;
import org.flowable.common.engine.impl.db.SchemaManager;
+import org.flowable.common.engine.impl.db.SchemaOperationsEngineBuild;
import org.flowable.common.engine.impl.event.EventDispatchAction;
import org.flowable.common.engine.impl.event.FlowableEventDispatcherImpl;
import org.flowable.common.engine.impl.interceptor.Command;
@@ -99,7 +101,6 @@
import org.flowable.common.engine.impl.interceptor.LogInterceptor;
import org.flowable.common.engine.impl.interceptor.SessionFactory;
import org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor;
-import org.flowable.common.engine.impl.lock.LockManager;
import org.flowable.common.engine.impl.lock.LockManagerImpl;
import org.flowable.common.engine.impl.logging.LoggingListener;
import org.flowable.common.engine.impl.logging.LoggingSession;
@@ -172,6 +173,7 @@ public abstract class AbstractEngineConfiguration {
protected int jdbcPingConnectionNotUsedFor;
protected int jdbcDefaultTransactionIsolationLevel;
protected DataSource dataSource;
+ protected Map additionalSchemaManagers;
protected SchemaManager commonSchemaManager;
protected SchemaManager schemaManager;
protected Command schemaManagementCmd;
@@ -431,7 +433,7 @@ public static Properties getDefaultDatabaseTypeMappings() {
* Define a max length for storing String variable types in the database. Mainly used for the Oracle NVARCHAR2 limit of 2000 characters
*/
protected int maxLengthStringVariableType = -1;
-
+
protected void initEngineConfigurations() {
addEngineConfiguration(getEngineCfgKey(), getEngineScopeType(), this);
}
@@ -548,8 +550,22 @@ public void initSchemaManager() {
if (this.commonSchemaManager == null) {
this.commonSchemaManager = new CommonDbSchemaManager();
}
+
+ if (this.schemaManager == null) {
+ this.schemaManager = createEngineSchemaManager();
+ }
+
}
+ protected abstract SchemaManager createEngineSchemaManager();
+
+ public void initSchemaManagementCommand() {
+ if (schemaManagementCmd == null) {
+ if (usingRelationalDatabase && databaseSchemaUpdate != null) {
+ this.schemaManagementCmd = new SchemaOperationsEngineBuild(getEngineScopeType());
+ }
+ }
+ }
// session factories ////////////////////////////////////////////////////////
public void addSessionFactory(SessionFactory sessionFactory) {
@@ -1217,6 +1233,18 @@ public AbstractEngineConfiguration setSchemaManager(SchemaManager schemaManager)
return this;
}
+ public AbstractEngineConfiguration addAdditionalSchemaManager(SchemaManager schemaManager) {
+ if (this.additionalSchemaManagers == null) {
+ this.additionalSchemaManagers = new HashMap<>();
+ }
+ this.additionalSchemaManagers.put(schemaManager.getContext(), schemaManager);
+ return this;
+ }
+
+ public Map getAdditionalSchemaManagers() {
+ return additionalSchemaManagers;
+ }
+
public SchemaManager getCommonSchemaManager() {
return commonSchemaManager;
}
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractEngineConfigurator.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractEngineConfigurator.java
index 769626b46ae..a0ec4df84a8 100644
--- a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractEngineConfigurator.java
+++ b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/AbstractEngineConfigurator.java
@@ -25,7 +25,9 @@
import org.apache.ibatis.type.TypeAliasRegistry;
import org.apache.ibatis.type.TypeHandlerRegistry;
+import org.flowable.common.engine.api.Engine;
import org.flowable.common.engine.api.FlowableException;
+import org.flowable.common.engine.api.engine.EngineLifecycleListener;
import org.flowable.common.engine.impl.db.MybatisTypeAliasConfigurator;
import org.flowable.common.engine.impl.db.MybatisTypeHandlerConfigurator;
import org.flowable.common.engine.impl.persistence.entity.Entity;
@@ -40,9 +42,10 @@
*
* @author Joram Barrez
*/
-public abstract class AbstractEngineConfigurator implements EngineConfigurator {
+public abstract class AbstractEngineConfigurator implements EngineConfigurator {
protected boolean enableMybatisXmlMappingValidation;
+ protected E buildEngine;
@Override
public void beforeInit(AbstractEngineConfiguration engineConfiguration) {
@@ -204,6 +207,30 @@ protected List getMybatisTypeHandlers() {
return null;
}
+ protected synchronized E initEngine() {
+ this.buildEngine = buildEngine();
+ return buildEngine;
+ }
+
+ protected abstract E buildEngine();
+
+ protected void initialiseCommonProperties(AbstractEngineConfiguration engineConfiguration, AbstractBuildableEngineConfiguration targetEngineConfiguration) {
+ initialiseCommonProperties(engineConfiguration, (AbstractEngineConfiguration) targetEngineConfiguration);
+ targetEngineConfiguration.setRunPostEngineBuildConsumer(false);
+ engineConfiguration.addEngineLifecycleListener(new EngineLifecycleListener() {
+
+ @Override
+ public void onEngineBuilt(Engine engine) {
+ targetEngineConfiguration.getPostEngineBuildConsumer().accept(buildEngine);
+ }
+
+ @Override
+ public void onEngineClosed(Engine engine) {
+ // nothing to do
+ }
+ });
+ }
+
protected void initialiseCommonProperties(AbstractEngineConfiguration engineConfiguration, AbstractEngineConfiguration targetEngineConfiguration) {
initEngineConfigurations(engineConfiguration, targetEngineConfiguration);
initEventRegistryEventConsumers(engineConfiguration, targetEngineConfiguration);
@@ -221,6 +248,7 @@ protected void initialiseCommonProperties(AbstractEngineConfiguration engineConf
initClock(engineConfiguration, targetEngineConfiguration);
initObjectMapper(engineConfiguration, targetEngineConfiguration);
initVariableTypes(engineConfiguration, targetEngineConfiguration);
+ initSchemaManager(engineConfiguration, targetEngineConfiguration);
}
protected void initEngineConfigurations(AbstractEngineConfiguration engineConfiguration, AbstractEngineConfiguration targetEngineConfiguration) {
@@ -305,6 +333,12 @@ protected void initVariableTypes(AbstractEngineConfiguration engineConfiguration
}
}
+ protected void initSchemaManager(AbstractEngineConfiguration engineConfiguration, AbstractEngineConfiguration targetEngineConfiguration) {
+ // We are going to disable the Schema management in the target engine as the lead engine is the one that is going to handle the schema generation
+ targetEngineConfiguration.setDatabaseSchemaUpdate(null);
+ engineConfiguration.addAdditionalSchemaManager(targetEngineConfiguration.createEngineSchemaManager());
+ }
+
protected abstract List> getEntityInsertionOrder();
protected abstract List> getEntityDeletionOrder();
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/FlowableVersions.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/FlowableVersions.java
index 99e57d1463d..d09690de2d0 100644
--- a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/FlowableVersions.java
+++ b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/FlowableVersions.java
@@ -23,7 +23,7 @@
*/
public class FlowableVersions {
- public static final String CURRENT_VERSION = "7.1.0.0"; // Note the extra .x at the end. To cater for snapshot releases with different database changes
+ public static final String CURRENT_VERSION = "7.1.0.1"; // Note the extra .x at the end. To cater for snapshot releases with different database changes
public static final List FLOWABLE_VERSIONS = new ArrayList<>();
@@ -143,6 +143,7 @@ public class FlowableVersions {
FLOWABLE_VERSIONS.add(new FlowableVersion("7.0.0.0"));
FLOWABLE_VERSIONS.add(new FlowableVersion("7.0.1.0"));
FLOWABLE_VERSIONS.add(new FlowableVersion("7.0.1.1"));
+ FLOWABLE_VERSIONS.add(new FlowableVersion("7.1.0.0"));
/* Current */
FLOWABLE_VERSIONS.add(new FlowableVersion(CURRENT_VERSION));
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/CommonDbSchemaManager.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/CommonDbSchemaManager.java
index 68953bd1a45..a1657990413 100644
--- a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/CommonDbSchemaManager.java
+++ b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/CommonDbSchemaManager.java
@@ -22,7 +22,7 @@ public class CommonDbSchemaManager extends ServiceSqlScriptBasedDbSchemaManager
private static final String SCHEMA_COMPONENT = "common";
public CommonDbSchemaManager() {
- super(PROPERTY_TABLE, SCHEMA_COMPONENT, null, COMMON_VERSION_PROPERTY);
+ super(PROPERTY_TABLE, SCHEMA_COMPONENT, COMMON_VERSION_PROPERTY);
}
@Override
@@ -30,4 +30,14 @@ protected String getResourcesRootDirectory() {
return "org/flowable/common/db/";
}
+ @Override
+ public void schemaCheckVersion() {
+ // Schema check is ignored for the common DB
+ }
+
+ @Override
+ public String getContext() {
+ return SCHEMA_COMPONENT;
+ }
+
}
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/EngineDatabaseConfiguration.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/EngineDatabaseConfiguration.java
deleted file mode 100644
index 32413101935..00000000000
--- a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/EngineDatabaseConfiguration.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.flowable.common.engine.impl.db;
-
-import javax.sql.DataSource;
-
-import org.flowable.common.engine.impl.AbstractEngineConfiguration;
-
-/**
- * @author Filip Hrisafov
- */
-public class EngineDatabaseConfiguration implements LiquibaseDatabaseConfiguration {
-
- protected final AbstractEngineConfiguration engineConfiguration;
-
- public EngineDatabaseConfiguration(AbstractEngineConfiguration engineConfiguration) {
- this.engineConfiguration = engineConfiguration;
- }
-
- @Override
- public DataSource getDataSource() {
- return engineConfiguration.getDataSource();
- }
-
- @Override
- public String getDatabaseSchema() {
- return engineConfiguration.getDatabaseSchema();
- }
-
- @Override
- public String getDatabaseCatalog() {
- return engineConfiguration.getDatabaseCatalog();
- }
-}
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/EngineSqlScriptBasedDbSchemaManager.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/EngineSqlScriptBasedDbSchemaManager.java
new file mode 100644
index 00000000000..3e51d5a8d95
--- /dev/null
+++ b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/EngineSqlScriptBasedDbSchemaManager.java
@@ -0,0 +1,251 @@
+/* Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.flowable.common.engine.impl.db;
+
+import java.util.List;
+
+import org.flowable.common.engine.api.FlowableException;
+import org.flowable.common.engine.api.FlowableWrongDbException;
+import org.flowable.common.engine.api.lock.LockManager;
+import org.flowable.common.engine.impl.AbstractEngineConfiguration;
+import org.flowable.common.engine.impl.FlowableVersions;
+import org.flowable.common.engine.impl.persistence.entity.PropertyEntity;
+import org.flowable.common.engine.impl.persistence.entity.PropertyEntityImpl;
+
+public abstract class EngineSqlScriptBasedDbSchemaManager extends AbstractSqlScriptBasedDbSchemaManager {
+
+ protected final String context;
+
+ protected EngineSqlScriptBasedDbSchemaManager(String context) {
+ this.context = context;
+ }
+
+ protected abstract String getEngineVersion();
+
+ protected abstract String getSchemaVersionPropertyName();
+
+ protected abstract String getDbSchemaLockName();
+
+ protected abstract String getEngineTableName();
+
+ protected abstract String getChangeLogTableName();
+
+ protected abstract String getChangeLogTablePrefixName();
+
+ protected abstract String getDbVersionForChangelogVersion(String changeLogVersion);
+
+ protected abstract AbstractEngineConfiguration getEngineConfiguration();
+
+ @Override
+ public void schemaCheckVersion() {
+ try {
+ String dbVersion = getDbVersion();
+ String currentVersion = getEngineVersion();
+ if (!currentVersion.equals(dbVersion)) {
+ throw new FlowableWrongDbException(currentVersion, dbVersion);
+ }
+
+ String errorMessage = null;
+ if (!isEngineTablePresent()) {
+ errorMessage = addMissingComponent(errorMessage, context);
+ }
+
+ if (errorMessage != null) {
+ throw new FlowableException("Flowable database problem: " + errorMessage);
+ }
+
+ } catch (Exception e) {
+ if (isMissingTablesException(e)) {
+ throw new FlowableException(
+ "No flowable tables in DB. Set property \"databaseSchemaUpdate\" \"true\" or value=\"create-drop\" (use create-drop for testing only!) for automatic schema creation",
+ e);
+ } else {
+ if (e instanceof RuntimeException) {
+ throw (RuntimeException) e;
+ } else {
+ throw new FlowableException("couldn't get " + context + " db schema version", e);
+ }
+ }
+ }
+
+ logger.debug("flowable {} db schema check successful", context);
+ }
+
+ @Override
+ public void schemaCreate() {
+
+ AbstractEngineConfiguration engineConfiguration = getEngineConfiguration();
+ if (engineConfiguration.isUseLockForDatabaseSchemaUpdate()) {
+ LockManager lockManager = engineConfiguration.getLockManager(getDbSchemaLockName());
+ lockManager.waitForLockRunAndRelease(engineConfiguration.getSchemaLockWaitTime(), () -> {
+ schemaCreateInLock();
+ return null;
+ });
+ } else {
+ schemaCreateInLock();
+ }
+ }
+
+ protected void schemaCreateInLock() {
+ if (isEngineTablePresent()) {
+ String dbVersion = getDbVersion();
+ String engineVersion = getEngineVersion();
+ if (!engineVersion.equals(dbVersion)) {
+ throw new FlowableWrongDbException(engineVersion, dbVersion);
+ }
+ } else {
+ dbSchemaCreateEngine();
+ }
+ }
+
+ protected void dbSchemaCreateEngine() {
+ executeMandatorySchemaResource("create", context);
+ }
+
+ @Override
+ public void schemaDrop() {
+
+ try {
+ executeMandatorySchemaResource("drop", context);
+
+ } catch (Exception e) {
+ logger.info("Error dropping {} tables", context, e);
+ }
+
+ }
+
+ @Override
+ public String schemaUpdate() {
+
+ PropertyEntity dbVersionProperty = null;
+ String feedback = null;
+ boolean isUpgradeNeeded = false;
+ int matchingVersionIndex = -1;
+
+ DbSqlSession dbSqlSession = getDbSqlSession();
+ boolean isEngineTablePresent = isEngineTablePresent();
+
+ ChangeLogVersion changeLogVersion = null;
+ String dbVersion = null;
+ if (isEngineTablePresent) {
+ dbVersionProperty = dbSqlSession.selectById(PropertyEntityImpl.class, getSchemaVersionPropertyName());
+ if (dbVersionProperty != null) {
+ dbVersion = dbVersionProperty.getValue();
+ } else {
+ changeLogVersion = getChangeLogVersion();
+ dbVersion = changeLogVersion.dbVersion();
+ }
+ }
+
+ AbstractEngineConfiguration engineConfiguration = getEngineConfiguration();
+ LockManager lockManager;
+ if (engineConfiguration.isUseLockForDatabaseSchemaUpdate()) {
+ lockManager = engineConfiguration.getLockManager(getDbSchemaLockName());
+ lockManager.waitForLock(engineConfiguration.getSchemaLockWaitTime());
+ } else {
+ lockManager = null;
+ }
+
+ try {
+ if (isEngineTablePresent) {
+ matchingVersionIndex = FlowableVersions.getFlowableVersionIndexForDbVersion(dbVersion);
+ isUpgradeNeeded = (matchingVersionIndex != (FlowableVersions.FLOWABLE_VERSIONS.size() - 1));
+ }
+
+ if (isUpgradeNeeded) {
+ // Engine upgrade
+ dbSchemaUpgrade(context, matchingVersionIndex, dbVersion);
+ dbSchemaUpgraded(changeLogVersion);
+
+ feedback = "upgraded Flowable from " + dbVersion + " to " + getEngineVersion();
+
+ } else if (!isEngineTablePresent) {
+ dbSchemaCreateEngine();
+ }
+
+ return feedback;
+
+ } finally {
+ if (lockManager != null) {
+ lockManager.releaseLock();
+ }
+ }
+ }
+
+ @Override
+ public String getContext() {
+ return context;
+ }
+
+ protected void dbSchemaUpgraded(ChangeLogVersion changeLogVersion) {
+
+ }
+
+ public boolean isEngineTablePresent() {
+ return isTablePresent(getEngineTableName());
+ }
+
+ protected String addMissingComponent(String missingComponents, String component) {
+ if (missingComponents == null) {
+ return "Tables missing for component(s) " + component;
+ }
+ return missingComponents + ", " + component;
+ }
+
+ protected String getDbVersion() {
+ DbSqlSession dbSqlSession = getDbSqlSession();
+ String selectSchemaVersionStatement = dbSqlSession.getDbSqlSessionFactory()
+ .mapStatement("org.flowable.common.engine.impl.persistence.entity.PropertyEntityImpl.selectPropertyValue");
+ return dbSqlSession.getSqlSession().selectOne(selectSchemaVersionStatement, getSchemaVersionPropertyName());
+ }
+
+ protected ChangeLogVersion getChangeLogVersion() {
+ String changeLogTableName = getChangeLogTableName();
+ if (changeLogTableName != null && isTablePresent(changeLogTableName)) {
+ DbSqlSession dbSqlSession = getDbSqlSession();
+ String selectChangeLogVersionsStatement = dbSqlSession.getDbSqlSessionFactory().mapStatement("org.flowable.common.engine.impl.persistence.change.ChangeLog.selectFlowableChangeLogVersions");
+ List changeLogIds = dbSqlSession.getSqlSession().selectList(selectChangeLogVersionsStatement, getChangeLogTablePrefixName());
+ if (changeLogIds != null && !changeLogIds.isEmpty()) {
+ String changeLogVersion = changeLogIds.get(changeLogIds.size() - 1);
+ return new ChangeLogVersion(changeLogVersion, getDbVersionForChangelogVersion(changeLogVersion));
+ }
+ }
+
+ return new ChangeLogVersion(null, getDbVersionForChangelogVersion(null));
+ }
+
+ protected boolean isMissingTablesException(Exception e) {
+ String exceptionMessage = e.getMessage();
+ if (e.getMessage() != null) {
+ // Matches message returned from H2
+ if ((exceptionMessage.contains("Table")) && (exceptionMessage.contains("not found"))) {
+ return true;
+ }
+
+ // Message returned from MySQL and Oracle
+ if ((exceptionMessage.contains("Table") || exceptionMessage.contains("table")) && (exceptionMessage.contains("doesn't exist"))) {
+ return true;
+ }
+
+ // Message returned from Postgres
+ if ((exceptionMessage.contains("relation") || exceptionMessage.contains("table")) && (exceptionMessage.contains("does not exist"))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public record ChangeLogVersion(String version, String dbVersion) {
+ }
+
+}
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/LiquibaseBasedSchemaManager.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/LiquibaseBasedSchemaManager.java
deleted file mode 100644
index 68654fbd9a2..00000000000
--- a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/LiquibaseBasedSchemaManager.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.flowable.common.engine.impl.db;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Level;
-
-import org.apache.commons.lang3.StringUtils;
-import org.flowable.common.engine.api.FlowableException;
-import org.flowable.common.engine.impl.AbstractEngineConfiguration;
-import org.flowable.common.engine.impl.context.Context;
-import org.flowable.common.engine.impl.interceptor.CommandContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.util.ClassUtils;
-
-import liquibase.Liquibase;
-import liquibase.Scope;
-import liquibase.database.Database;
-import liquibase.database.DatabaseConnection;
-import liquibase.database.DatabaseFactory;
-import liquibase.database.jvm.JdbcConnection;
-import liquibase.exception.DatabaseException;
-import liquibase.resource.ClassLoaderResourceAccessor;
-import liquibase.ui.LoggerUIService;
-
-/**
- * @author Filip Hrisafov
- */
-public abstract class LiquibaseBasedSchemaManager implements SchemaManager {
-
- protected static final Map LIQUIBASE_SCOPE_VALUES = new HashMap<>();
-
- static {
- LoggerUIService uiService = new LoggerUIService();
- uiService.setStandardLogLevel(Level.FINE);
- LIQUIBASE_SCOPE_VALUES.put(Scope.Attr.ui.name(), uiService);
- }
-
- protected final Logger logger = LoggerFactory.getLogger(getClass());
-
- protected final String context;
- protected final String changeLogFile;
- protected final String changeLogPrefix;
-
- public LiquibaseBasedSchemaManager(String context, String changeLogFile, String changeLogPrefix) {
- this.context = context;
- this.changeLogFile = changeLogFile;
- this.changeLogPrefix = changeLogPrefix;
- }
-
- public void initSchema(String databaseSchemaUpdate) {
- try {
- if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_CREATE.equals(databaseSchemaUpdate)) {
- runForLiquibase(this::schemaCreate);
- }
- else if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_CREATE_DROP.equals(databaseSchemaUpdate)) {
- runForLiquibase(this::schemaCreate);
-
- } else if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_DROP_CREATE.equals(databaseSchemaUpdate)) {
- runForLiquibase(() -> {
- schemaDrop();
- schemaCreate();
- });
-
- } else if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_TRUE.equals(databaseSchemaUpdate)) {
- runForLiquibase(this::schemaUpdate);
-
- } else if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_FALSE.equals(databaseSchemaUpdate)) {
- runForLiquibase(this::schemaCheckVersion);
-
- }
- } catch (Exception e) {
- throw new FlowableException("Error initialising " + context + " data model", e);
- }
- }
-
- protected void runForLiquibase(Runnable runnable) throws Exception {
- Scope.child(LIQUIBASE_SCOPE_VALUES, runnable::run);
- }
-
- @Override
- public void schemaCreate() {
- Liquibase liquibase = null;
- try {
- liquibase = createLiquibaseInstance(getDatabaseConfiguration());
- liquibase.update(context);
- } catch (Exception e) {
- throw new FlowableException("Error creating " + context + " engine tables", e);
- } finally {
- closeDatabase(liquibase);
- }
- }
-
- @Override
- public void schemaDrop() {
- Liquibase liquibase = null;
- try {
- liquibase = createLiquibaseInstance(getDatabaseConfiguration());
- liquibase.dropAll();
- } catch (Exception e) {
- throw new FlowableException("Error dropping " + context + " engine tables", e);
- } finally {
- closeDatabase(liquibase);
- }
- }
-
- @Override
- public String schemaUpdate() {
- Liquibase liquibase = null;
- try {
- liquibase = createLiquibaseInstance(getDatabaseConfiguration());
- liquibase.update(context);
- } catch (Exception e) {
- throw new FlowableException("Error updating " + context + " engine tables", e);
- } finally {
- closeDatabase(liquibase);
- }
- return null;
- }
-
- @Override
- public void schemaCheckVersion() {
- Liquibase liquibase = null;
- try {
- liquibase = createLiquibaseInstance(getDatabaseConfiguration());
- liquibase.validate();
- } catch (Exception e) {
- throw new FlowableException("Error validating " + context + " engine schema", e);
- } finally {
- closeDatabase(liquibase);
- }
- }
-
- protected abstract LiquibaseDatabaseConfiguration getDatabaseConfiguration();
-
- protected Liquibase createLiquibaseInstance(LiquibaseDatabaseConfiguration databaseConfiguration) throws SQLException {
- Connection jdbcConnection = null;
- boolean closeConnection = false;
- try {
- CommandContext commandContext = Context.getCommandContext();
- if (commandContext == null) {
- jdbcConnection = databaseConfiguration.getDataSource().getConnection();
- closeConnection = true;
- } else {
- jdbcConnection = commandContext.getSession(DbSqlSession.class).getSqlSession().getConnection();
- }
-
- // A commit is needed here, because one of the things that Liquibase does when acquiring its lock
- // is doing a rollback, which removes all changes done so far.
- // For most databases, this is not a problem as DDL statements are not transactional.
- // However for some (e.g. sql server), this would remove all previous statements, which is not wanted,
- // hence the extra commit here.
- if (!jdbcConnection.getAutoCommit()) {
- jdbcConnection.commit();
- }
-
- DatabaseConnection connection = new JdbcConnection(jdbcConnection);
- Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection);
- database.setDatabaseChangeLogTableName(changeLogPrefix + database.getDatabaseChangeLogTableName());
- database.setDatabaseChangeLogLockTableName(changeLogPrefix + database.getDatabaseChangeLogLockTableName());
-
- String databaseSchema = databaseConfiguration.getDatabaseSchema();
- if (StringUtils.isNotEmpty(databaseSchema)) {
- database.setDefaultSchemaName(databaseSchema);
- database.setLiquibaseSchemaName(databaseSchema);
- }
-
- String databaseCatalog = databaseConfiguration.getDatabaseCatalog();
- if (StringUtils.isNotEmpty(databaseCatalog)) {
- database.setDefaultCatalogName(databaseCatalog);
- database.setLiquibaseCatalogName(databaseCatalog);
- }
-
- return new Liquibase(changeLogFile, new ClassLoaderResourceAccessor(), database);
-
- } catch (Exception e) {
- // We only close the connection if an exception occurred, otherwise the Liquibase instance cannot be used
- if (jdbcConnection != null && closeConnection) {
- jdbcConnection.close();
- }
- throw new FlowableException("Error creating " + context + " liquibase instance", e);
- }
- }
-
- protected void closeDatabase(Liquibase liquibase) {
- if (liquibase != null) {
- Database database = liquibase.getDatabase();
- if (database != null) {
- // do not close the shared connection if a command context is currently active
- if (Context.getCommandContext() == null) {
- try {
- database.close();
- } catch (DatabaseException e) {
- logger.warn("Error closing database for {}", context, e);
- }
- }
- }
- }
- }
-
-}
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/LiquibaseDatabaseConfiguration.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/LiquibaseDatabaseConfiguration.java
deleted file mode 100644
index 36e670b033b..00000000000
--- a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/LiquibaseDatabaseConfiguration.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.flowable.common.engine.impl.db;
-
-import javax.sql.DataSource;
-
-/**
- * A configuration that is used by the {@link LiquibaseBasedSchemaManager}
- * to ease the access to certain database properties.
- *
- * @author Filip Hrisafov
- */
-public interface LiquibaseDatabaseConfiguration {
-
- DataSource getDataSource();
-
- String getDatabaseSchema();
-
- String getDatabaseCatalog();
-}
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/SchemaManager.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/SchemaManager.java
index 09e90e5695e..8ef849c21c4 100644
--- a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/SchemaManager.java
+++ b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/SchemaManager.java
@@ -29,5 +29,7 @@ default String schemaUpdate(String engineDbVersion) {
}
void schemaCheckVersion();
+
+ String getContext();
}
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/SchemaOperationsEngineBuild.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/SchemaOperationsEngineBuild.java
new file mode 100644
index 00000000000..a7210015dbd
--- /dev/null
+++ b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/SchemaOperationsEngineBuild.java
@@ -0,0 +1,100 @@
+/* Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.flowable.common.engine.impl.db;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+
+import org.flowable.common.engine.api.FlowableIllegalArgumentException;
+import org.flowable.common.engine.impl.AbstractEngineConfiguration;
+import org.flowable.common.engine.impl.interceptor.Command;
+import org.flowable.common.engine.impl.interceptor.CommandContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author Filip Hrisafov
+ */
+public class SchemaOperationsEngineBuild implements Command {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(SchemaOperationsEngineBuild.class);
+
+ protected final String engineScopeType;
+ protected final String schemaOperation;
+
+ public SchemaOperationsEngineBuild(String engineScopeType) {
+ this(engineScopeType, null);
+ }
+
+ public SchemaOperationsEngineBuild(String engineScopeType, String schemaOperation) {
+ this.engineScopeType = engineScopeType;
+ this.schemaOperation = schemaOperation;
+ }
+
+ @Override
+ public Void execute(CommandContext commandContext) {
+
+ AbstractEngineConfiguration engineConfiguration = commandContext.getEngineConfigurations()
+ .get(engineScopeType);
+ if (engineConfiguration == null) {
+ throw new FlowableIllegalArgumentException("There is no engine configuration for scope " + engineScopeType);
+ }
+
+ String databaseSchemaUpdate = schemaOperation == null ? engineConfiguration.getDatabaseSchemaUpdate() : schemaOperation;
+ List schemaManagers = new ArrayList<>();
+ schemaManagers.add(engineConfiguration.getCommonSchemaManager());
+ schemaManagers.add(engineConfiguration.getSchemaManager());
+
+ Map additionalSchemaManagers = engineConfiguration.getAdditionalSchemaManagers();
+
+ if (additionalSchemaManagers != null) {
+ schemaManagers.addAll(additionalSchemaManagers.values());
+ }
+
+ executeSchemaUpdate(schemaManagers, databaseSchemaUpdate);
+
+ return null;
+ }
+
+ protected void executeSchemaUpdate(List schemaManagers, String databaseSchemaUpdate) {
+ LOGGER.debug("Executing schema management with setting {} from engine {}", databaseSchemaUpdate, engineScopeType);
+
+ if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_DROP_CREATE.equals(databaseSchemaUpdate)) {
+ // The drop is executed in the reverse order
+ ListIterator listIterator = schemaManagers.listIterator(schemaManagers.size());
+ while (listIterator.hasPrevious()) {
+ SchemaManager schemaManager = listIterator.previous();
+ try {
+ schemaManager.schemaDrop();
+ } catch (RuntimeException e) {
+ // ignore
+ }
+ }
+ }
+
+ if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_CREATE_DROP.equals(databaseSchemaUpdate)
+ || AbstractEngineConfiguration.DB_SCHEMA_UPDATE_DROP_CREATE.equals(databaseSchemaUpdate)
+ || AbstractEngineConfiguration.DB_SCHEMA_UPDATE_CREATE.equals(databaseSchemaUpdate)) {
+ schemaManagers.forEach(SchemaManager::schemaCreate);
+
+ } else if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_FALSE.equals(databaseSchemaUpdate)) {
+ schemaManagers.forEach(SchemaManager::schemaCheckVersion);
+
+ } else if (AbstractEngineConfiguration.DB_SCHEMA_UPDATE_TRUE.equals(databaseSchemaUpdate)) {
+ schemaManagers.forEach(SchemaManager::schemaUpdate);
+ }
+
+ }
+}
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/SchemaOperationsEngineDropDbCmd.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/SchemaOperationsEngineDropDbCmd.java
new file mode 100644
index 00000000000..17865d2ca7d
--- /dev/null
+++ b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/SchemaOperationsEngineDropDbCmd.java
@@ -0,0 +1,69 @@
+/* Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.flowable.common.engine.impl.db;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+
+import org.flowable.common.engine.api.FlowableIllegalArgumentException;
+import org.flowable.common.engine.impl.AbstractEngineConfiguration;
+import org.flowable.common.engine.impl.interceptor.Command;
+import org.flowable.common.engine.impl.interceptor.CommandContext;
+
+/**
+ * @author Filip Hrisafov
+ */
+public class SchemaOperationsEngineDropDbCmd implements Command {
+
+ protected final String engineScopeType;
+
+ public SchemaOperationsEngineDropDbCmd(String engineScopeType) {
+ this.engineScopeType = engineScopeType;
+ }
+
+ @Override
+ public Void execute(CommandContext commandContext) {
+
+ AbstractEngineConfiguration engineConfiguration = commandContext.getEngineConfigurations()
+ .get(engineScopeType);
+ if (engineConfiguration == null) {
+ throw new FlowableIllegalArgumentException("There is no engine configuration for scope " + engineScopeType);
+ }
+
+ List schemaManagers = new ArrayList<>();
+ schemaManagers.add(engineConfiguration.getCommonSchemaManager());
+ schemaManagers.add(engineConfiguration.getSchemaManager());
+
+ Map additionalSchemaManagers = engineConfiguration.getAdditionalSchemaManagers();
+
+ if (additionalSchemaManagers != null) {
+ schemaManagers.addAll(additionalSchemaManagers.values());
+ }
+
+ // The drop is executed in the reverse order
+ ListIterator listIterator = schemaManagers.listIterator(schemaManagers.size());
+ while (listIterator.hasPrevious()) {
+ SchemaManager schemaManager = listIterator.previous();
+ try {
+ schemaManager.schemaDrop();
+ } catch (RuntimeException e) {
+ // ignore
+ }
+ }
+
+ return null;
+ }
+
+}
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/ServiceSqlScriptBasedDbSchemaManager.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/ServiceSqlScriptBasedDbSchemaManager.java
index 2bab240ec0c..82054e2156c 100644
--- a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/ServiceSqlScriptBasedDbSchemaManager.java
+++ b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/ServiceSqlScriptBasedDbSchemaManager.java
@@ -23,13 +23,11 @@ public abstract class ServiceSqlScriptBasedDbSchemaManager extends AbstractSqlSc
protected String table;
protected String schemaComponent;
- protected String schemaComponentHistory;
protected String schemaVersionProperty;
- public ServiceSqlScriptBasedDbSchemaManager(String table, String schemaComponent, String schemaComponentHistory, String schemaVersionProperty) {
+ public ServiceSqlScriptBasedDbSchemaManager(String table, String schemaComponent, String schemaVersionProperty) {
this.table = table;
this.schemaComponent = schemaComponent;
- this.schemaComponentHistory = schemaComponentHistory;
this.schemaVersionProperty = schemaVersionProperty;
}
@@ -47,16 +45,14 @@ public void schemaCreate() {
protected void internalDbSchemaCreate() {
executeMandatorySchemaResource("create", schemaComponent);
- if (isHistoryUsed()) {
- executeMandatorySchemaResource("create", schemaComponentHistory);
- }
}
@Override
public void schemaDrop() {
- executeMandatorySchemaResource("drop", schemaComponent);
- if (isHistoryUsed()) {
- executeMandatorySchemaResource("drop", schemaComponentHistory);
+ try {
+ executeMandatorySchemaResource("drop", schemaComponent);
+ } catch (Exception e) {
+ logger.info("Error dropping {} tables", schemaComponent, e);
}
}
@@ -81,9 +77,6 @@ public String schemaUpdate(String engineDbVersion) {
boolean isUpgradeNeeded = (matchingVersionIndex != (FlowableVersions.FLOWABLE_VERSIONS.size() - 1));
if (isUpgradeNeeded) {
dbSchemaUpgrade(schemaComponent, matchingVersionIndex, engineDbVersion);
- if (isHistoryUsed()) {
- dbSchemaUpgrade(schemaComponentHistory, matchingVersionIndex, engineDbVersion);
- }
}
feedback = "upgraded from " + compareWithVersion + " to " + FlowableVersions.CURRENT_VERSION;
@@ -104,10 +97,6 @@ public void schemaCheckVersion() {
protected boolean isUpdateNeeded() {
return isTablePresent(table);
}
-
- protected boolean isHistoryUsed() {
- return getDbSqlSession().getDbSqlSessionFactory().isDbHistoryUsed() && schemaComponentHistory != null;
- }
protected String getSchemaVersion() {
if (schemaVersionProperty == null) {
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/lock/LockManagerImpl.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/lock/LockManagerImpl.java
index 782863d3e1b..361e7e03f5c 100644
--- a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/lock/LockManagerImpl.java
+++ b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/lock/LockManagerImpl.java
@@ -19,6 +19,7 @@
import org.apache.commons.lang3.StringUtils;
import org.flowable.common.engine.api.FlowableException;
import org.flowable.common.engine.api.FlowableOptimisticLockingException;
+import org.flowable.common.engine.api.lock.LockManager;
import org.flowable.common.engine.impl.cfg.TransactionPropagation;
import org.flowable.common.engine.impl.cmd.GetLockValueCmd;
import org.flowable.common.engine.impl.cmd.LockCmd;
diff --git a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/test/EnsureCleanDbUtils.java b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/test/EnsureCleanDbUtils.java
index 602fb1f0c69..8cfc39a226c 100644
--- a/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/test/EnsureCleanDbUtils.java
+++ b/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/test/EnsureCleanDbUtils.java
@@ -101,9 +101,15 @@ public static void assertAndEnsureCleanDb(String testName, Logger logger, Abstra
logger.info("dropping and recreating db");
if (dropAndRecreateDbCommand != null) {
- CommandExecutor commandExecutor = engineConfiguration.getCommandExecutor();
- CommandConfig config = new CommandConfig().transactionNotSupported();
- commandExecutor.execute(config, dropAndRecreateDbCommand);
+ String originalDatabaseSchemaUpdate = engineConfiguration.getDatabaseSchemaUpdate();
+ try {
+ engineConfiguration.setDatabaseSchemaUpdate(AbstractEngineConfiguration.DB_SCHEMA_UPDATE_DROP_CREATE);
+ CommandExecutor commandExecutor = engineConfiguration.getCommandExecutor();
+ CommandConfig config = new CommandConfig().transactionNotSupported();
+ commandExecutor.execute(config, dropAndRecreateDbCommand);
+ } finally {
+ engineConfiguration.setDatabaseSchemaUpdate(originalDatabaseSchemaUpdate);
+ }
}
if (hasNoException) {
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.cockroachdb.create.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.cockroachdb.create.common.sql
index 84884727c8f..4e384686a9a 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.cockroachdb.create.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.cockroachdb.create.common.sql
@@ -16,9 +16,46 @@ CREATE TABLE if not exists ACT_GE_BYTEARRAY (
);
insert into ACT_GE_PROPERTY
-values ('common.schema.version', '7.1.0.0', 1);
+values ('common.schema.version', '7.1.0.1', 1);
insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1);
--- force-commit
\ No newline at end of file
+create table FLW_RU_BATCH (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ TYPE_ varchar(64) not null,
+ SEARCH_KEY_ varchar(255),
+ SEARCH_KEY2_ varchar(255),
+ CREATE_TIME_ timestamp not null,
+ COMPLETE_TIME_ timestamp,
+ STATUS_ varchar(255),
+ BATCH_DOC_ID_ varchar(64),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table FLW_RU_BATCH_PART (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ BATCH_ID_ varchar(64),
+ TYPE_ varchar(64) not null,
+ SCOPE_ID_ varchar(64),
+ SUB_SCOPE_ID_ varchar(64),
+ SCOPE_TYPE_ varchar(64),
+ SEARCH_KEY_ varchar(255),
+ SEARCH_KEY2_ varchar(255),
+ CREATE_TIME_ timestamp not null,
+ COMPLETE_TIME_ timestamp,
+ STATUS_ varchar(255),
+ RESULT_DOC_ID_ varchar(64),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
+
+alter table FLW_RU_BATCH_PART
+ add constraint FLW_FK_BATCH_PART_PARENT
+ foreign key (BATCH_ID_)
+ references FLW_RU_BATCH (ID_);
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.db2.create.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.db2.create.common.sql
index 8b70c5e2c1c..0d95dcb029e 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.db2.create.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.db2.create.common.sql
@@ -16,7 +16,590 @@ create table ACT_GE_BYTEARRAY (
);
insert into ACT_GE_PROPERTY
-values ('common.schema.version', '7.1.0.0', 1);
+values ('common.schema.version', '7.1.0.1', 1);
insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1);
+
+
+create table ACT_RU_ENTITYLINK (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ CREATE_TIME_ timestamp,
+ LINK_TYPE_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PARENT_ELEMENT_ID_ varchar(255),
+ REF_SCOPE_ID_ varchar(255),
+ REF_SCOPE_TYPE_ varchar(255),
+ REF_SCOPE_DEFINITION_ID_ varchar(255),
+ ROOT_SCOPE_ID_ varchar(255),
+ ROOT_SCOPE_TYPE_ varchar(255),
+ HIERARCHY_TYPE_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_ENT_LNK_SCOPE on ACT_RU_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_REF_SCOPE on ACT_RU_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_ROOT_SCOPE on ACT_RU_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_SCOPE_DEF on ACT_RU_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
+
+create table ACT_HI_ENTITYLINK (
+ ID_ varchar(64) not null,
+ LINK_TYPE_ varchar(255),
+ CREATE_TIME_ timestamp,
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PARENT_ELEMENT_ID_ varchar(255),
+ REF_SCOPE_ID_ varchar(255),
+ REF_SCOPE_TYPE_ varchar(255),
+ REF_SCOPE_DEFINITION_ID_ varchar(255),
+ ROOT_SCOPE_ID_ varchar(255),
+ ROOT_SCOPE_TYPE_ varchar(255),
+ HIERARCHY_TYPE_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_ENT_LNK_SCOPE on ACT_HI_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_REF_SCOPE on ACT_HI_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_ROOT_SCOPE on ACT_HI_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_SCOPE_DEF on ACT_HI_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
+
+
+create table ACT_RU_IDENTITYLINK (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ GROUP_ID_ varchar(255),
+ TYPE_ varchar(255),
+ USER_ID_ varchar(255),
+ TASK_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
+create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_HI_IDENTITYLINK (
+ ID_ varchar(64) not null,
+ GROUP_ID_ varchar(255),
+ TYPE_ varchar(255),
+ USER_ID_ varchar(255),
+ TASK_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ PROC_INST_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+
+create table ACT_RU_JOB (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) not null,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ smallint check(EXCLUSIVE_ in (1,0)),
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_TIMER_JOB (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) not null,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ smallint check(EXCLUSIVE_ in (1,0)),
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_SUSPENDED_JOB (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) not null,
+ EXCLUSIVE_ smallint check(EXCLUSIVE_ in (1,0)),
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_DEADLETTER_JOB (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) not null,
+ EXCLUSIVE_ smallint check(EXCLUSIVE_ in (1,0)),
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_HISTORY_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ ADV_HANDLER_CFG_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ SCOPE_TYPE_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_EXTERNAL_JOB (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) not null,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ smallint check(EXCLUSIVE_ in (1,0)),
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create index ACT_IDX_JOB_EXCEPTION_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_JOB_CUSTOM_VAL_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_TJOB_EXCEPTION_ID on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_TJOB_CUSTOM_VAL_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_TJOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
+create index ACT_IDX_TJOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
+
+create index ACT_IDX_SJOB_EXCEPTION_ID on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_SJOB_CUSTOM_VAL_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_SJOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_DJOB_EXCEPTION_ID on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_DJOB_CUSTOM_VAL_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_DJOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_EJOB_EXCEPTION_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_EJOB_CUSTOM_VAL_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_EJOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_CUSTOM_VAL
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_TIMER_JOB
+ add constraint ACT_FK_TJOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_TIMER_JOB
+ add constraint ACT_FK_TJOB_CUSTOM_VAL
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_SUSPENDED_JOB
+ add constraint ACT_FK_SJOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_SUSPENDED_JOB
+ add constraint ACT_FK_SJOB_CUSTOM_VAL
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_DEADLETTER_JOB
+ add constraint ACT_FK_DJOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_DEADLETTER_JOB
+ add constraint ACT_FK_DJOB_CUSTOM_VAL
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EXTERNAL_JOB
+ add constraint ACT_FK_EJOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EXTERNAL_JOB
+ add constraint ACT_FK_EJOB_CUSTOM_VAL
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table FLW_RU_BATCH (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ TYPE_ varchar(64) not null,
+ SEARCH_KEY_ varchar(255),
+ SEARCH_KEY2_ varchar(255),
+ CREATE_TIME_ timestamp not null,
+ COMPLETE_TIME_ timestamp,
+ STATUS_ varchar(255),
+ BATCH_DOC_ID_ varchar(64),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table FLW_RU_BATCH_PART (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ BATCH_ID_ varchar(64),
+ TYPE_ varchar(64) not null,
+ SCOPE_ID_ varchar(64),
+ SUB_SCOPE_ID_ varchar(64),
+ SCOPE_TYPE_ varchar(64),
+ SEARCH_KEY_ varchar(255),
+ SEARCH_KEY2_ varchar(255),
+ CREATE_TIME_ timestamp not null,
+ COMPLETE_TIME_ timestamp,
+ STATUS_ varchar(255),
+ RESULT_DOC_ID_ varchar(64),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
+
+alter table FLW_RU_BATCH_PART
+ add constraint FLW_FK_BATCH_PART_PARENT
+ foreign key (BATCH_ID_)
+ references FLW_RU_BATCH (ID_);
+
+
+create table ACT_RU_TASK (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ TASK_DEF_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PROPAGATED_STAGE_INST_ID_ varchar(255),
+ STATE_ varchar(255),
+ NAME_ varchar(255),
+ PARENT_TASK_ID_ varchar(64),
+ DESCRIPTION_ varchar(4000),
+ TASK_DEF_KEY_ varchar(255),
+ OWNER_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ DELEGATION_ varchar(64),
+ PRIORITY_ integer,
+ CREATE_TIME_ timestamp,
+ IN_PROGRESS_TIME_ timestamp,
+ IN_PROGRESS_STARTED_BY_ varchar(255),
+ CLAIM_TIME_ timestamp,
+ CLAIMED_BY_ varchar(255),
+ SUSPENDED_TIME_ timestamp,
+ SUSPENDED_BY_ varchar(255),
+ IN_PROGRESS_DUE_DATE_ timestamp,
+ DUE_DATE_ timestamp,
+ CATEGORY_ varchar(255),
+ SUSPENSION_STATE_ integer,
+ TENANT_ID_ varchar(255) default '',
+ FORM_KEY_ varchar(255),
+ IS_COUNT_ENABLED_ smallint check(IS_COUNT_ENABLED_ in (1,0)),
+ VAR_COUNT_ integer,
+ ID_LINK_COUNT_ integer,
+ SUB_TASK_COUNT_ integer,
+ primary key (ID_)
+);
+
+create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_);
+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_);
+create index ACT_IDX_TASK_SCOPE_DEF on ACT_RU_TASK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_HI_TASKINST (
+ ID_ varchar(64) not null,
+ REV_ integer default 1,
+ PROC_DEF_ID_ varchar(64),
+ TASK_DEF_ID_ varchar(64),
+ TASK_DEF_KEY_ varchar(255),
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PROPAGATED_STAGE_INST_ID_ varchar(255),
+ STATE_ varchar(255),
+ NAME_ varchar(255),
+ PARENT_TASK_ID_ varchar(64),
+ DESCRIPTION_ varchar(4000),
+ OWNER_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ START_TIME_ timestamp not null,
+ IN_PROGRESS_TIME_ timestamp,
+ IN_PROGRESS_STARTED_BY_ varchar(255),
+ CLAIM_TIME_ timestamp,
+ CLAIMED_BY_ varchar(255),
+ SUSPENDED_TIME_ timestamp,
+ SUSPENDED_BY_ varchar(255),
+ END_TIME_ timestamp,
+ COMPLETED_BY_ varchar(255),
+ DURATION_ bigint,
+ DELETE_REASON_ varchar(4000),
+ PRIORITY_ integer,
+ IN_PROGRESS_DUE_DATE_ timestamp,
+ DUE_DATE_ timestamp,
+ FORM_KEY_ varchar(255),
+ CATEGORY_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ LAST_UPDATED_TIME_ timestamp,
+ primary key (ID_)
+);
+
+create table ACT_HI_TSK_LOG (
+ ID_ bigint not null GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
+ TYPE_ varchar(64),
+ TASK_ID_ varchar(64) not null,
+ TIME_STAMP_ timestamp not null,
+ USER_ID_ varchar(255),
+ DATA_ varchar(4000),
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+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_);
+create index ACT_IDX_HI_TASK_SCOPE_DEF on ACT_HI_TASKINST(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+create index ACT_IDX_ACT_HI_TSK_LOG_TASK on ACT_HI_TSK_LOG(TASK_ID_);
+
+
+create table ACT_RU_VARIABLE (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ TYPE_ varchar(255) not null,
+ NAME_ varchar(255) not null,
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ TASK_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double precision,
+ LONG_ bigint,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
+ META_INFO_ varchar(4000),
+ primary key (ID_)
+);
+
+create index ACT_IDX_RU_VAR_SCOPE_ID_TYPE on ACT_RU_VARIABLE(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_RU_VAR_SUB_ID_TYPE on ACT_RU_VARIABLE(SUB_SCOPE_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_VARIABLE_BA on ACT_RU_VARIABLE(BYTEARRAY_ID_);
+alter table ACT_RU_VARIABLE
+ add constraint ACT_FK_VAR_BYTEARRAY
+ foreign key (BYTEARRAY_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+create table ACT_HI_VARINST (
+ ID_ varchar(64) not null,
+ REV_ integer default 1,
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ TASK_ID_ varchar(64),
+ NAME_ varchar(255) not null,
+ VAR_TYPE_ varchar(100),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double precision,
+ LONG_ bigint,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
+ META_INFO_ varchar(4000),
+ CREATE_TIME_ timestamp,
+ LAST_UPDATED_TIME_ timestamp,
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_);
+create index ACT_IDX_HI_VAR_SCOPE_ID_TYPE on ACT_HI_VARINST(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_VAR_SUB_ID_TYPE on ACT_HI_VARINST(SUB_SCOPE_ID_, SCOPE_TYPE_);
+
+
+create table ACT_RU_EVENT_SUBSCR (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ EVENT_TYPE_ varchar(255) not null,
+ EVENT_NAME_ varchar(255),
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ ACTIVITY_ID_ varchar(64),
+ CONFIGURATION_ varchar(255),
+ CREATED_ timestamp not null,
+ PROC_DEF_ID_ varchar(64),
+ SUB_SCOPE_ID_ varchar(64),
+ SCOPE_ID_ varchar(64),
+ SCOPE_DEFINITION_ID_ varchar(64),
+ SCOPE_DEFINITION_KEY_ varchar(255),
+ SCOPE_TYPE_ varchar(64),
+ LOCK_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
+create index ACT_IDX_EVENT_SUBSCR_EXEC_ID on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_);
+create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.h2.create.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.h2.create.common.sql
index a6e7a0485b6..7589cd67120 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.h2.create.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.h2.create.common.sql
@@ -16,7 +16,582 @@ create table ACT_GE_BYTEARRAY (
);
insert into ACT_GE_PROPERTY
-values ('common.schema.version', '7.1.0.0', 1);
+values ('common.schema.version', '7.1.0.1', 1);
insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1);
+
+create table FLW_RU_BATCH (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ TYPE_ varchar(64) not null,
+ SEARCH_KEY_ varchar(255),
+ SEARCH_KEY2_ varchar(255),
+ CREATE_TIME_ timestamp not null,
+ COMPLETE_TIME_ timestamp,
+ STATUS_ varchar(255),
+ BATCH_DOC_ID_ varchar(64),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table FLW_RU_BATCH_PART (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ BATCH_ID_ varchar(64),
+ TYPE_ varchar(64) not null,
+ SCOPE_ID_ varchar(64),
+ SUB_SCOPE_ID_ varchar(64),
+ SCOPE_TYPE_ varchar(64),
+ SEARCH_KEY_ varchar(255),
+ SEARCH_KEY2_ varchar(255),
+ CREATE_TIME_ timestamp not null,
+ COMPLETE_TIME_ timestamp,
+ STATUS_ varchar(255),
+ RESULT_DOC_ID_ varchar(64),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
+
+alter table FLW_RU_BATCH_PART
+ add constraint FLW_FK_BATCH_PART_PARENT
+ foreign key (BATCH_ID_)
+ references FLW_RU_BATCH (ID_);
+
+create table ACT_RU_ENTITYLINK (
+ ID_ varchar(64),
+ REV_ integer,
+ CREATE_TIME_ timestamp,
+ LINK_TYPE_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PARENT_ELEMENT_ID_ varchar(255),
+ REF_SCOPE_ID_ varchar(255),
+ REF_SCOPE_TYPE_ varchar(255),
+ REF_SCOPE_DEFINITION_ID_ varchar(255),
+ ROOT_SCOPE_ID_ varchar(255),
+ ROOT_SCOPE_TYPE_ varchar(255),
+ HIERARCHY_TYPE_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_ENT_LNK_SCOPE on ACT_RU_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_REF_SCOPE on ACT_RU_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_ROOT_SCOPE on ACT_RU_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_SCOPE_DEF on ACT_RU_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
+
+create table ACT_HI_ENTITYLINK (
+ ID_ varchar(64),
+ LINK_TYPE_ varchar(255),
+ CREATE_TIME_ timestamp,
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PARENT_ELEMENT_ID_ varchar(255),
+ REF_SCOPE_ID_ varchar(255),
+ REF_SCOPE_TYPE_ varchar(255),
+ REF_SCOPE_DEFINITION_ID_ varchar(255),
+ ROOT_SCOPE_ID_ varchar(255),
+ ROOT_SCOPE_TYPE_ varchar(255),
+ HIERARCHY_TYPE_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_ENT_LNK_SCOPE on ACT_HI_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_REF_SCOPE on ACT_HI_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_ROOT_SCOPE on ACT_HI_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_SCOPE_DEF on ACT_HI_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
+
+create table ACT_RU_EVENT_SUBSCR (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ EVENT_TYPE_ varchar(255) not null,
+ EVENT_NAME_ varchar(255),
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ ACTIVITY_ID_ varchar(64),
+ CONFIGURATION_ varchar(255),
+ CREATED_ timestamp not null,
+ PROC_DEF_ID_ varchar(64),
+ SUB_SCOPE_ID_ varchar(64),
+ SCOPE_ID_ varchar(64),
+ SCOPE_DEFINITION_ID_ varchar(64),
+ SCOPE_DEFINITION_KEY_ varchar(255),
+ SCOPE_TYPE_ varchar(64),
+ LOCK_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
+create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
+
+create table ACT_RU_IDENTITYLINK (
+ ID_ varchar(64),
+ REV_ integer,
+ GROUP_ID_ varchar(255),
+ TYPE_ varchar(255),
+ USER_ID_ varchar(255),
+ TASK_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64) null,
+ PROC_DEF_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
+create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_HI_IDENTITYLINK (
+ ID_ varchar(64),
+ GROUP_ID_ varchar(255),
+ TYPE_ varchar(255),
+ USER_ID_ varchar(255),
+ TASK_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ PROC_INST_ID_ varchar(64) null,
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_RU_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_TIMER_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_SUSPENDED_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_DEADLETTER_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_HISTORY_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ ADV_HANDLER_CFG_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ SCOPE_TYPE_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_EXTERNAL_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create index ACT_IDX_JOB_EXCEPTION_STACK_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
+create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
+
+create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_TIMER_JOB
+ add constraint ACT_FK_TIMER_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_TIMER_JOB
+ add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_SUSPENDED_JOB
+ add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_SUSPENDED_JOB
+ add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_DEADLETTER_JOB
+ add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_DEADLETTER_JOB
+ add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EXTERNAL_JOB
+ add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EXTERNAL_JOB
+ add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_RU_TASK (
+ ID_ varchar(64),
+ REV_ integer,
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ TASK_DEF_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PROPAGATED_STAGE_INST_ID_ varchar(255),
+ STATE_ varchar(255),
+ NAME_ varchar(255),
+ PARENT_TASK_ID_ varchar(64),
+ DESCRIPTION_ varchar(4000),
+ TASK_DEF_KEY_ varchar(255),
+ OWNER_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ DELEGATION_ varchar(64),
+ PRIORITY_ integer,
+ CREATE_TIME_ timestamp,
+ IN_PROGRESS_TIME_ timestamp,
+ IN_PROGRESS_STARTED_BY_ varchar(255),
+ CLAIM_TIME_ timestamp,
+ CLAIMED_BY_ varchar(255),
+ SUSPENDED_TIME_ timestamp,
+ SUSPENDED_BY_ varchar(255),
+ IN_PROGRESS_DUE_DATE_ timestamp,
+ DUE_DATE_ timestamp,
+ CATEGORY_ varchar(255),
+ SUSPENSION_STATE_ integer,
+ TENANT_ID_ varchar(255) default '',
+ FORM_KEY_ varchar(255),
+ IS_COUNT_ENABLED_ bit,
+ VAR_COUNT_ integer,
+ ID_LINK_COUNT_ integer,
+ SUB_TASK_COUNT_ integer,
+ primary key (ID_)
+);
+
+create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_);
+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_);
+create index ACT_IDX_TASK_SCOPE_DEF on ACT_RU_TASK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_HI_TASKINST (
+ ID_ varchar(64) not null,
+ REV_ integer default 1,
+ PROC_DEF_ID_ varchar(64),
+ TASK_DEF_ID_ varchar(64),
+ TASK_DEF_KEY_ varchar(255),
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PROPAGATED_STAGE_INST_ID_ varchar(255),
+ STATE_ varchar(255),
+ NAME_ varchar(255),
+ PARENT_TASK_ID_ varchar(64),
+ DESCRIPTION_ varchar(4000),
+ OWNER_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ START_TIME_ timestamp not null,
+ IN_PROGRESS_TIME_ timestamp,
+ IN_PROGRESS_STARTED_BY_ varchar(255),
+ CLAIM_TIME_ timestamp,
+ CLAIMED_BY_ varchar(255),
+ SUSPENDED_TIME_ timestamp,
+ SUSPENDED_BY_ varchar(255),
+ END_TIME_ timestamp,
+ COMPLETED_BY_ varchar(255),
+ DURATION_ bigint,
+ DELETE_REASON_ varchar(4000),
+ PRIORITY_ integer,
+ IN_PROGRESS_DUE_DATE_ timestamp,
+ DUE_DATE_ timestamp,
+ FORM_KEY_ varchar(255),
+ CATEGORY_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ LAST_UPDATED_TIME_ timestamp,
+ primary key (ID_)
+);
+
+create table ACT_HI_TSK_LOG (
+ ID_ identity,
+ TYPE_ varchar(64),
+ TASK_ID_ varchar(64) not null,
+ TIME_STAMP_ timestamp not null,
+ USER_ID_ varchar(255),
+ DATA_ varchar(4000),
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+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_);
+create index ACT_IDX_HI_TASK_SCOPE_DEF on ACT_HI_TASKINST(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+create index ACT_IDX_ACT_HI_TSK_LOG_TASK on ACT_HI_TSK_LOG(TASK_ID_);
+
+create table ACT_RU_VARIABLE (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ TYPE_ varchar(255) not null,
+ NAME_ varchar(255) not null,
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ TASK_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double,
+ LONG_ bigint,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
+ META_INFO_ varchar(4000),
+ primary key (ID_)
+);
+
+create index ACT_IDX_RU_VAR_SCOPE_ID_TYPE on ACT_RU_VARIABLE(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_RU_VAR_SUB_ID_TYPE on ACT_RU_VARIABLE(SUB_SCOPE_ID_, SCOPE_TYPE_);
+
+alter table ACT_RU_VARIABLE
+ add constraint ACT_FK_VAR_BYTEARRAY
+ foreign key (BYTEARRAY_ID_)
+ references ACT_GE_BYTEARRAY;
+
+create table ACT_HI_VARINST (
+ ID_ varchar(64) not null,
+ REV_ integer default 1,
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ TASK_ID_ varchar(64),
+ NAME_ varchar(255) not null,
+ VAR_TYPE_ varchar(100),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double,
+ LONG_ bigint,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
+ META_INFO_ varchar(4000),
+ CREATE_TIME_ timestamp,
+ LAST_UPDATED_TIME_ timestamp,
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_);
+create index ACT_IDX_HI_VAR_SCOPE_ID_TYPE on ACT_HI_VARINST(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_VAR_SUB_ID_TYPE on ACT_HI_VARINST(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.hsql.create.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.hsql.create.common.sql
index a6e7a0485b6..7589cd67120 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.hsql.create.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.hsql.create.common.sql
@@ -16,7 +16,582 @@ create table ACT_GE_BYTEARRAY (
);
insert into ACT_GE_PROPERTY
-values ('common.schema.version', '7.1.0.0', 1);
+values ('common.schema.version', '7.1.0.1', 1);
insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1);
+
+create table FLW_RU_BATCH (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ TYPE_ varchar(64) not null,
+ SEARCH_KEY_ varchar(255),
+ SEARCH_KEY2_ varchar(255),
+ CREATE_TIME_ timestamp not null,
+ COMPLETE_TIME_ timestamp,
+ STATUS_ varchar(255),
+ BATCH_DOC_ID_ varchar(64),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table FLW_RU_BATCH_PART (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ BATCH_ID_ varchar(64),
+ TYPE_ varchar(64) not null,
+ SCOPE_ID_ varchar(64),
+ SUB_SCOPE_ID_ varchar(64),
+ SCOPE_TYPE_ varchar(64),
+ SEARCH_KEY_ varchar(255),
+ SEARCH_KEY2_ varchar(255),
+ CREATE_TIME_ timestamp not null,
+ COMPLETE_TIME_ timestamp,
+ STATUS_ varchar(255),
+ RESULT_DOC_ID_ varchar(64),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
+
+alter table FLW_RU_BATCH_PART
+ add constraint FLW_FK_BATCH_PART_PARENT
+ foreign key (BATCH_ID_)
+ references FLW_RU_BATCH (ID_);
+
+create table ACT_RU_ENTITYLINK (
+ ID_ varchar(64),
+ REV_ integer,
+ CREATE_TIME_ timestamp,
+ LINK_TYPE_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PARENT_ELEMENT_ID_ varchar(255),
+ REF_SCOPE_ID_ varchar(255),
+ REF_SCOPE_TYPE_ varchar(255),
+ REF_SCOPE_DEFINITION_ID_ varchar(255),
+ ROOT_SCOPE_ID_ varchar(255),
+ ROOT_SCOPE_TYPE_ varchar(255),
+ HIERARCHY_TYPE_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_ENT_LNK_SCOPE on ACT_RU_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_REF_SCOPE on ACT_RU_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_ROOT_SCOPE on ACT_RU_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_SCOPE_DEF on ACT_RU_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
+
+create table ACT_HI_ENTITYLINK (
+ ID_ varchar(64),
+ LINK_TYPE_ varchar(255),
+ CREATE_TIME_ timestamp,
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PARENT_ELEMENT_ID_ varchar(255),
+ REF_SCOPE_ID_ varchar(255),
+ REF_SCOPE_TYPE_ varchar(255),
+ REF_SCOPE_DEFINITION_ID_ varchar(255),
+ ROOT_SCOPE_ID_ varchar(255),
+ ROOT_SCOPE_TYPE_ varchar(255),
+ HIERARCHY_TYPE_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_ENT_LNK_SCOPE on ACT_HI_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_REF_SCOPE on ACT_HI_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_ROOT_SCOPE on ACT_HI_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_SCOPE_DEF on ACT_HI_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
+
+create table ACT_RU_EVENT_SUBSCR (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ EVENT_TYPE_ varchar(255) not null,
+ EVENT_NAME_ varchar(255),
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ ACTIVITY_ID_ varchar(64),
+ CONFIGURATION_ varchar(255),
+ CREATED_ timestamp not null,
+ PROC_DEF_ID_ varchar(64),
+ SUB_SCOPE_ID_ varchar(64),
+ SCOPE_ID_ varchar(64),
+ SCOPE_DEFINITION_ID_ varchar(64),
+ SCOPE_DEFINITION_KEY_ varchar(255),
+ SCOPE_TYPE_ varchar(64),
+ LOCK_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
+create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
+
+create table ACT_RU_IDENTITYLINK (
+ ID_ varchar(64),
+ REV_ integer,
+ GROUP_ID_ varchar(255),
+ TYPE_ varchar(255),
+ USER_ID_ varchar(255),
+ TASK_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64) null,
+ PROC_DEF_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
+create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_HI_IDENTITYLINK (
+ ID_ varchar(64),
+ GROUP_ID_ varchar(255),
+ TYPE_ varchar(255),
+ USER_ID_ varchar(255),
+ TASK_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ PROC_INST_ID_ varchar(64) null,
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_RU_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_TIMER_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_SUSPENDED_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_DEADLETTER_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_HISTORY_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ ADV_HANDLER_CFG_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ SCOPE_TYPE_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_EXTERNAL_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create index ACT_IDX_JOB_EXCEPTION_STACK_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
+create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
+
+create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_TIMER_JOB
+ add constraint ACT_FK_TIMER_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_TIMER_JOB
+ add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_SUSPENDED_JOB
+ add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_SUSPENDED_JOB
+ add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_DEADLETTER_JOB
+ add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_DEADLETTER_JOB
+ add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EXTERNAL_JOB
+ add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EXTERNAL_JOB
+ add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_RU_TASK (
+ ID_ varchar(64),
+ REV_ integer,
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ TASK_DEF_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PROPAGATED_STAGE_INST_ID_ varchar(255),
+ STATE_ varchar(255),
+ NAME_ varchar(255),
+ PARENT_TASK_ID_ varchar(64),
+ DESCRIPTION_ varchar(4000),
+ TASK_DEF_KEY_ varchar(255),
+ OWNER_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ DELEGATION_ varchar(64),
+ PRIORITY_ integer,
+ CREATE_TIME_ timestamp,
+ IN_PROGRESS_TIME_ timestamp,
+ IN_PROGRESS_STARTED_BY_ varchar(255),
+ CLAIM_TIME_ timestamp,
+ CLAIMED_BY_ varchar(255),
+ SUSPENDED_TIME_ timestamp,
+ SUSPENDED_BY_ varchar(255),
+ IN_PROGRESS_DUE_DATE_ timestamp,
+ DUE_DATE_ timestamp,
+ CATEGORY_ varchar(255),
+ SUSPENSION_STATE_ integer,
+ TENANT_ID_ varchar(255) default '',
+ FORM_KEY_ varchar(255),
+ IS_COUNT_ENABLED_ bit,
+ VAR_COUNT_ integer,
+ ID_LINK_COUNT_ integer,
+ SUB_TASK_COUNT_ integer,
+ primary key (ID_)
+);
+
+create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_);
+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_);
+create index ACT_IDX_TASK_SCOPE_DEF on ACT_RU_TASK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_HI_TASKINST (
+ ID_ varchar(64) not null,
+ REV_ integer default 1,
+ PROC_DEF_ID_ varchar(64),
+ TASK_DEF_ID_ varchar(64),
+ TASK_DEF_KEY_ varchar(255),
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PROPAGATED_STAGE_INST_ID_ varchar(255),
+ STATE_ varchar(255),
+ NAME_ varchar(255),
+ PARENT_TASK_ID_ varchar(64),
+ DESCRIPTION_ varchar(4000),
+ OWNER_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ START_TIME_ timestamp not null,
+ IN_PROGRESS_TIME_ timestamp,
+ IN_PROGRESS_STARTED_BY_ varchar(255),
+ CLAIM_TIME_ timestamp,
+ CLAIMED_BY_ varchar(255),
+ SUSPENDED_TIME_ timestamp,
+ SUSPENDED_BY_ varchar(255),
+ END_TIME_ timestamp,
+ COMPLETED_BY_ varchar(255),
+ DURATION_ bigint,
+ DELETE_REASON_ varchar(4000),
+ PRIORITY_ integer,
+ IN_PROGRESS_DUE_DATE_ timestamp,
+ DUE_DATE_ timestamp,
+ FORM_KEY_ varchar(255),
+ CATEGORY_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ LAST_UPDATED_TIME_ timestamp,
+ primary key (ID_)
+);
+
+create table ACT_HI_TSK_LOG (
+ ID_ identity,
+ TYPE_ varchar(64),
+ TASK_ID_ varchar(64) not null,
+ TIME_STAMP_ timestamp not null,
+ USER_ID_ varchar(255),
+ DATA_ varchar(4000),
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+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_);
+create index ACT_IDX_HI_TASK_SCOPE_DEF on ACT_HI_TASKINST(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+create index ACT_IDX_ACT_HI_TSK_LOG_TASK on ACT_HI_TSK_LOG(TASK_ID_);
+
+create table ACT_RU_VARIABLE (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ TYPE_ varchar(255) not null,
+ NAME_ varchar(255) not null,
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ TASK_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double,
+ LONG_ bigint,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
+ META_INFO_ varchar(4000),
+ primary key (ID_)
+);
+
+create index ACT_IDX_RU_VAR_SCOPE_ID_TYPE on ACT_RU_VARIABLE(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_RU_VAR_SUB_ID_TYPE on ACT_RU_VARIABLE(SUB_SCOPE_ID_, SCOPE_TYPE_);
+
+alter table ACT_RU_VARIABLE
+ add constraint ACT_FK_VAR_BYTEARRAY
+ foreign key (BYTEARRAY_ID_)
+ references ACT_GE_BYTEARRAY;
+
+create table ACT_HI_VARINST (
+ ID_ varchar(64) not null,
+ REV_ integer default 1,
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ TASK_ID_ varchar(64),
+ NAME_ varchar(255) not null,
+ VAR_TYPE_ varchar(100),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double,
+ LONG_ bigint,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
+ META_INFO_ varchar(4000),
+ CREATE_TIME_ timestamp,
+ LAST_UPDATED_TIME_ timestamp,
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_);
+create index ACT_IDX_HI_VAR_SCOPE_ID_TYPE on ACT_HI_VARINST(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_VAR_SUB_ID_TYPE on ACT_HI_VARINST(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.mssql.create.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.mssql.create.common.sql
index ce396e8c910..5bcee4c16a3 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.mssql.create.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.mssql.create.common.sql
@@ -16,7 +16,588 @@ create table ACT_GE_BYTEARRAY (
);
insert into ACT_GE_PROPERTY
-values ('common.schema.version', '7.1.0.0', 1);
+values ('common.schema.version', '7.1.0.1', 1);
insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1);
+
+
+create table ACT_RU_ENTITYLINK (
+ ID_ nvarchar(64),
+ REV_ int,
+ CREATE_TIME_ datetime,
+ LINK_TYPE_ nvarchar(255),
+ SCOPE_ID_ nvarchar(255),
+ SUB_SCOPE_ID_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(255),
+ SCOPE_DEFINITION_ID_ nvarchar(255),
+ PARENT_ELEMENT_ID_ nvarchar(255),
+ REF_SCOPE_ID_ nvarchar(255),
+ REF_SCOPE_TYPE_ nvarchar(255),
+ REF_SCOPE_DEFINITION_ID_ nvarchar(255),
+ ROOT_SCOPE_ID_ nvarchar(255),
+ ROOT_SCOPE_TYPE_ nvarchar(255),
+ HIERARCHY_TYPE_ nvarchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_ENT_LNK_SCOPE on ACT_RU_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_REF_SCOPE on ACT_RU_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_ROOT_SCOPE on ACT_RU_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_SCOPE_DEF on ACT_RU_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
+
+create table ACT_HI_ENTITYLINK (
+ ID_ nvarchar(64),
+ LINK_TYPE_ nvarchar(255),
+ CREATE_TIME_ datetime,
+ SCOPE_ID_ nvarchar(255),
+ SUB_SCOPE_ID_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(255),
+ SCOPE_DEFINITION_ID_ nvarchar(255),
+ PARENT_ELEMENT_ID_ nvarchar(255),
+ REF_SCOPE_ID_ nvarchar(255),
+ REF_SCOPE_TYPE_ nvarchar(255),
+ REF_SCOPE_DEFINITION_ID_ nvarchar(255),
+ ROOT_SCOPE_ID_ nvarchar(255),
+ ROOT_SCOPE_TYPE_ nvarchar(255),
+ HIERARCHY_TYPE_ nvarchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_ENT_LNK_SCOPE on ACT_HI_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_REF_SCOPE on ACT_HI_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_ROOT_SCOPE on ACT_HI_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_SCOPE_DEF on ACT_HI_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
+
+
+create table ACT_RU_IDENTITYLINK (
+ ID_ nvarchar(64),
+ REV_ int,
+ GROUP_ID_ nvarchar(255),
+ TYPE_ nvarchar(255),
+ USER_ID_ nvarchar(255),
+ TASK_ID_ nvarchar(64),
+ PROC_INST_ID_ nvarchar(64),
+ PROC_DEF_ID_ nvarchar(64),
+ SCOPE_ID_ nvarchar(255),
+ SUB_SCOPE_ID_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(255),
+ SCOPE_DEFINITION_ID_ nvarchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
+create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_HI_IDENTITYLINK (
+ ID_ nvarchar(64),
+ GROUP_ID_ nvarchar(255),
+ TYPE_ nvarchar(255),
+ USER_ID_ nvarchar(255),
+ TASK_ID_ nvarchar(64),
+ CREATE_TIME_ datetime,
+ PROC_INST_ID_ nvarchar(64),
+ SCOPE_ID_ nvarchar(255),
+ SUB_SCOPE_ID_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(255),
+ SCOPE_DEFINITION_ID_ nvarchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+
+create table ACT_RU_JOB (
+ ID_ nvarchar(64) NOT NULL,
+ REV_ int,
+ CATEGORY_ varchar(255),
+ TYPE_ nvarchar(255) NOT NULL,
+ LOCK_EXP_TIME_ datetime,
+ LOCK_OWNER_ nvarchar(255),
+ EXCLUSIVE_ bit,
+ EXECUTION_ID_ nvarchar(64),
+ PROCESS_INSTANCE_ID_ nvarchar(64),
+ PROC_DEF_ID_ nvarchar(64),
+ ELEMENT_ID_ nvarchar(255),
+ ELEMENT_NAME_ nvarchar(255),
+ SCOPE_ID_ nvarchar(255),
+ SUB_SCOPE_ID_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(255),
+ SCOPE_DEFINITION_ID_ nvarchar(255),
+ CORRELATION_ID_ nvarchar(255),
+ RETRIES_ int,
+ EXCEPTION_STACK_ID_ nvarchar(64),
+ EXCEPTION_MSG_ nvarchar(4000),
+ DUEDATE_ datetime NULL,
+ REPEAT_ nvarchar(255),
+ HANDLER_TYPE_ nvarchar(255),
+ HANDLER_CFG_ nvarchar(4000),
+ CUSTOM_VALUES_ID_ nvarchar(64),
+ CREATE_TIME_ datetime2 NULL,
+ TENANT_ID_ nvarchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_TIMER_JOB (
+ ID_ nvarchar(64) NOT NULL,
+ REV_ int,
+ CATEGORY_ varchar(255),
+ TYPE_ nvarchar(255) NOT NULL,
+ LOCK_EXP_TIME_ datetime,
+ LOCK_OWNER_ nvarchar(255),
+ EXCLUSIVE_ bit,
+ EXECUTION_ID_ nvarchar(64),
+ PROCESS_INSTANCE_ID_ nvarchar(64),
+ PROC_DEF_ID_ nvarchar(64),
+ ELEMENT_ID_ nvarchar(255),
+ ELEMENT_NAME_ nvarchar(255),
+ SCOPE_ID_ nvarchar(255),
+ SUB_SCOPE_ID_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(255),
+ SCOPE_DEFINITION_ID_ nvarchar(255),
+ CORRELATION_ID_ nvarchar(255),
+ RETRIES_ int,
+ EXCEPTION_STACK_ID_ nvarchar(64),
+ EXCEPTION_MSG_ nvarchar(4000),
+ DUEDATE_ datetime NULL,
+ REPEAT_ nvarchar(255),
+ HANDLER_TYPE_ nvarchar(255),
+ HANDLER_CFG_ nvarchar(4000),
+ CUSTOM_VALUES_ID_ nvarchar(64),
+ CREATE_TIME_ datetime2 NULL,
+ TENANT_ID_ nvarchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_SUSPENDED_JOB (
+ ID_ nvarchar(64) NOT NULL,
+ REV_ int,
+ CATEGORY_ varchar(255),
+ TYPE_ nvarchar(255) NOT NULL,
+ EXCLUSIVE_ bit,
+ EXECUTION_ID_ nvarchar(64),
+ PROCESS_INSTANCE_ID_ nvarchar(64),
+ PROC_DEF_ID_ nvarchar(64),
+ ELEMENT_ID_ nvarchar(255),
+ ELEMENT_NAME_ nvarchar(255),
+ SCOPE_ID_ nvarchar(255),
+ SUB_SCOPE_ID_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(255),
+ SCOPE_DEFINITION_ID_ nvarchar(255),
+ CORRELATION_ID_ nvarchar(255),
+ RETRIES_ int,
+ EXCEPTION_STACK_ID_ nvarchar(64),
+ EXCEPTION_MSG_ nvarchar(4000),
+ DUEDATE_ datetime NULL,
+ REPEAT_ nvarchar(255),
+ HANDLER_TYPE_ nvarchar(255),
+ HANDLER_CFG_ nvarchar(4000),
+ CUSTOM_VALUES_ID_ nvarchar(64),
+ CREATE_TIME_ datetime2 NULL,
+ TENANT_ID_ nvarchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_DEADLETTER_JOB (
+ ID_ nvarchar(64) NOT NULL,
+ REV_ int,
+ CATEGORY_ varchar(255),
+ TYPE_ nvarchar(255) NOT NULL,
+ EXCLUSIVE_ bit,
+ EXECUTION_ID_ nvarchar(64),
+ PROCESS_INSTANCE_ID_ nvarchar(64),
+ PROC_DEF_ID_ nvarchar(64),
+ ELEMENT_ID_ nvarchar(255),
+ ELEMENT_NAME_ nvarchar(255),
+ SCOPE_ID_ nvarchar(255),
+ SUB_SCOPE_ID_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(255),
+ SCOPE_DEFINITION_ID_ nvarchar(255),
+ CORRELATION_ID_ nvarchar(255),
+ EXCEPTION_STACK_ID_ nvarchar(64),
+ EXCEPTION_MSG_ nvarchar(4000),
+ DUEDATE_ datetime NULL,
+ REPEAT_ nvarchar(255),
+ HANDLER_TYPE_ nvarchar(255),
+ HANDLER_CFG_ nvarchar(4000),
+ CUSTOM_VALUES_ID_ nvarchar(64),
+ CREATE_TIME_ datetime2 NULL,
+ TENANT_ID_ nvarchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_HISTORY_JOB (
+ ID_ nvarchar(64) NOT NULL,
+ REV_ int,
+ LOCK_EXP_TIME_ datetime NULL,
+ LOCK_OWNER_ nvarchar(255),
+ RETRIES_ int,
+ EXCEPTION_STACK_ID_ nvarchar(64),
+ EXCEPTION_MSG_ nvarchar(4000),
+ HANDLER_TYPE_ nvarchar(255),
+ HANDLER_CFG_ nvarchar(4000),
+ CUSTOM_VALUES_ID_ nvarchar(64),
+ ADV_HANDLER_CFG_ID_ nvarchar(64),
+ CREATE_TIME_ datetime2 NULL,
+ SCOPE_TYPE_ nvarchar(255),
+ TENANT_ID_ nvarchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_EXTERNAL_JOB (
+ ID_ nvarchar(64) NOT NULL,
+ REV_ int,
+ CATEGORY_ varchar(255),
+ TYPE_ nvarchar(255) NOT NULL,
+ LOCK_EXP_TIME_ datetime,
+ LOCK_OWNER_ nvarchar(255),
+ EXCLUSIVE_ bit,
+ EXECUTION_ID_ nvarchar(64),
+ PROCESS_INSTANCE_ID_ nvarchar(64),
+ PROC_DEF_ID_ nvarchar(64),
+ ELEMENT_ID_ nvarchar(255),
+ ELEMENT_NAME_ nvarchar(255),
+ SCOPE_ID_ nvarchar(255),
+ SUB_SCOPE_ID_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(255),
+ SCOPE_DEFINITION_ID_ nvarchar(255),
+ CORRELATION_ID_ nvarchar(255),
+ RETRIES_ int,
+ EXCEPTION_STACK_ID_ nvarchar(64),
+ EXCEPTION_MSG_ nvarchar(4000),
+ DUEDATE_ datetime NULL,
+ REPEAT_ nvarchar(255),
+ HANDLER_TYPE_ nvarchar(255),
+ HANDLER_CFG_ nvarchar(4000),
+ CUSTOM_VALUES_ID_ nvarchar(64),
+ CREATE_TIME_ datetime2 NULL,
+ TENANT_ID_ nvarchar(255) default '',
+ primary key (ID_)
+);
+
+create index ACT_IDX_JOB_EXCEPTION_STACK_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
+create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
+
+create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_TIMER_JOB
+ add constraint ACT_FK_TIMER_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_TIMER_JOB
+ add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_SUSPENDED_JOB
+ add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_SUSPENDED_JOB
+ add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_DEADLETTER_JOB
+ add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_DEADLETTER_JOB
+ add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EXTERNAL_JOB
+ add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EXTERNAL_JOB
+ add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table FLW_RU_BATCH (
+ ID_ nvarchar(64) not null,
+ REV_ int,
+ TYPE_ nvarchar(64) not null,
+ SEARCH_KEY_ nvarchar(255),
+ SEARCH_KEY2_ nvarchar(255),
+ CREATE_TIME_ datetime not null,
+ COMPLETE_TIME_ datetime,
+ STATUS_ nvarchar(255),
+ BATCH_DOC_ID_ nvarchar(64),
+ TENANT_ID_ nvarchar(255) default '',
+ primary key (ID_)
+);
+
+create table FLW_RU_BATCH_PART (
+ ID_ nvarchar(64) not null,
+ REV_ int,
+ BATCH_ID_ nvarchar(64),
+ TYPE_ nvarchar(64) not null,
+ SCOPE_ID_ nvarchar(64),
+ SUB_SCOPE_ID_ nvarchar(64),
+ SCOPE_TYPE_ nvarchar(64),
+ SEARCH_KEY_ nvarchar(255),
+ SEARCH_KEY2_ nvarchar(255),
+ CREATE_TIME_ datetime not null,
+ COMPLETE_TIME_ datetime,
+ STATUS_ nvarchar(255),
+ RESULT_DOC_ID_ nvarchar(64),
+ TENANT_ID_ nvarchar(255) default '',
+ primary key (ID_)
+);
+
+create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
+
+alter table FLW_RU_BATCH_PART
+ add constraint FLW_FK_BATCH_PART_PARENT
+ foreign key (BATCH_ID_)
+ references FLW_RU_BATCH (ID_);
+
+create table ACT_RU_TASK (
+ ID_ nvarchar(64),
+ REV_ int,
+ EXECUTION_ID_ nvarchar(64),
+ PROC_INST_ID_ nvarchar(64),
+ PROC_DEF_ID_ nvarchar(64),
+ TASK_DEF_ID_ nvarchar(64),
+ SCOPE_ID_ nvarchar(255),
+ SUB_SCOPE_ID_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(255),
+ SCOPE_DEFINITION_ID_ nvarchar(255),
+ PROPAGATED_STAGE_INST_ID_ nvarchar(255),
+ STATE_ nvarchar(255),
+ NAME_ nvarchar(255),
+ PARENT_TASK_ID_ nvarchar(64),
+ DESCRIPTION_ nvarchar(4000),
+ TASK_DEF_KEY_ nvarchar(255),
+ OWNER_ nvarchar(255),
+ ASSIGNEE_ nvarchar(255),
+ DELEGATION_ nvarchar(64),
+ PRIORITY_ int,
+ CREATE_TIME_ datetime,
+ IN_PROGRESS_TIME_ datetime,
+ IN_PROGRESS_STARTED_BY_ nvarchar(255),
+ CLAIM_TIME_ datetime,
+ CLAIMED_BY_ nvarchar(255),
+ SUSPENDED_TIME_ datetime,
+ SUSPENDED_BY_ nvarchar(255),
+ IN_PROGRESS_DUE_DATE_ datetime,
+ DUE_DATE_ datetime,
+ CATEGORY_ nvarchar(255),
+ SUSPENSION_STATE_ int,
+ TENANT_ID_ nvarchar(255) default '',
+ FORM_KEY_ nvarchar(255),
+ IS_COUNT_ENABLED_ tinyint,
+ VAR_COUNT_ int,
+ ID_LINK_COUNT_ int,
+ SUB_TASK_COUNT_ int,
+ primary key (ID_)
+);
+
+create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_);
+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_);
+create index ACT_IDX_TASK_SCOPE_DEF on ACT_RU_TASK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_HI_TASKINST (
+ ID_ nvarchar(64) not null,
+ REV_ int default 1,
+ PROC_DEF_ID_ nvarchar(64),
+ TASK_DEF_ID_ nvarchar(64),
+ TASK_DEF_KEY_ nvarchar(255),
+ PROC_INST_ID_ nvarchar(64),
+ EXECUTION_ID_ nvarchar(64),
+ SCOPE_ID_ nvarchar(255),
+ SUB_SCOPE_ID_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(255),
+ SCOPE_DEFINITION_ID_ nvarchar(255),
+ PROPAGATED_STAGE_INST_ID_ nvarchar(255),
+ STATE_ nvarchar(255),
+ NAME_ nvarchar(255),
+ PARENT_TASK_ID_ nvarchar(64),
+ DESCRIPTION_ nvarchar(4000),
+ OWNER_ nvarchar(255),
+ ASSIGNEE_ nvarchar(255),
+ START_TIME_ datetime not null,
+ IN_PROGRESS_TIME_ datetime,
+ IN_PROGRESS_STARTED_BY_ nvarchar(255),
+ CLAIM_TIME_ datetime,
+ CLAIMED_BY_ nvarchar(255),
+ SUSPENDED_TIME_ datetime,
+ SUSPENDED_BY_ nvarchar(255),
+ END_TIME_ datetime,
+ COMPLETED_BY_ nvarchar(255),
+ DURATION_ numeric(19,0),
+ DELETE_REASON_ nvarchar(4000),
+ PRIORITY_ int,
+ IN_PROGRESS_DUE_DATE_ datetime,
+ DUE_DATE_ datetime,
+ FORM_KEY_ nvarchar(255),
+ CATEGORY_ nvarchar(255),
+ TENANT_ID_ nvarchar(255) default '',
+ LAST_UPDATED_TIME_ datetime2,
+ primary key (ID_)
+);
+
+create table ACT_HI_TSK_LOG (
+ ID_ numeric(19,0) IDENTITY (1,1),
+ TYPE_ nvarchar(64),
+ TASK_ID_ nvarchar(64) not null,
+ TIME_STAMP_ datetime not null,
+ USER_ID_ nvarchar(255),
+ DATA_ nvarchar(4000),
+ EXECUTION_ID_ nvarchar(64),
+ PROC_INST_ID_ nvarchar(64),
+ PROC_DEF_ID_ nvarchar(64),
+ SCOPE_ID_ nvarchar(255),
+ SCOPE_DEFINITION_ID_ nvarchar(255),
+ SUB_SCOPE_ID_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(255),
+ TENANT_ID_ nvarchar(255) default '',
+ primary key (ID_)
+);
+
+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_);
+create index ACT_IDX_HI_TASK_SCOPE_DEF on ACT_HI_TASKINST(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+create index ACT_IDX_ACT_HI_TSK_LOG_TASK on ACT_HI_TSK_LOG(TASK_ID_);
+
+create table ACT_RU_VARIABLE (
+ ID_ nvarchar(64) not null,
+ REV_ int,
+ TYPE_ nvarchar(255) not null,
+ NAME_ nvarchar(255) not null,
+ EXECUTION_ID_ nvarchar(64),
+ PROC_INST_ID_ nvarchar(64),
+ TASK_ID_ nvarchar(64),
+ SCOPE_ID_ nvarchar(255),
+ SUB_SCOPE_ID_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(255),
+ BYTEARRAY_ID_ nvarchar(64),
+ DOUBLE_ double precision,
+ LONG_ numeric(19,0),
+ TEXT_ nvarchar(4000),
+ TEXT2_ nvarchar(4000),
+ META_INFO_ nvarchar(4000),
+ primary key (ID_)
+);
+
+create index ACT_IDX_RU_VAR_SCOPE_ID_TYPE on ACT_RU_VARIABLE(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_RU_VAR_SUB_ID_TYPE on ACT_RU_VARIABLE(SUB_SCOPE_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_VARIABLE_BA on ACT_RU_VARIABLE(BYTEARRAY_ID_);
+alter table ACT_RU_VARIABLE
+ add constraint ACT_FK_VAR_BYTEARRAY
+ foreign key (BYTEARRAY_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+create table ACT_HI_VARINST (
+ ID_ nvarchar(64) not null,
+ REV_ int default 1,
+ PROC_INST_ID_ nvarchar(64),
+ EXECUTION_ID_ nvarchar(64),
+ TASK_ID_ nvarchar(64),
+ NAME_ nvarchar(255) not null,
+ VAR_TYPE_ nvarchar(100),
+ SCOPE_ID_ nvarchar(255),
+ SUB_SCOPE_ID_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(255),
+ BYTEARRAY_ID_ nvarchar(64),
+ DOUBLE_ double precision,
+ LONG_ numeric(19,0),
+ TEXT_ nvarchar(4000),
+ TEXT2_ nvarchar(4000),
+ META_INFO_ nvarchar(4000),
+ CREATE_TIME_ datetime,
+ LAST_UPDATED_TIME_ datetime2,
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_);
+create index ACT_IDX_HI_VAR_SCOPE_ID_TYPE on ACT_HI_VARINST(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_VAR_SUB_ID_TYPE on ACT_HI_VARINST(SUB_SCOPE_ID_, SCOPE_TYPE_);
+
+
+create table ACT_RU_EVENT_SUBSCR (
+ ID_ nvarchar(64) not null,
+ REV_ int,
+ EVENT_TYPE_ nvarchar(255) not null,
+ EVENT_NAME_ nvarchar(255),
+ EXECUTION_ID_ nvarchar(64),
+ PROC_INST_ID_ nvarchar(64),
+ ACTIVITY_ID_ nvarchar(64),
+ CONFIGURATION_ nvarchar(255),
+ CREATED_ datetime not null,
+ PROC_DEF_ID_ nvarchar(64),
+ SUB_SCOPE_ID_ nvarchar(64),
+ SCOPE_ID_ nvarchar(64),
+ SCOPE_DEFINITION_ID_ nvarchar(64),
+ SCOPE_DEFINITION_KEY_ nvarchar(255),
+ SCOPE_TYPE_ nvarchar(64),
+ LOCK_TIME_ datetime,
+ LOCK_OWNER_ nvarchar(255),
+ TENANT_ID_ nvarchar(255) default '',
+ primary key (ID_)
+);
+
+create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
+create index ACT_IDX_EVENT_SUBSCR_EXEC_ID on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_);
+create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.mysql.create.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.mysql.create.common.sql
index bbdec94096f..466b99a328a 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.mysql.create.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.mysql.create.common.sql
@@ -16,7 +16,587 @@ create table ACT_GE_BYTEARRAY (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
insert into ACT_GE_PROPERTY
-values ('common.schema.version', '7.1.0.0', 1);
+values ('common.schema.version', '7.1.0.1', 1);
insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1);
+
+
+create table ACT_RU_ENTITYLINK (
+ ID_ varchar(64),
+ REV_ integer,
+ CREATE_TIME_ datetime(3),
+ LINK_TYPE_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PARENT_ELEMENT_ID_ varchar(255),
+ REF_SCOPE_ID_ varchar(255),
+ REF_SCOPE_TYPE_ varchar(255),
+ REF_SCOPE_DEFINITION_ID_ varchar(255),
+ ROOT_SCOPE_ID_ varchar(255),
+ ROOT_SCOPE_TYPE_ varchar(255),
+ HIERARCHY_TYPE_ varchar(255),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_ENT_LNK_SCOPE on ACT_RU_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_REF_SCOPE on ACT_RU_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_ROOT_SCOPE on ACT_RU_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_SCOPE_DEF on ACT_RU_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
+
+create table ACT_HI_ENTITYLINK (
+ ID_ varchar(64),
+ LINK_TYPE_ varchar(255),
+ CREATE_TIME_ datetime(3),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PARENT_ELEMENT_ID_ varchar(255),
+ REF_SCOPE_ID_ varchar(255),
+ REF_SCOPE_TYPE_ varchar(255),
+ REF_SCOPE_DEFINITION_ID_ varchar(255),
+ ROOT_SCOPE_ID_ varchar(255),
+ ROOT_SCOPE_TYPE_ varchar(255),
+ HIERARCHY_TYPE_ varchar(255),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_HI_ENT_LNK_SCOPE on ACT_HI_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_REF_SCOPE on ACT_HI_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_ROOT_SCOPE on ACT_HI_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_SCOPE_DEF on ACT_HI_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
+
+
+create table ACT_RU_IDENTITYLINK (
+ ID_ varchar(64),
+ REV_ integer,
+ GROUP_ID_ varchar(255),
+ TYPE_ varchar(255),
+ USER_ID_ varchar(255),
+ TASK_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
+create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_HI_IDENTITYLINK (
+ ID_ varchar(64),
+ GROUP_ID_ varchar(255),
+ TYPE_ varchar(255),
+ USER_ID_ varchar(255),
+ TASK_ID_ varchar(64),
+ CREATE_TIME_ datetime(3),
+ PROC_INST_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+
+create table ACT_RU_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ LOCK_EXP_TIME_ timestamp(3) NULL,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp(3) NULL,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp(3) NULL,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_TIMER_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ LOCK_EXP_TIME_ timestamp(3) NULL,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp(3) NULL,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp(3) NULL,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_SUSPENDED_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp(3) NULL,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp(3) NULL,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_DEADLETTER_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp(3) NULL,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp(3) NULL,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_HISTORY_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ LOCK_EXP_TIME_ timestamp(3) NULL,
+ LOCK_OWNER_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ ADV_HANDLER_CFG_ID_ varchar(64),
+ CREATE_TIME_ timestamp(3) NULL,
+ SCOPE_TYPE_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_RU_EXTERNAL_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ LOCK_EXP_TIME_ timestamp(3) NULL,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp(3) NULL,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp(3) NULL,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_JOB_EXCEPTION_STACK_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
+create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
+
+create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_TIMER_JOB
+ add constraint ACT_FK_TIMER_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_TIMER_JOB
+ add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_SUSPENDED_JOB
+ add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_SUSPENDED_JOB
+ add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_DEADLETTER_JOB
+ add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_DEADLETTER_JOB
+ add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EXTERNAL_JOB
+ add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EXTERNAL_JOB
+ add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table FLW_RU_BATCH (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ TYPE_ varchar(64) not null,
+ SEARCH_KEY_ varchar(255),
+ SEARCH_KEY2_ varchar(255),
+ CREATE_TIME_ datetime(3) not null,
+ COMPLETE_TIME_ datetime(3),
+ STATUS_ varchar(255),
+ BATCH_DOC_ID_ varchar(64),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table FLW_RU_BATCH_PART (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ BATCH_ID_ varchar(64),
+ TYPE_ varchar(64) not null,
+ SCOPE_ID_ varchar(64),
+ SUB_SCOPE_ID_ varchar(64),
+ SCOPE_TYPE_ varchar(64),
+ SEARCH_KEY_ varchar(255),
+ SEARCH_KEY2_ varchar(255),
+ CREATE_TIME_ datetime(3) not null,
+ COMPLETE_TIME_ datetime(3),
+ STATUS_ varchar(255),
+ RESULT_DOC_ID_ varchar(64),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
+
+alter table FLW_RU_BATCH_PART
+ add constraint FLW_FK_BATCH_PART_PARENT
+ foreign key (BATCH_ID_)
+ references FLW_RU_BATCH (ID_);
+
+create table ACT_RU_TASK (
+ ID_ varchar(64),
+ REV_ integer,
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ TASK_DEF_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PROPAGATED_STAGE_INST_ID_ varchar(255),
+ STATE_ varchar(255),
+ NAME_ varchar(255),
+ PARENT_TASK_ID_ varchar(64),
+ DESCRIPTION_ varchar(4000),
+ TASK_DEF_KEY_ varchar(255),
+ OWNER_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ DELEGATION_ varchar(64),
+ PRIORITY_ integer,
+ CREATE_TIME_ timestamp(3) NULL,
+ IN_PROGRESS_TIME_ datetime(3),
+ IN_PROGRESS_STARTED_BY_ varchar(255),
+ CLAIM_TIME_ datetime(3),
+ CLAIMED_BY_ varchar(255),
+ SUSPENDED_TIME_ datetime(3),
+ SUSPENDED_BY_ varchar(255),
+ IN_PROGRESS_DUE_DATE_ datetime(3),
+ DUE_DATE_ datetime(3),
+ CATEGORY_ varchar(255),
+ SUSPENSION_STATE_ integer,
+ TENANT_ID_ varchar(255) default '',
+ FORM_KEY_ varchar(255),
+ IS_COUNT_ENABLED_ TINYINT,
+ VAR_COUNT_ integer,
+ ID_LINK_COUNT_ integer,
+ SUB_TASK_COUNT_ integer,
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_);
+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_);
+create index ACT_IDX_TASK_SCOPE_DEF on ACT_RU_TASK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_HI_TASKINST (
+ ID_ varchar(64) not null,
+ REV_ integer default 1,
+ PROC_DEF_ID_ varchar(64),
+ TASK_DEF_ID_ varchar(64),
+ TASK_DEF_KEY_ varchar(255),
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PROPAGATED_STAGE_INST_ID_ varchar(255),
+ STATE_ varchar(255),
+ NAME_ varchar(255),
+ PARENT_TASK_ID_ varchar(64),
+ DESCRIPTION_ varchar(4000),
+ OWNER_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ START_TIME_ datetime(3) not null,
+ IN_PROGRESS_TIME_ datetime(3),
+ IN_PROGRESS_STARTED_BY_ varchar(255),
+ CLAIM_TIME_ datetime(3),
+ CLAIMED_BY_ varchar(255),
+ SUSPENDED_TIME_ datetime(3),
+ SUSPENDED_BY_ varchar(255),
+ END_TIME_ datetime(3),
+ COMPLETED_BY_ varchar(255),
+ DURATION_ bigint,
+ DELETE_REASON_ varchar(4000),
+ PRIORITY_ integer,
+ IN_PROGRESS_DUE_DATE_ datetime(3),
+ DUE_DATE_ datetime(3),
+ FORM_KEY_ varchar(255),
+ CATEGORY_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ LAST_UPDATED_TIME_ datetime(3),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_HI_TSK_LOG (
+ ID_ bigint auto_increment,
+ TYPE_ varchar(64),
+ TASK_ID_ varchar(64) not null,
+ TIME_STAMP_ timestamp(3) not null,
+ USER_ID_ varchar(255),
+ DATA_ varchar(4000),
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+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_);
+create index ACT_IDX_HI_TASK_SCOPE_DEF on ACT_HI_TASKINST(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+create index ACT_IDX_ACT_HI_TSK_LOG_TASK on ACT_HI_TSK_LOG(TASK_ID_);
+
+
+create table ACT_RU_VARIABLE (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ TYPE_ varchar(255) not null,
+ NAME_ varchar(255) not null,
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ TASK_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double,
+ LONG_ bigint,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
+ META_INFO_ varchar(4000),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_RU_VAR_SCOPE_ID_TYPE on ACT_RU_VARIABLE(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_RU_VAR_SUB_ID_TYPE on ACT_RU_VARIABLE(SUB_SCOPE_ID_, SCOPE_TYPE_);
+
+alter table ACT_RU_VARIABLE
+ add constraint ACT_FK_VAR_BYTEARRAY
+ foreign key (BYTEARRAY_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+create table ACT_HI_VARINST (
+ ID_ varchar(64) not null,
+ REV_ integer default 1,
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ TASK_ID_ varchar(64),
+ NAME_ varchar(255) not null,
+ VAR_TYPE_ varchar(100),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double,
+ LONG_ bigint,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
+ META_INFO_ varchar(4000),
+ CREATE_TIME_ datetime(3),
+ LAST_UPDATED_TIME_ datetime(3),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_);
+create index ACT_IDX_HI_VAR_SCOPE_ID_TYPE on ACT_HI_VARINST(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_VAR_SUB_ID_TYPE on ACT_HI_VARINST(SUB_SCOPE_ID_, SCOPE_TYPE_);
+
+
+create table ACT_RU_EVENT_SUBSCR (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ EVENT_TYPE_ varchar(255) not null,
+ EVENT_NAME_ varchar(255),
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ ACTIVITY_ID_ varchar(64),
+ CONFIGURATION_ varchar(255),
+ CREATED_ timestamp(3) not null DEFAULT CURRENT_TIMESTAMP(3),
+ PROC_DEF_ID_ varchar(64),
+ SUB_SCOPE_ID_ varchar(64),
+ SCOPE_ID_ varchar(64),
+ SCOPE_DEFINITION_ID_ varchar(64),
+ SCOPE_DEFINITION_KEY_ varchar(255),
+ SCOPE_TYPE_ varchar(64),
+ LOCK_TIME_ timestamp(3) NULL,
+ LOCK_OWNER_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
+create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.mysql55.create.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.mysql55.create.common.sql
deleted file mode 100644
index bbdec94096f..00000000000
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.mysql55.create.common.sql
+++ /dev/null
@@ -1,22 +0,0 @@
-create table ACT_GE_PROPERTY (
- NAME_ varchar(64),
- VALUE_ varchar(300),
- REV_ integer,
- primary key (NAME_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_GE_BYTEARRAY (
- ID_ varchar(64),
- REV_ integer,
- NAME_ varchar(255),
- DEPLOYMENT_ID_ varchar(64),
- BYTES_ LONGBLOB,
- GENERATED_ TINYINT,
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-insert into ACT_GE_PROPERTY
-values ('common.schema.version', '7.1.0.0', 1);
-
-insert into ACT_GE_PROPERTY
-values ('next.dbid', '1', 1);
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.oracle.create.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.oracle.create.common.sql
index c4c3def0484..db635a59f65 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.oracle.create.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.oracle.create.common.sql
@@ -16,7 +16,590 @@ create table ACT_GE_BYTEARRAY (
);
insert into ACT_GE_PROPERTY
-values ('common.schema.version', '7.1.0.0', 1);
+values ('common.schema.version', '7.1.0.1', 1);
insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1);
+
+
+create table ACT_RU_ENTITYLINK (
+ ID_ NVARCHAR2(64),
+ REV_ INTEGER,
+ CREATE_TIME_ TIMESTAMP(6),
+ LINK_TYPE_ NVARCHAR2(255),
+ SCOPE_ID_ NVARCHAR2(255),
+ SUB_SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ SCOPE_DEFINITION_ID_ NVARCHAR2(255),
+ PARENT_ELEMENT_ID_ NVARCHAR2(255),
+ REF_SCOPE_ID_ NVARCHAR2(255),
+ REF_SCOPE_TYPE_ NVARCHAR2(255),
+ REF_SCOPE_DEFINITION_ID_ NVARCHAR2(255),
+ ROOT_SCOPE_ID_ NVARCHAR2(255),
+ ROOT_SCOPE_TYPE_ NVARCHAR2(255),
+ HIERARCHY_TYPE_ NVARCHAR2(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_ENT_LNK_SCOPE on ACT_RU_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_REF_SCOPE on ACT_RU_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_ROOT_SCOPE on ACT_RU_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_SCOPE_DEF on ACT_RU_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
+
+create table ACT_HI_ENTITYLINK (
+ ID_ NVARCHAR2(64),
+ LINK_TYPE_ NVARCHAR2(255),
+ CREATE_TIME_ TIMESTAMP(6),
+ SCOPE_ID_ NVARCHAR2(255),
+ SUB_SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ SCOPE_DEFINITION_ID_ NVARCHAR2(255),
+ PARENT_ELEMENT_ID_ NVARCHAR2(255),
+ REF_SCOPE_ID_ NVARCHAR2(255),
+ REF_SCOPE_TYPE_ NVARCHAR2(255),
+ REF_SCOPE_DEFINITION_ID_ NVARCHAR2(255),
+ ROOT_SCOPE_ID_ NVARCHAR2(255),
+ ROOT_SCOPE_TYPE_ NVARCHAR2(255),
+ HIERARCHY_TYPE_ NVARCHAR2(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_ENT_LNK_SCOPE on ACT_HI_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_REF_SCOPE on ACT_HI_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_ROOT_SCOPE on ACT_HI_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_SCOPE_DEF on ACT_HI_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
+
+
+create table ACT_RU_IDENTITYLINK (
+ ID_ NVARCHAR2(64),
+ REV_ INTEGER,
+ GROUP_ID_ NVARCHAR2(255),
+ TYPE_ NVARCHAR2(255),
+ USER_ID_ NVARCHAR2(255),
+ TASK_ID_ NVARCHAR2(64),
+ PROC_INST_ID_ NVARCHAR2(64),
+ PROC_DEF_ID_ NVARCHAR2(64),
+ SCOPE_ID_ NVARCHAR2(255),
+ SUB_SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ SCOPE_DEFINITION_ID_ NVARCHAR2(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
+create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_HI_IDENTITYLINK (
+ ID_ NVARCHAR2(64),
+ GROUP_ID_ NVARCHAR2(255),
+ TYPE_ NVARCHAR2(255),
+ USER_ID_ NVARCHAR2(255),
+ TASK_ID_ NVARCHAR2(64),
+ CREATE_TIME_ TIMESTAMP(6),
+ PROC_INST_ID_ NVARCHAR2(64),
+ SCOPE_ID_ NVARCHAR2(255),
+ SUB_SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ SCOPE_DEFINITION_ID_ NVARCHAR2(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+
+create table ACT_RU_JOB (
+ ID_ NVARCHAR2(64) NOT NULL,
+ REV_ INTEGER,
+ CATEGORY_ NVARCHAR2(255),
+ TYPE_ NVARCHAR2(255) NOT NULL,
+ LOCK_EXP_TIME_ TIMESTAMP(6),
+ LOCK_OWNER_ NVARCHAR2(255),
+ EXCLUSIVE_ NUMBER(1,0) CHECK (EXCLUSIVE_ IN (1,0)),
+ EXECUTION_ID_ NVARCHAR2(64),
+ PROCESS_INSTANCE_ID_ NVARCHAR2(64),
+ PROC_DEF_ID_ NVARCHAR2(64),
+ ELEMENT_ID_ NVARCHAR2(255),
+ ELEMENT_NAME_ NVARCHAR2(255),
+ SCOPE_ID_ NVARCHAR2(255),
+ SUB_SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ SCOPE_DEFINITION_ID_ NVARCHAR2(255),
+ CORRELATION_ID_ NVARCHAR2(255),
+ RETRIES_ INTEGER,
+ EXCEPTION_STACK_ID_ NVARCHAR2(64),
+ EXCEPTION_MSG_ NVARCHAR2(2000),
+ DUEDATE_ TIMESTAMP(6),
+ REPEAT_ NVARCHAR2(255),
+ HANDLER_TYPE_ NVARCHAR2(255),
+ HANDLER_CFG_ NVARCHAR2(2000),
+ CUSTOM_VALUES_ID_ NVARCHAR2(64),
+ CREATE_TIME_ TIMESTAMP(6),
+ TENANT_ID_ NVARCHAR2(255) DEFAULT '',
+ primary key (ID_)
+);
+
+create table ACT_RU_TIMER_JOB (
+ ID_ NVARCHAR2(64) NOT NULL,
+ REV_ INTEGER,
+ CATEGORY_ NVARCHAR2(255),
+ TYPE_ NVARCHAR2(255) NOT NULL,
+ LOCK_EXP_TIME_ TIMESTAMP(6),
+ LOCK_OWNER_ NVARCHAR2(255),
+ EXCLUSIVE_ NUMBER(1,0) CHECK (EXCLUSIVE_ IN (1,0)),
+ EXECUTION_ID_ NVARCHAR2(64),
+ PROCESS_INSTANCE_ID_ NVARCHAR2(64),
+ PROC_DEF_ID_ NVARCHAR2(64),
+ ELEMENT_ID_ NVARCHAR2(255),
+ ELEMENT_NAME_ NVARCHAR2(255),
+ SCOPE_ID_ NVARCHAR2(255),
+ SUB_SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ SCOPE_DEFINITION_ID_ NVARCHAR2(255),
+ CORRELATION_ID_ NVARCHAR2(255),
+ RETRIES_ INTEGER,
+ EXCEPTION_STACK_ID_ NVARCHAR2(64),
+ EXCEPTION_MSG_ NVARCHAR2(2000),
+ DUEDATE_ TIMESTAMP(6),
+ REPEAT_ NVARCHAR2(255),
+ HANDLER_TYPE_ NVARCHAR2(255),
+ HANDLER_CFG_ NVARCHAR2(2000),
+ CUSTOM_VALUES_ID_ NVARCHAR2(64),
+ CREATE_TIME_ TIMESTAMP(6),
+ TENANT_ID_ NVARCHAR2(255) DEFAULT '',
+ primary key (ID_)
+);
+
+create table ACT_RU_SUSPENDED_JOB (
+ ID_ NVARCHAR2(64) NOT NULL,
+ REV_ INTEGER,
+ CATEGORY_ NVARCHAR2(255),
+ TYPE_ NVARCHAR2(255) NOT NULL,
+ EXCLUSIVE_ NUMBER(1,0) CHECK (EXCLUSIVE_ IN (1,0)),
+ EXECUTION_ID_ NVARCHAR2(64),
+ PROCESS_INSTANCE_ID_ NVARCHAR2(64),
+ PROC_DEF_ID_ NVARCHAR2(64),
+ ELEMENT_ID_ NVARCHAR2(255),
+ ELEMENT_NAME_ NVARCHAR2(255),
+ SCOPE_ID_ NVARCHAR2(255),
+ SUB_SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ SCOPE_DEFINITION_ID_ NVARCHAR2(255),
+ CORRELATION_ID_ NVARCHAR2(255),
+ RETRIES_ INTEGER,
+ EXCEPTION_STACK_ID_ NVARCHAR2(64),
+ EXCEPTION_MSG_ NVARCHAR2(2000),
+ DUEDATE_ TIMESTAMP(6),
+ REPEAT_ NVARCHAR2(255),
+ HANDLER_TYPE_ NVARCHAR2(255),
+ HANDLER_CFG_ NVARCHAR2(2000),
+ CUSTOM_VALUES_ID_ NVARCHAR2(64),
+ CREATE_TIME_ TIMESTAMP(6),
+ TENANT_ID_ NVARCHAR2(255) DEFAULT '',
+ primary key (ID_)
+);
+
+create table ACT_RU_DEADLETTER_JOB (
+ ID_ NVARCHAR2(64) NOT NULL,
+ REV_ INTEGER,
+ CATEGORY_ NVARCHAR2(255),
+ TYPE_ NVARCHAR2(255) NOT NULL,
+ EXCLUSIVE_ NUMBER(1,0) CHECK (EXCLUSIVE_ IN (1,0)),
+ EXECUTION_ID_ NVARCHAR2(64),
+ PROCESS_INSTANCE_ID_ NVARCHAR2(64),
+ PROC_DEF_ID_ NVARCHAR2(64),
+ ELEMENT_ID_ NVARCHAR2(255),
+ ELEMENT_NAME_ NVARCHAR2(255),
+ SCOPE_ID_ NVARCHAR2(255),
+ SUB_SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ SCOPE_DEFINITION_ID_ NVARCHAR2(255),
+ CORRELATION_ID_ NVARCHAR2(255),
+ EXCEPTION_STACK_ID_ NVARCHAR2(64),
+ EXCEPTION_MSG_ NVARCHAR2(2000),
+ DUEDATE_ TIMESTAMP(6),
+ REPEAT_ NVARCHAR2(255),
+ HANDLER_TYPE_ NVARCHAR2(255),
+ HANDLER_CFG_ NVARCHAR2(2000),
+ CUSTOM_VALUES_ID_ NVARCHAR2(64),
+ CREATE_TIME_ TIMESTAMP(6),
+ TENANT_ID_ NVARCHAR2(255) DEFAULT '',
+ primary key (ID_)
+);
+
+create table ACT_RU_HISTORY_JOB (
+ ID_ NVARCHAR2(64) NOT NULL,
+ REV_ INTEGER,
+ LOCK_EXP_TIME_ TIMESTAMP(6),
+ LOCK_OWNER_ NVARCHAR2(255),
+ RETRIES_ INTEGER,
+ EXCEPTION_STACK_ID_ NVARCHAR2(64),
+ EXCEPTION_MSG_ NVARCHAR2(2000),
+ HANDLER_TYPE_ NVARCHAR2(255),
+ HANDLER_CFG_ NVARCHAR2(2000),
+ CUSTOM_VALUES_ID_ NVARCHAR2(64),
+ ADV_HANDLER_CFG_ID_ NVARCHAR2(64),
+ CREATE_TIME_ TIMESTAMP(6),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ TENANT_ID_ NVARCHAR2(255) DEFAULT '',
+ primary key (ID_)
+);
+
+create table ACT_RU_EXTERNAL_JOB (
+ ID_ NVARCHAR2(64) NOT NULL,
+ REV_ INTEGER,
+ CATEGORY_ NVARCHAR2(255),
+ TYPE_ NVARCHAR2(255) NOT NULL,
+ LOCK_EXP_TIME_ TIMESTAMP(6),
+ LOCK_OWNER_ NVARCHAR2(255),
+ EXCLUSIVE_ NUMBER(1,0) CHECK (EXCLUSIVE_ IN (1,0)),
+ EXECUTION_ID_ NVARCHAR2(64),
+ PROCESS_INSTANCE_ID_ NVARCHAR2(64),
+ PROC_DEF_ID_ NVARCHAR2(64),
+ ELEMENT_ID_ NVARCHAR2(255),
+ ELEMENT_NAME_ NVARCHAR2(255),
+ SCOPE_ID_ NVARCHAR2(255),
+ SUB_SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ SCOPE_DEFINITION_ID_ NVARCHAR2(255),
+ CORRELATION_ID_ NVARCHAR2(255),
+ RETRIES_ INTEGER,
+ EXCEPTION_STACK_ID_ NVARCHAR2(64),
+ EXCEPTION_MSG_ NVARCHAR2(2000),
+ DUEDATE_ TIMESTAMP(6),
+ REPEAT_ NVARCHAR2(255),
+ HANDLER_TYPE_ NVARCHAR2(255),
+ HANDLER_CFG_ NVARCHAR2(2000),
+ CUSTOM_VALUES_ID_ NVARCHAR2(64),
+ CREATE_TIME_ TIMESTAMP(6),
+ TENANT_ID_ NVARCHAR2(255) DEFAULT '',
+ primary key (ID_)
+);
+
+create index ACT_IDX_JOB_EXCEPTION on ACT_RU_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_JOB_CUSTOM_VAL_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_TJOB_EXCEPTION on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_TJOB_CUSTOM_VAL_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_TJOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_SJOB_EXCEPTION on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_SJOB_CUSTOM_VAL_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_SJOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_DJOB_EXCEPTION on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_DJOB_CUSTOM_VAL_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_DJOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_EJOB_EXCEPTION on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_EJOB_CUSTOM_VAL_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_EJOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_CUSTOM_VAL
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_TIMER_JOB
+ add constraint ACT_FK_TJOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_TIMER_JOB
+ add constraint ACT_FK_TJOB_CUSTOM_VAL
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_SUSPENDED_JOB
+ add constraint ACT_FK_SJOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_SUSPENDED_JOB
+ add constraint ACT_FK_SJOB_CUSTOM_VAL
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_DEADLETTER_JOB
+ add constraint ACT_FK_DJOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_DEADLETTER_JOB
+ add constraint ACT_FK_DJOB_CUSTOM_VAL
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EXTERNAL_JOB
+ add constraint ACT_FK_EJOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EXTERNAL_JOB
+ add constraint ACT_FK_EJOB_CUSTOM_VAL
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
+
+create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table FLW_RU_BATCH (
+ ID_ NVARCHAR2(64) not null,
+ REV_ INTEGER,
+ TYPE_ NVARCHAR2(64) not null,
+ SEARCH_KEY_ NVARCHAR2(255),
+ SEARCH_KEY2_ NVARCHAR2(255),
+ CREATE_TIME_ TIMESTAMP(6) not null,
+ COMPLETE_TIME_ TIMESTAMP(6),
+ STATUS_ NVARCHAR2(255),
+ BATCH_DOC_ID_ NVARCHAR2(64),
+ TENANT_ID_ NVARCHAR2(255) default '',
+ primary key (ID_)
+);
+
+create table FLW_RU_BATCH_PART (
+ ID_ NVARCHAR2(64) not null,
+ REV_ INTEGER,
+ BATCH_ID_ NVARCHAR2(64),
+ TYPE_ NVARCHAR2(64) not null,
+ SCOPE_ID_ NVARCHAR2(64),
+ SUB_SCOPE_ID_ NVARCHAR2(64),
+ SCOPE_TYPE_ NVARCHAR2(64),
+ SEARCH_KEY_ NVARCHAR2(255),
+ SEARCH_KEY2_ NVARCHAR2(255),
+ CREATE_TIME_ TIMESTAMP(6) not null,
+ COMPLETE_TIME_ TIMESTAMP(6),
+ STATUS_ NVARCHAR2(255),
+ RESULT_DOC_ID_ NVARCHAR2(64),
+ TENANT_ID_ NVARCHAR2(255) default '',
+ primary key (ID_)
+);
+
+create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
+
+alter table FLW_RU_BATCH_PART
+ add constraint FLW_FK_BATCH_PART_PARENT
+ foreign key (BATCH_ID_)
+ references FLW_RU_BATCH (ID_);
+
+create table ACT_RU_TASK (
+ ID_ NVARCHAR2(64),
+ REV_ INTEGER,
+ EXECUTION_ID_ NVARCHAR2(64),
+ PROC_INST_ID_ NVARCHAR2(64),
+ PROC_DEF_ID_ NVARCHAR2(64),
+ TASK_DEF_ID_ NVARCHAR2(64),
+ SCOPE_ID_ NVARCHAR2(255),
+ SUB_SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ SCOPE_DEFINITION_ID_ NVARCHAR2(255),
+ PROPAGATED_STAGE_INST_ID_ NVARCHAR2(255),
+ STATE_ NVARCHAR2(255),
+ NAME_ NVARCHAR2(255),
+ PARENT_TASK_ID_ NVARCHAR2(64),
+ DESCRIPTION_ NVARCHAR2(2000),
+ TASK_DEF_KEY_ NVARCHAR2(255),
+ OWNER_ NVARCHAR2(255),
+ ASSIGNEE_ NVARCHAR2(255),
+ DELEGATION_ NVARCHAR2(64),
+ PRIORITY_ INTEGER,
+ CREATE_TIME_ TIMESTAMP(6),
+ IN_PROGRESS_TIME_ TIMESTAMP(6),
+ IN_PROGRESS_STARTED_BY_ NVARCHAR2(255),
+ CLAIM_TIME_ TIMESTAMP(6),
+ CLAIMED_BY_ NVARCHAR2(255),
+ SUSPENDED_TIME_ TIMESTAMP(6),
+ SUSPENDED_BY_ NVARCHAR2(255),
+ IN_PROGRESS_DUE_DATE_ TIMESTAMP(6),
+ DUE_DATE_ TIMESTAMP(6),
+ CATEGORY_ NVARCHAR2(255),
+ SUSPENSION_STATE_ INTEGER,
+ TENANT_ID_ NVARCHAR2(255) DEFAULT '',
+ FORM_KEY_ NVARCHAR2(255),
+ IS_COUNT_ENABLED_ NUMBER(1,0) CHECK (IS_COUNT_ENABLED_ IN (1,0)),
+ VAR_COUNT_ INTEGER,
+ ID_LINK_COUNT_ INTEGER,
+ SUB_TASK_COUNT_ INTEGER,
+ primary key (ID_)
+);
+
+create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_);
+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_);
+create index ACT_IDX_TASK_SCOPE_DEF on ACT_RU_TASK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_HI_TASKINST (
+ ID_ NVARCHAR2(64) not null,
+ REV_ INTEGER default 1,
+ PROC_DEF_ID_ NVARCHAR2(64),
+ TASK_DEF_ID_ NVARCHAR2(64),
+ TASK_DEF_KEY_ NVARCHAR2(255),
+ PROC_INST_ID_ NVARCHAR2(64),
+ EXECUTION_ID_ NVARCHAR2(64),
+ SCOPE_ID_ NVARCHAR2(255),
+ SUB_SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ SCOPE_DEFINITION_ID_ NVARCHAR2(255),
+ PROPAGATED_STAGE_INST_ID_ NVARCHAR2(255),
+ PARENT_TASK_ID_ NVARCHAR2(64),
+ STATE_ NVARCHAR2(255),
+ NAME_ NVARCHAR2(255),
+ DESCRIPTION_ NVARCHAR2(2000),
+ OWNER_ NVARCHAR2(255),
+ ASSIGNEE_ NVARCHAR2(255),
+ START_TIME_ TIMESTAMP(6) not null,
+ IN_PROGRESS_TIME_ TIMESTAMP(6),
+ IN_PROGRESS_STARTED_BY_ NVARCHAR2(255),
+ CLAIM_TIME_ TIMESTAMP(6),
+ CLAIMED_BY_ NVARCHAR2(255),
+ SUSPENDED_TIME_ TIMESTAMP(6),
+ SUSPENDED_BY_ NVARCHAR2(255),
+ END_TIME_ TIMESTAMP(6),
+ COMPLETED_BY_ NVARCHAR2(255),
+ DURATION_ NUMBER(19,0),
+ DELETE_REASON_ NVARCHAR2(2000),
+ PRIORITY_ INTEGER,
+ IN_PROGRESS_DUE_DATE_ TIMESTAMP(6),
+ DUE_DATE_ TIMESTAMP(6),
+ FORM_KEY_ NVARCHAR2(255),
+ CATEGORY_ NVARCHAR2(255),
+ TENANT_ID_ NVARCHAR2(255) default '',
+ LAST_UPDATED_TIME_ TIMESTAMP(6),
+ primary key (ID_)
+);
+
+create table ACT_HI_TSK_LOG (
+ ID_ NUMBER(19),
+ TYPE_ NVARCHAR2(64),
+ TASK_ID_ NVARCHAR2(64) not null,
+ TIME_STAMP_ TIMESTAMP(6) not null,
+ USER_ID_ NVARCHAR2(255),
+ DATA_ NVARCHAR2(2000),
+ EXECUTION_ID_ NVARCHAR2(64),
+ PROC_INST_ID_ NVARCHAR2(64),
+ PROC_DEF_ID_ NVARCHAR2(64),
+ SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_DEFINITION_ID_ NVARCHAR2(255),
+ SUB_SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ TENANT_ID_ NVARCHAR2(255) default '',
+ primary key (ID_)
+);
+
+create sequence act_hi_task_evt_log_seq start with 1 increment by 1;
+
+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_);
+create index ACT_IDX_HI_TASK_SCOPE_DEF on ACT_HI_TASKINST(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+create index ACT_IDX_ACT_HI_TSK_LOG_TASK on ACT_HI_TSK_LOG(TASK_ID_);
+
+create table ACT_RU_VARIABLE (
+ ID_ NVARCHAR2(64) not null,
+ REV_ INTEGER,
+ TYPE_ NVARCHAR2(255) not null,
+ NAME_ NVARCHAR2(255) not null,
+ EXECUTION_ID_ NVARCHAR2(64),
+ PROC_INST_ID_ NVARCHAR2(64),
+ TASK_ID_ NVARCHAR2(64),
+ SCOPE_ID_ NVARCHAR2(255),
+ SUB_SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ BYTEARRAY_ID_ NVARCHAR2(64),
+ DOUBLE_ NUMBER(*,10),
+ LONG_ NUMBER(19,0),
+ TEXT_ NVARCHAR2(2000),
+ TEXT2_ NVARCHAR2(2000),
+ META_INFO_ NVARCHAR2(2000),
+ primary key (ID_)
+);
+
+create index ACT_IDX_RU_VAR_SCOPE_ID_TYPE on ACT_RU_VARIABLE(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_RU_VAR_SUB_ID_TYPE on ACT_RU_VARIABLE(SUB_SCOPE_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_VAR_BYTEARRAY on ACT_RU_VARIABLE(BYTEARRAY_ID_);
+alter table ACT_RU_VARIABLE
+ add constraint ACT_FK_VAR_BYTEARRAY
+ foreign key (BYTEARRAY_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+create table ACT_HI_VARINST (
+ ID_ NVARCHAR2(64) not null,
+ REV_ INTEGER default 1,
+ PROC_INST_ID_ NVARCHAR2(64),
+ EXECUTION_ID_ NVARCHAR2(64),
+ TASK_ID_ NVARCHAR2(64),
+ NAME_ NVARCHAR2(255) not null,
+ VAR_TYPE_ NVARCHAR2(100),
+ SCOPE_ID_ NVARCHAR2(255),
+ SUB_SCOPE_ID_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(255),
+ BYTEARRAY_ID_ NVARCHAR2(64),
+ DOUBLE_ NUMBER(*,10),
+ LONG_ NUMBER(19,0),
+ TEXT_ NVARCHAR2(2000),
+ TEXT2_ NVARCHAR2(2000),
+ META_INFO_ NVARCHAR2(2000),
+ CREATE_TIME_ TIMESTAMP(6),
+ LAST_UPDATED_TIME_ TIMESTAMP(6),
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_);
+create index ACT_IDX_HI_VAR_SCOPE_ID_TYPE on ACT_HI_VARINST(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_VAR_SUB_ID_TYPE on ACT_HI_VARINST(SUB_SCOPE_ID_, SCOPE_TYPE_);
+
+
+create table ACT_RU_EVENT_SUBSCR (
+ ID_ NVARCHAR2(64) not null,
+ REV_ integer,
+ EVENT_TYPE_ NVARCHAR2(255) not null,
+ EVENT_NAME_ NVARCHAR2(255),
+ EXECUTION_ID_ NVARCHAR2(64),
+ PROC_INST_ID_ NVARCHAR2(64),
+ ACTIVITY_ID_ NVARCHAR2(64),
+ CONFIGURATION_ NVARCHAR2(255),
+ CREATED_ TIMESTAMP(6) not null,
+ PROC_DEF_ID_ NVARCHAR2(64),
+ SUB_SCOPE_ID_ NVARCHAR2(64),
+ SCOPE_ID_ NVARCHAR2(64),
+ SCOPE_DEFINITION_ID_ NVARCHAR2(64),
+ SCOPE_DEFINITION_KEY_ NVARCHAR2(255),
+ SCOPE_TYPE_ NVARCHAR2(64),
+ LOCK_TIME_ TIMESTAMP(6),
+ LOCK_OWNER_ NVARCHAR2(255),
+ TENANT_ID_ NVARCHAR2(255) DEFAULT '',
+ primary key (ID_)
+);
+
+create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
+create index ACT_IDX_EVENT_SUBSCR on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_);
+create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.postgres.create.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.postgres.create.common.sql
index ad762197d08..87c6c5fd55d 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.postgres.create.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/create/flowable.postgres.create.common.sql
@@ -16,7 +16,587 @@ create table ACT_GE_BYTEARRAY (
);
insert into ACT_GE_PROPERTY
-values ('common.schema.version', '7.1.0.0', 1);
+values ('common.schema.version', '7.1.0.1', 1);
insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1);
+
+
+create table ACT_RU_ENTITYLINK (
+ ID_ varchar(64),
+ REV_ integer,
+ CREATE_TIME_ timestamp,
+ LINK_TYPE_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PARENT_ELEMENT_ID_ varchar(255),
+ REF_SCOPE_ID_ varchar(255),
+ REF_SCOPE_TYPE_ varchar(255),
+ REF_SCOPE_DEFINITION_ID_ varchar(255),
+ ROOT_SCOPE_ID_ varchar(255),
+ ROOT_SCOPE_TYPE_ varchar(255),
+ HIERARCHY_TYPE_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_ENT_LNK_SCOPE on ACT_RU_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_REF_SCOPE on ACT_RU_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_ROOT_SCOPE on ACT_RU_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_ENT_LNK_SCOPE_DEF on ACT_RU_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
+
+create table ACT_HI_ENTITYLINK (
+ ID_ varchar(64),
+ LINK_TYPE_ varchar(255),
+ CREATE_TIME_ timestamp,
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PARENT_ELEMENT_ID_ varchar(255),
+ REF_SCOPE_ID_ varchar(255),
+ REF_SCOPE_TYPE_ varchar(255),
+ REF_SCOPE_DEFINITION_ID_ varchar(255),
+ ROOT_SCOPE_ID_ varchar(255),
+ ROOT_SCOPE_TYPE_ varchar(255),
+ HIERARCHY_TYPE_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_ENT_LNK_SCOPE on ACT_HI_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_REF_SCOPE on ACT_HI_ENTITYLINK(REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_ROOT_SCOPE on ACT_HI_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
+create index ACT_IDX_HI_ENT_LNK_SCOPE_DEF on ACT_HI_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
+
+
+create table ACT_RU_IDENTITYLINK (
+ ID_ varchar(64),
+ REV_ integer,
+ GROUP_ID_ varchar(255),
+ TYPE_ varchar(255),
+ USER_ID_ varchar(255),
+ TASK_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar (64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
+create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_HI_IDENTITYLINK (
+ ID_ varchar(64),
+ GROUP_ID_ varchar(255),
+ TYPE_ varchar(255),
+ USER_ID_ varchar(255),
+ TASK_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ PROC_INST_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
+create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+
+create table ACT_RU_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_TIMER_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_SUSPENDED_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_DEADLETTER_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_HISTORY_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ ADV_HANDLER_CFG_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ SCOPE_TYPE_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table ACT_RU_EXTERNAL_JOB (
+ ID_ varchar(64) NOT NULL,
+ REV_ integer,
+ CATEGORY_ varchar(255),
+ TYPE_ varchar(255) NOT NULL,
+ LOCK_EXP_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ EXCLUSIVE_ boolean,
+ EXECUTION_ID_ varchar(64),
+ PROCESS_INSTANCE_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ ELEMENT_ID_ varchar(255),
+ ELEMENT_NAME_ varchar(255),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ CORRELATION_ID_ varchar(255),
+ RETRIES_ integer,
+ EXCEPTION_STACK_ID_ varchar(64),
+ EXCEPTION_MSG_ varchar(4000),
+ DUEDATE_ timestamp,
+ REPEAT_ varchar(255),
+ HANDLER_TYPE_ varchar(255),
+ HANDLER_CFG_ varchar(4000),
+ CUSTOM_VALUES_ID_ varchar(64),
+ CREATE_TIME_ timestamp,
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create index ACT_IDX_JOB_EXCEPTION_STACK_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
+create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
+
+create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
+
+create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
+create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
+create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_JOB
+ add constraint ACT_FK_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_TIMER_JOB
+ add constraint ACT_FK_TIMER_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_TIMER_JOB
+ add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_SUSPENDED_JOB
+ add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_SUSPENDED_JOB
+ add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_DEADLETTER_JOB
+ add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_DEADLETTER_JOB
+ add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EXTERNAL_JOB
+ add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
+ foreign key (EXCEPTION_STACK_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+alter table ACT_RU_EXTERNAL_JOB
+ add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
+ foreign key (CUSTOM_VALUES_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table FLW_RU_BATCH (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ TYPE_ varchar(64) not null,
+ SEARCH_KEY_ varchar(255),
+ SEARCH_KEY2_ varchar(255),
+ CREATE_TIME_ timestamp not null,
+ COMPLETE_TIME_ timestamp,
+ STATUS_ varchar(255),
+ BATCH_DOC_ID_ varchar(64),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create table FLW_RU_BATCH_PART (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ BATCH_ID_ varchar(64),
+ TYPE_ varchar(64) not null,
+ SCOPE_ID_ varchar(64),
+ SUB_SCOPE_ID_ varchar(64),
+ SCOPE_TYPE_ varchar(64),
+ SEARCH_KEY_ varchar(255),
+ SEARCH_KEY2_ varchar(255),
+ CREATE_TIME_ timestamp not null,
+ COMPLETE_TIME_ timestamp,
+ STATUS_ varchar(255),
+ RESULT_DOC_ID_ varchar(64),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
+
+alter table FLW_RU_BATCH_PART
+ add constraint FLW_FK_BATCH_PART_PARENT
+ foreign key (BATCH_ID_)
+ references FLW_RU_BATCH (ID_);
+
+create table ACT_RU_TASK (
+ ID_ varchar(64),
+ REV_ integer,
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ TASK_DEF_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PROPAGATED_STAGE_INST_ID_ varchar(255),
+ STATE_ varchar(255),
+ NAME_ varchar(255),
+ PARENT_TASK_ID_ varchar(64),
+ DESCRIPTION_ varchar(4000),
+ TASK_DEF_KEY_ varchar(255),
+ OWNER_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ DELEGATION_ varchar(64),
+ PRIORITY_ integer,
+ CREATE_TIME_ timestamp,
+ IN_PROGRESS_TIME_ timestamp,
+ IN_PROGRESS_STARTED_BY_ varchar(255),
+ CLAIM_TIME_ timestamp,
+ CLAIMED_BY_ varchar(255),
+ SUSPENDED_TIME_ timestamp,
+ SUSPENDED_BY_ varchar(255),
+ IN_PROGRESS_DUE_DATE_ timestamp,
+ DUE_DATE_ timestamp,
+ CATEGORY_ varchar(255),
+ SUSPENSION_STATE_ integer,
+ TENANT_ID_ varchar(255) default '',
+ FORM_KEY_ varchar(255),
+ IS_COUNT_ENABLED_ boolean,
+ VAR_COUNT_ integer,
+ ID_LINK_COUNT_ integer,
+ SUB_TASK_COUNT_ integer,
+ primary key (ID_)
+);
+
+create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_);
+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_);
+create index ACT_IDX_TASK_SCOPE_DEF on ACT_RU_TASK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+
+create table ACT_HI_TASKINST (
+ ID_ varchar(64) not null,
+ REV_ integer default 1,
+ PROC_DEF_ID_ varchar(64),
+ TASK_DEF_ID_ varchar(64),
+ TASK_DEF_KEY_ varchar(255),
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ PROPAGATED_STAGE_INST_ID_ varchar(255),
+ STATE_ varchar(255),
+ NAME_ varchar(255),
+ PARENT_TASK_ID_ varchar(64),
+ DESCRIPTION_ varchar(4000),
+ OWNER_ varchar(255),
+ ASSIGNEE_ varchar(255),
+ START_TIME_ timestamp not null,
+ IN_PROGRESS_TIME_ timestamp,
+ IN_PROGRESS_STARTED_BY_ varchar(255),
+ CLAIM_TIME_ timestamp,
+ CLAIMED_BY_ varchar(255),
+ SUSPENDED_TIME_ timestamp,
+ SUSPENDED_BY_ varchar(255),
+ END_TIME_ timestamp,
+ COMPLETED_BY_ varchar(255),
+ DURATION_ bigint,
+ DELETE_REASON_ varchar(4000),
+ PRIORITY_ integer,
+ IN_PROGRESS_DUE_DATE_ timestamp,
+ DUE_DATE_ timestamp,
+ FORM_KEY_ varchar(255),
+ CATEGORY_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ LAST_UPDATED_TIME_ timestamp,
+ primary key (ID_)
+);
+
+create table ACT_HI_TSK_LOG (
+ ID_ SERIAL PRIMARY KEY,
+ TYPE_ varchar(64),
+ TASK_ID_ varchar(64) not null,
+ TIME_STAMP_ timestamp not null,
+ USER_ID_ varchar(255),
+ DATA_ varchar(4000),
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SCOPE_DEFINITION_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ TENANT_ID_ varchar(255) default ''
+);
+
+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_);
+create index ACT_IDX_HI_TASK_SCOPE_DEF on ACT_HI_TASKINST(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
+create index ACT_IDX_ACT_HI_TSK_LOG_TASK on ACT_HI_TSK_LOG(TASK_ID_);
+
+create table ACT_RU_VARIABLE (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ TYPE_ varchar(255) not null,
+ NAME_ varchar(255) not null,
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ TASK_ID_ varchar(64),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double precision,
+ LONG_ bigint,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
+ META_INFO_ varchar(4000),
+ primary key (ID_)
+);
+
+create index ACT_IDX_RU_VAR_SCOPE_ID_TYPE on ACT_RU_VARIABLE(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_RU_VAR_SUB_ID_TYPE on ACT_RU_VARIABLE(SUB_SCOPE_ID_, SCOPE_TYPE_);
+
+create index ACT_IDX_VAR_BYTEARRAY on ACT_RU_VARIABLE(BYTEARRAY_ID_);
+alter table ACT_RU_VARIABLE
+ add constraint ACT_FK_VAR_BYTEARRAY
+ foreign key (BYTEARRAY_ID_)
+ references ACT_GE_BYTEARRAY (ID_);
+
+create table ACT_HI_VARINST (
+ ID_ varchar(64) not null,
+ REV_ integer default 1,
+ PROC_INST_ID_ varchar(64),
+ EXECUTION_ID_ varchar(64),
+ TASK_ID_ varchar(64),
+ NAME_ varchar(255) not null,
+ VAR_TYPE_ varchar(100),
+ SCOPE_ID_ varchar(255),
+ SUB_SCOPE_ID_ varchar(255),
+ SCOPE_TYPE_ varchar(255),
+ BYTEARRAY_ID_ varchar(64),
+ DOUBLE_ double precision,
+ LONG_ bigint,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
+ META_INFO_ varchar(4000),
+ CREATE_TIME_ timestamp,
+ LAST_UPDATED_TIME_ timestamp,
+ primary key (ID_)
+);
+
+create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_);
+create index ACT_IDX_HI_VAR_SCOPE_ID_TYPE on ACT_HI_VARINST(SCOPE_ID_, SCOPE_TYPE_);
+create index ACT_IDX_HI_VAR_SUB_ID_TYPE on ACT_HI_VARINST(SUB_SCOPE_ID_, SCOPE_TYPE_);
+
+
+create table ACT_RU_EVENT_SUBSCR (
+ ID_ varchar(64) not null,
+ REV_ integer,
+ EVENT_TYPE_ varchar(255) not null,
+ EVENT_NAME_ varchar(255),
+ EXECUTION_ID_ varchar(64),
+ PROC_INST_ID_ varchar(64),
+ ACTIVITY_ID_ varchar(64),
+ CONFIGURATION_ varchar(255),
+ CREATED_ timestamp not null,
+ PROC_DEF_ID_ varchar(64),
+ SUB_SCOPE_ID_ varchar(64),
+ SCOPE_ID_ varchar(64),
+ SCOPE_DEFINITION_ID_ varchar(64),
+ SCOPE_DEFINITION_KEY_ varchar(255),
+ SCOPE_TYPE_ varchar(64),
+ LOCK_TIME_ timestamp,
+ LOCK_OWNER_ varchar(255),
+ TENANT_ID_ varchar(255) default '',
+ primary key (ID_)
+);
+
+create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
+create index ACT_IDX_EVENT_SUBSCR on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_);
+create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.cockroachdb.drop.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.cockroachdb.drop.common.sql
index df96f4db2ed..172ad175490 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.cockroachdb.drop.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.cockroachdb.drop.common.sql
@@ -1,4 +1,38 @@
+drop table if exists flw_ru_batch_part cascade;
+drop table if exists flw_ru_batch cascade;
+
+-- force-commit
+
+drop table if exists act_ru_entitylink cascade;
+
+-- force-commit
+
+drop table if exists ACT_RU_EVENT_SUBSCR cascade;
+
+drop table if exists act_ru_identitylink cascade;
+
+-- force-commit
+
+drop table if exists act_ru_job cascade;
+drop table if exists act_ru_timer_job cascade;
+drop table if exists act_ru_suspended_job cascade;
+drop table if exists act_ru_deadletter_job cascade;
+drop table if exists act_ru_history_job cascade;
+drop table if exists act_ru_external_job cascade;
+
+-- force-commit
+
+drop table if exists act_ru_task cascade;
+
+-- force-commit
+
+
+drop table if exists act_ru_variable cascade;
+
+-- force-commit
+
drop table if exists act_ge_bytearray cascade;
drop table if exists act_ge_property cascade;
--- force-commit
\ No newline at end of file
+-- force-commit
+
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.db2.drop.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.db2.drop.common.sql
index 5f8ef049b28..3fea75eeccd 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.db2.drop.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.db2.drop.common.sql
@@ -1,2 +1,97 @@
+drop index FLW_IDX_BATCH_PART;
+
+drop table FLW_RU_BATCH_PART;
+drop table FLW_RU_BATCH;
+
+drop index ACT_IDX_ENT_LNK_SCOPE;
+drop index ACT_IDX_ENT_LNK_SCOPE_DEF;
+
+drop table ACT_RU_ENTITYLINK;
+
+drop index ACT_IDX_EVENT_SUBSCR_CONFIG_;
+drop index ACT_IDX_EVENT_SUBSCR_EXEC_ID;
+drop index ACT_IDX_EVENT_SUBSCR_SCOPEREF_;
+
+drop table ACT_RU_EVENT_SUBSCR;
+
+drop index ACT_IDX_IDENT_LNK_USER;
+drop index ACT_IDX_IDENT_LNK_GROUP;
+drop index ACT_IDX_IDENT_LNK_SCOPE;
+drop index ACT_IDX_IDENT_LNK_SUB_SCOPE;
+drop index ACT_IDX_IDENT_LNK_SCOPE_DEF;
+
+drop table ACT_RU_IDENTITYLINK;
+
+drop index ACT_IDX_JOB_SCOPE;
+drop index ACT_IDX_JOB_SUB_SCOPE;
+drop index ACT_IDX_JOB_SCOPE_DEF;
+drop index ACT_IDX_TJOB_SCOPE;
+drop index ACT_IDX_TJOB_SUB_SCOPE;
+drop index ACT_IDX_TJOB_SCOPE_DEF;
+drop index ACT_IDX_SJOB_SCOPE;
+drop index ACT_IDX_SJOB_SUB_SCOPE;
+drop index ACT_IDX_SJOB_SCOPE_DEF;
+drop index ACT_IDX_DJOB_SCOPE;
+drop index ACT_IDX_DJOB_SUB_SCOPE;
+drop index ACT_IDX_DJOB_SCOPE_DEF;
+drop index ACT_IDX_EJOB_SCOPE;
+drop index ACT_IDX_EJOB_SUB_SCOPE;
+drop index ACT_IDX_EJOB_SCOPE_DEF;
+
+alter table ACT_RU_JOB
+ drop foreign key ACT_FK_JOB_EXCEPTION;
+
+alter table ACT_RU_JOB
+ drop foreign key ACT_FK_JOB_CUSTOM_VAL;
+
+alter table ACT_RU_TIMER_JOB
+ drop foreign key ACT_FK_TJOB_EXCEPTION;
+
+alter table ACT_RU_TIMER_JOB
+ drop foreign key ACT_FK_TJOB_CUSTOM_VAL;
+
+alter table ACT_RU_SUSPENDED_JOB
+ drop foreign key ACT_FK_SJOB_EXCEPTION;
+
+alter table ACT_RU_SUSPENDED_JOB
+ drop foreign key ACT_FK_SJOB_CUSTOM_VAL;
+
+alter table ACT_RU_DEADLETTER_JOB
+ drop foreign key ACT_FK_DJOB_EXCEPTION;
+
+alter table ACT_RU_DEADLETTER_JOB
+ drop foreign key ACT_FK_DJOB_CUSTOM_VAL;
+
+alter table ACT_RU_EXTERNAL_JOB
+ drop foreign key ACT_FK_EJOB_EXCEPTION;
+
+alter table ACT_RU_EXTERNAL_JOB
+ drop foreign key ACT_FK_EJOB_CUSTOM_VAL;
+
+drop table ACT_RU_JOB;
+drop table ACT_RU_TIMER_JOB;
+drop table ACT_RU_SUSPENDED_JOB;
+drop table ACT_RU_DEADLETTER_JOB;
+drop table ACT_RU_HISTORY_JOB;
+drop table ACT_RU_EXTERNAL_JOB;
+
+
+drop index ACT_IDX_TASK_CREATE;
+drop index ACT_IDX_TASK_SCOPE;
+drop index ACT_IDX_TASK_SUB_SCOPE;
+drop index ACT_IDX_TASK_SCOPE_DEF;
+
+drop table ACT_HI_TSK_LOG;
+
+drop index ACT_IDX_RU_VAR_SCOPE_ID_TYPE;
+drop index ACT_IDX_RU_VAR_SUB_ID_TYPE;
+
+alter table ACT_RU_VARIABLE
+ drop foreign key ACT_FK_VAR_BYTEARRAY;
+
+drop table ACT_RU_VARIABLE;
+
+
drop table ACT_GE_BYTEARRAY;
-drop table ACT_GE_PROPERTY;
\ No newline at end of file
+drop table ACT_GE_PROPERTY;
+
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.h2.drop.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.h2.drop.common.sql
index baeb2522785..7364ece1f5b 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.h2.drop.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.h2.drop.common.sql
@@ -1,2 +1,82 @@
+drop table if exists FLW_RU_BATCH_PART cascade constraints;
+drop table if exists FLW_RU_BATCH cascade constraints;
+
+drop index if exists FLW_IDX_BATCH_PART;
+
+drop table if exists ACT_RU_ENTITYLINK cascade constraints;
+
+drop index if exists ACT_IDX_ENT_LNK_SCOPE;
+drop index if exists ACT_IDX_ENT_LNK_SCOPE_DEF;
+
+drop table if exists ACT_HI_ENTITYLINK cascade constraints;
+
+drop index if exists ACT_IDX_HI_ENT_LNK_SCOPE;
+drop index if exists ACT_IDX_HI_ENT_LNK_SCOPE_DEF;
+
+drop table if exists ACT_RU_EVENT_SUBSCR cascade constraints;
+
+drop index if exists ACT_IDX_EVENT_SUBSCR_CONFIG_;
+drop index if exists ACT_IDX_EVENT_SUBSCR_SCOPEREF_;
+
+drop table if exists ACT_RU_IDENTITYLINK cascade constraints;
+
+drop index if exists ACT_IDX_IDENT_LNK_USER;
+drop index if exists ACT_IDX_IDENT_LNK_GROUP;
+drop index if exists ACT_IDX_IDENT_LNK_SCOPE;
+drop index if exists ACT_IDX_IDENT_LNK_SUB_SCOPE;
+drop index if exists ACT_IDX_IDENT_LNK_SCOPE_DEF;
+
+drop table if exists ACT_HI_IDENTITYLINK cascade constraints;
+
+drop index if exists ACT_IDX_HI_IDENT_LNK_USER;
+drop index if exists ACT_IDX_HI_IDENT_LNK_SCOPE;
+drop index if exists ACT_IDX_HI_IDENT_LNK_SUB_SCOPE;
+drop index if exists ACT_IDX_HI_IDENT_LNK_SCOPE_DEF;
+
+drop index if exists ACT_IDX_JOB_SCOPE;
+drop index if exists ACT_IDX_JOB_SUB_SCOPE;
+drop index if exists ACT_IDX_JOB_SCOPE_DEF;
+drop index if exists ACT_IDX_TJOB_SCOPE;
+drop index if exists ACT_IDX_TJOB_SUB_SCOPE;
+drop index if exists ACT_IDX_TJOB_SCOPE_DEF;
+drop index if exists ACT_IDX_SJOB_SCOPE;
+drop index if exists ACT_IDX_SJOB_SUB_SCOPE;
+drop index if exists ACT_IDX_SJOB_SCOPE_DEF;
+drop index if exists ACT_IDX_DJOB_SCOPE;
+drop index if exists ACT_IDX_DJOB_SUB_SCOPE;
+drop index if exists ACT_IDX_DJOB_SCOPE_DEF;
+drop index if exists ACT_IDX_EJOB_SCOPE;
+drop index if exists ACT_IDX_EJOB_SUB_SCOPE;
+drop index if exists ACT_IDX_EJOB_SCOPE_DEF;
+
+drop table if exists ACT_RU_JOB cascade constraints;
+drop table if exists ACT_RU_EXTERNAL_JOB cascade constraints;
+drop table if exists ACT_RU_TIMER_JOB cascade constraints;
+drop table if exists ACT_RU_SUSPENDED_JOB cascade constraints;
+drop table if exists ACT_RU_DEADLETTER_JOB cascade constraints;
+drop table if exists ACT_RU_HISTORY_JOB cascade constraints;
+
+drop table if exists ACT_RU_TASK cascade constraints;
+
+drop index if exists ACT_IDX_TASK_CREATE;
+
+drop table if exists ACT_HI_TASKINST cascade constraints;
+drop table if exists ACT_HI_TSK_LOG cascade constraints;
+
+drop index if exists ACT_IDX_HI_TASK_SCOPE;
+drop index if exists ACT_IDX_HI_TASK_SUB_SCOPE;
+drop index if exists ACT_IDX_HI_TASK_SCOPE_DEF;
+
+drop table if exists ACT_RU_VARIABLE cascade constraints;
+
+
+drop table if exists ACT_HI_VARINST cascade constraints;
+
+drop index if exists ACT_IDX_HI_PROCVAR_NAME_TYPE;
+drop index if exists ACT_IDX_HI_VAR_SCOPE_ID_TYPE;
+drop index if exists ACT_IDX_HI_VAR_SUB_ID_TYPE;
+
+
drop table if exists ACT_GE_BYTEARRAY cascade constraints;
-drop table if exists ACT_GE_PROPERTY cascade constraints;
\ No newline at end of file
+drop table if exists ACT_GE_PROPERTY cascade constraints;
+
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.hsql.drop.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.hsql.drop.common.sql
index 44691e17b91..c1f26622073 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.hsql.drop.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.hsql.drop.common.sql
@@ -1,2 +1,56 @@
+drop table if exists FLW_RU_BATCH_PART cascade constraints;
+drop table if exists FLW_RU_BATCH cascade constraints;
+
+drop index if exists FLW_IDX_BATCH_PART;
+
+drop table if exists ACT_RU_ENTITYLINK cascade;
+
+drop index if exists ACT_IDX_ENT_LNK_SCOPE;
+drop index if exists ACT_IDX_ENT_LNK_SCOPE_DEF;
+
+drop table if exists ACT_RU_EVENT_SUBSCR cascade;
+
+drop index if exists ACT_IDX_EVENT_SUBSCR_CONFIG_;
+drop index if exists ACT_IDX_EVENT_SUBSCR_SCOPEREF_;
+
+drop table if exists ACT_RU_IDENTITYLINK cascade;
+
+drop index if exists ACT_IDX_IDENT_LNK_USER;
+drop index if exists ACT_IDX_IDENT_LNK_GROUP;
+drop index if exists ACT_IDX_IDENT_LNK_SCOPE;
+drop index if exists ACT_IDX_IDENT_LNK_SUB_SCOPE;
+drop index if exists ACT_IDX_IDENT_LNK_SCOPE_DEF;
+
+drop index if exists ACT_IDX_JOB_SCOPE;
+drop index if exists ACT_IDX_JOB_SUB_SCOPE;
+drop index if exists ACT_IDX_JOB_SCOPE_DEF;
+drop index if exists ACT_IDX_TJOB_SCOPE;
+drop index if exists ACT_IDX_TJOB_SUB_SCOPE;
+drop index if exists ACT_IDX_TJOB_SCOPE_DEF;
+drop index if exists ACT_IDX_SJOB_SCOPE;
+drop index if exists ACT_IDX_SJOB_SUB_SCOPE;
+drop index if exists ACT_IDX_SJOB_SCOPE_DEF;
+drop index if exists ACT_IDX_DJOB_SCOPE;
+drop index if exists ACT_IDX_DJOB_SUB_SCOPE;
+drop index if exists ACT_IDX_DJOB_SCOPE_DEF;
+
+drop table if exists ACT_RU_JOB cascade;
+drop table if exists ACT_RU_TIMER_JOB cascade;
+drop table if exists ACT_RU_SUSPENDED_JOB cascade;
+drop table if exists ACT_RU_DEADLETTER_JOB cascade;
+drop table if exists ACT_RU_EXTERNAL_JOB cascade;
+drop table if exists ACT_RU_HISTORY_JOB cascade;
+
+drop table if exists ACT_RU_TASK cascade;
+
+drop index if exists ACT_IDX_TASK_CREATE;
+drop index if exists ACT_IDX_TASK_SCOPE;
+drop index if exists ACT_IDX_TASK_SUB_SCOPE;
+drop index if exists ACT_IDX_TASK_SCOPE_DEF;
+
+drop table if exists ACT_RU_VARIABLE cascade;
+
+
drop table if exists ACT_GE_BYTEARRAY cascade;
-drop table if exists ACT_GE_PROPERTY cascade;
\ No newline at end of file
+drop table if exists ACT_GE_PROPERTY cascade;
+
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.mssql.drop.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.mssql.drop.common.sql
index f1b06b5e220..0b909914e2d 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.mssql.drop.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.mssql.drop.common.sql
@@ -1,2 +1,75 @@
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'FLW_IDX_BATCH_PART') drop index FLW_RU_BATCH_PART.FLW_IDX_BATCH_PART;
+
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'FLW_RU_BATCH_PART') drop table FLW_RU_BATCH_PART;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'FLW_RU_BATCH') drop table FLW_RU_BATCH;
+
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_ENT_LNK_SCOPE') drop index ACT_RU_ENTITYLINK.ACT_IDX_ENT_LNK_SCOPE;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_ENT_LNK_SCOPE_DEF') drop index ACT_RU_ENTITYLINK.ACT_IDX_ENT_LNK_SCOPE_DEF;
+
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_ENTITYLINK') drop table ACT_RU_ENTITYLINK;
+
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_EVENT_SUBSCR_CONFIG_') drop index ACT_RU_EVENT_SUBSCR.ACT_IDX_EVENT_SUBSCR_CONFIG_;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_EVENT_SUBSCR_EXEC_ID') drop index ACT_RU_EVENT_SUBSCR.ACT_IDX_EVENT_SUBSCR_EXEC_ID;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_EVENT_SUBSCR_SCOPEREF_') drop index ACT_RU_EVENT_SUBSCR.ACT_IDX_EVENT_SUBSCR_SCOPEREF_;
+
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_EVENT_SUBSCR') drop table ACT_RU_EVENT_SUBSCR;
+
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_IDENT_LNK_USER') drop index ACT_RU_IDENTITYLINK.ACT_IDX_IDENT_LNK_USER;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_IDENT_LNK_GROUP') drop index ACT_RU_IDENTITYLINK.ACT_IDX_IDENT_LNK_GROUP;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_IDENT_LNK_SCOPE') drop index ACT_RU_IDENTITYLINK.ACT_IDX_IDENT_LNK_SCOPE;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_IDENT_LNK_SUB_SCOPE') drop index ACT_RU_IDENTITYLINK.ACT_IDX_IDENT_LNK_SUB_SCOPE;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_IDENT_LNK_SCOPE_DEF') drop index ACT_RU_IDENTITYLINK.ACT_IDX_IDENT_LNK_SCOPE_DEF;
+
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_IDENTITYLINK') drop table ACT_RU_IDENTITYLINK;
+
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_JOB_SCOPE') drop index ACT_RU_JOB.ACT_IDX_JOB_SCOPE;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_JOB_SUB_SCOPE') drop index ACT_RU_JOB.ACT_IDX_JOB_SUB_SCOPE;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_JOB_SCOPE_DEF') drop index ACT_RU_JOB.ACT_IDX_JOB_SCOPE_DEF;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_TJOB_SCOPE') drop index ACT_RU_TIMER_JOB.ACT_IDX_TJOB_SCOPE;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_TJOB_SUB_SCOPE') drop index ACT_RU_TIMER_JOB.ACT_IDX_TJOB_SUB_SCOPE;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_TJOB_SCOPE_DEF') drop index ACT_RU_TIMER_JOB.ACT_IDX_TJOB_SCOPE_DEF;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_SJOB_SCOPE') drop index ACT_RU_SUSPENDED_JOB.ACT_IDX_SJOB_SCOPE;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_SJOB_SUB_SCOPE') drop index ACT_RU_SUSPENDED_JOB.ACT_IDX_SJOB_SUB_SCOPE;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_SJOB_SCOPE_DEF') drop index ACT_RU_SUSPENDED_JOB.ACT_IDX_SJOB_SCOPE_DEF;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_DJOB_SCOPE') drop index ACT_RU_DEADLETTER_JOB.ACT_IDX_DJOB_SCOPE;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_DJOB_SUB_SCOPE') drop index ACT_RU_DEADLETTER_JOB.ACT_IDX_DJOB_SUB_SCOPE;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_DJOB_SCOPE_DEF') drop index ACT_RU_DEADLETTER_JOB.ACT_IDX_DJOB_SCOPE_DEF;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_EJOB_SCOPE') drop index ACT_RU_EXTERNAL_JOB.ACT_IDX_EJOB_SCOPE;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_EJOB_SUB_SCOPE') drop index ACT_RU_EXTERNAL_JOB.ACT_IDX_EJOB_SUB_SCOPE;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_EJOB_SCOPE_DEF') drop index ACT_RU_EXTERNAL_JOB.ACT_IDX_EJOB_SCOPE_DEF;
+
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_JOB') alter table ACT_RU_JOB drop constraint ACT_FK_JOB_EXCEPTION;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_JOB') alter table ACT_RU_JOB drop constraint ACT_FK_JOB_CUSTOM_VALUES;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_TIMER_JOB') alter table ACT_RU_TIMER_JOB drop constraint ACT_FK_TIMER_JOB_EXCEPTION;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_TIMER_JOB') alter table ACT_RU_TIMER_JOB drop constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_SUSPENDED_JOB') alter table ACT_RU_SUSPENDED_JOB drop constraint ACT_FK_SUSPENDED_JOB_EXCEPTION;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_SUSPENDED_JOB') alter table ACT_RU_SUSPENDED_JOB drop constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_DEADLETTER_JOB') alter table ACT_RU_DEADLETTER_JOB drop constraint ACT_FK_DEADLETTER_JOB_EXCEPTION;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_DEADLETTER_JOB') alter table ACT_RU_DEADLETTER_JOB drop constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_EXTERNAL_JOB') alter table ACT_RU_EXTERNAL_JOB drop constraint ACT_FK_EXTERNAL_JOB_EXCEPTION;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_EXTERNAL_JOB') alter table ACT_RU_EXTERNAL_JOB drop constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES;
+
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_JOB') drop table ACT_RU_JOB;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_TIMER_JOB') drop table ACT_RU_TIMER_JOB;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_SUSPENDED_JOB') drop table ACT_RU_SUSPENDED_JOB;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_DEADLETTER_JOB') drop table ACT_RU_DEADLETTER_JOB;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_HISTORY_JOB') drop table ACT_RU_HISTORY_JOB;
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_EXTERNAL_JOB') drop table ACT_RU_EXTERNAL_JOB;
+
+
+if exists (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_TASK_CREATE') drop index ACT_RU_TASK.ACT_IDX_TASK_CREATE;
+if exists (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_TASK_SCOPE') drop index ACT_RU_TASK.ACT_IDX_TASK_SCOPE;
+if exists (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_TASK_SUB_SCOPE') drop index ACT_RU_TASK.ACT_IDX_TASK_SUB_SCOPE;
+if exists (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_TASK_SCOPE_DEF') drop index ACT_RU_TASK.ACT_IDX_TASK_SCOPE_DEF;
+
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_TASK') drop table ACT_RU_TASK;
+
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_VARIABLE') alter table ACT_RU_VARIABLE drop constraint ACT_FK_VAR_BYTEARRAY;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_RU_VAR_SCOPE_ID_TYPE') drop index ACT_RU_VARIABLE.ACT_IDX_RU_VAR_SCOPE_ID_TYPE;
+IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_RU_VAR_SUB_ID_TYPE') drop index ACT_RU_VARIABLE.ACT_IDX_RU_VAR_SUB_ID_TYPE;
+
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_VARIABLE') drop table ACT_RU_VARIABLE;
+
if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_GE_BYTEARRAY') drop table ACT_GE_BYTEARRAY;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_GE_PROPERTY') drop table ACT_GE_PROPERTY;
\ No newline at end of file
+if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_GE_PROPERTY') drop table ACT_GE_PROPERTY;
+
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.mysql.drop.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.mysql.drop.common.sql
index 46790073ab1..6aafcdcd5cc 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.mysql.drop.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.mysql.drop.common.sql
@@ -1,2 +1,95 @@
+drop index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART;
+
+drop table if exists FLW_RU_BATCH_PART;
+drop table if exists FLW_RU_BATCH;
+
+drop index ACT_IDX_ENT_LNK_SCOPE on ACT_RU_ENTITYLINK;
+drop index ACT_IDX_ENT_LNK_SCOPE_DEF on ACT_RU_ENTITYLINK;
+
+drop table if exists ACT_RU_ENTITYLINK;
+
+drop index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR;
+drop index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR;
+
+drop table if exists ACT_RU_EVENT_SUBSCR;
+
+drop index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK;
+drop index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK;
+drop index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK;
+drop index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK;
+drop index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK;
+
+drop table if exists ACT_RU_IDENTITYLINK;
+
+drop index ACT_IDX_JOB_SCOPE on ACT_RU_JOB;
+drop index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB;
+drop index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB;
+drop index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB;
+drop index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB;
+drop index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB;
+drop index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB;
+drop index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB;
+drop index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB;
+drop index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB;
+drop index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB;
+drop index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB;
+drop index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB;
+drop index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB;
+drop index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB;
+
+alter table ACT_RU_JOB
+ drop foreign key ACT_FK_JOB_EXCEPTION;
+
+alter table ACT_RU_JOB
+ drop foreign key ACT_FK_JOB_CUSTOM_VALUES;
+
+alter table ACT_RU_TIMER_JOB
+ drop foreign key ACT_FK_TIMER_JOB_EXCEPTION;
+
+alter table ACT_RU_TIMER_JOB
+ drop foreign key ACT_FK_TIMER_JOB_CUSTOM_VALUES;
+
+alter table ACT_RU_SUSPENDED_JOB
+ drop foreign key ACT_FK_SUSPENDED_JOB_EXCEPTION;
+
+alter table ACT_RU_SUSPENDED_JOB
+ drop foreign key ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES;
+
+alter table ACT_RU_DEADLETTER_JOB
+ drop foreign key ACT_FK_DEADLETTER_JOB_EXCEPTION;
+
+alter table ACT_RU_DEADLETTER_JOB
+ drop foreign key ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES;
+
+alter table ACT_RU_EXTERNAL_JOB
+ drop foreign key ACT_FK_EXTERNAL_JOB_EXCEPTION;
+
+alter table ACT_RU_EXTERNAL_JOB
+ drop foreign key ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES;
+
+drop table if exists ACT_RU_JOB;
+drop table if exists ACT_RU_TIMER_JOB;
+drop table if exists ACT_RU_SUSPENDED_JOB;
+drop table if exists ACT_RU_DEADLETTER_JOB;
+drop table if exists ACT_RU_HISTORY_JOB;
+drop table if exists ACT_RU_EXTERNAL_JOB;
+
+drop index ACT_IDX_TASK_CREATE on ACT_RU_TASK;
+drop index ACT_IDX_TASK_SCOPE on ACT_RU_TASK;
+drop index ACT_IDX_TASK_SUB_SCOPE on ACT_RU_TASK;
+drop index ACT_IDX_TASK_SCOPE_DEF on ACT_RU_TASK;
+
+drop table if exists ACT_RU_TASK;
+
+alter table ACT_RU_VARIABLE
+ drop FOREIGN KEY ACT_FK_VAR_BYTEARRAY;
+
+drop index ACT_IDX_RU_VAR_SCOPE_ID_TYPE on ACT_RU_VARIABLE;
+drop index ACT_IDX_RU_VAR_SUB_ID_TYPE on ACT_RU_VARIABLE;
+
+drop table if exists ACT_RU_VARIABLE;
+
+
drop table if exists ACT_GE_BYTEARRAY;
-drop table if exists ACT_GE_PROPERTY;
\ No newline at end of file
+drop table if exists ACT_GE_PROPERTY;
+
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.oracle.drop.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.oracle.drop.common.sql
index 5f8ef049b28..96b446825d9 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.oracle.drop.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.oracle.drop.common.sql
@@ -1,2 +1,119 @@
+drop index FLW_IDX_BATCH_PART;
+
+drop table FLW_RU_BATCH_PART;
+drop table FLW_RU_BATCH;
+
+drop index ACT_IDX_ENT_LNK_SCOPE;
+drop index ACT_IDX_ENT_LNK_SCOPE_DEF;
+
+drop table ACT_RU_ENTITYLINK;
+
+drop index ACT_IDX_EVENT_SUBSCR_CONFIG_;
+drop index ACT_IDX_EVENT_SUBSCR;
+drop index ACT_IDX_EVENT_SUBSCR_SCOPEREF_;
+
+drop table ACT_RU_EVENT_SUBSCR;
+
+drop index ACT_IDX_IDENT_LNK_USER;
+drop index ACT_IDX_IDENT_LNK_GROUP;
+drop index ACT_IDX_IDENT_LNK_SCOPE;
+drop index ACT_IDX_IDENT_LNK_SUB_SCOPE;
+drop index ACT_IDX_IDENT_LNK_SCOPE_DEF;
+
+drop table ACT_RU_IDENTITYLINK;
+
+drop index ACT_IDX_JOB_SCOPE;
+drop index ACT_IDX_JOB_SUB_SCOPE;
+drop index ACT_IDX_JOB_SCOPE_DEF;
+drop index ACT_IDX_TJOB_SCOPE;
+drop index ACT_IDX_TJOB_SUB_SCOPE;
+drop index ACT_IDX_TJOB_SCOPE_DEF;
+drop index ACT_IDX_SJOB_SCOPE;
+drop index ACT_IDX_SJOB_SUB_SCOPE;
+drop index ACT_IDX_SJOB_SCOPE_DEF;
+drop index ACT_IDX_DJOB_SCOPE;
+drop index ACT_IDX_DJOB_SUB_SCOPE;
+drop index ACT_IDX_DJOB_SCOPE_DEF;
+drop index ACT_IDX_EJOB_SCOPE;
+drop index ACT_IDX_EJOB_SUB_SCOPE;
+drop index ACT_IDX_EJOB_SCOPE_DEF;
+
+drop index ACT_IDX_JOB_EXCEPTION;
+drop index ACT_IDX_JOB_CUSTOM_VAL_ID;
+drop index ACT_IDX_JOB_CORRELATION_ID;
+
+drop index ACT_IDX_TJOB_EXCEPTION;
+drop index ACT_IDX_TJOB_CUSTOM_VAL_ID;
+drop index ACT_IDX_TJOB_CORRELATION_ID;
+drop index ACT_IDX_TJOB_DUEDATE;
+
+drop index ACT_IDX_SJOB_EXCEPTION;
+drop index ACT_IDX_SJOB_CUSTOM_VAL_ID;
+drop index ACT_IDX_SJOB_CORRELATION_ID;
+
+drop index ACT_IDX_DJOB_EXCEPTION;
+drop index ACT_IDX_DJOB_CUSTOM_VAL_ID;
+drop index ACT_IDX_DJOB_CORRELATION_ID;
+
+drop index ACT_IDX_EJOB_EXCEPTION;
+drop index ACT_IDX_EJOB_CUSTOM_VAL_ID;
+drop index ACT_IDX_EJOB_CORRELATION_ID;
+
+alter table ACT_RU_JOB
+ drop CONSTRAINT ACT_FK_JOB_EXCEPTION;
+
+alter table ACT_RU_JOB
+ drop CONSTRAINT ACT_FK_JOB_CUSTOM_VAL;
+
+alter table ACT_RU_TIMER_JOB
+ drop CONSTRAINT ACT_FK_TJOB_EXCEPTION;
+
+alter table ACT_RU_TIMER_JOB
+ drop CONSTRAINT ACT_FK_TJOB_CUSTOM_VAL;
+
+alter table ACT_RU_SUSPENDED_JOB
+ drop CONSTRAINT ACT_FK_SJOB_EXCEPTION;
+
+alter table ACT_RU_SUSPENDED_JOB
+ drop CONSTRAINT ACT_FK_SJOB_CUSTOM_VAL;
+
+alter table ACT_RU_DEADLETTER_JOB
+ drop CONSTRAINT ACT_FK_DJOB_EXCEPTION;
+
+alter table ACT_RU_DEADLETTER_JOB
+ drop CONSTRAINT ACT_FK_DJOB_CUSTOM_VAL;
+
+alter table ACT_RU_EXTERNAL_JOB
+ drop CONSTRAINT ACT_FK_DJOB_EXCEPTION;
+
+alter table ACT_RU_EXTERNAL_JOB
+ drop CONSTRAINT ACT_FK_DJOB_CUSTOM_VAL;
+
+drop table ACT_RU_JOB;
+drop table ACT_RU_TIMER_JOB;
+drop table ACT_RU_SUSPENDED_JOB;
+drop table ACT_RU_DEADLETTER_JOB;
+drop table ACT_RU_HISTORY_JOB;
+drop table ACT_RU_EXTERNAL_JOB;
+
+
+drop index ACT_IDX_TASK_CREATE;
+drop index ACT_IDX_TASK_SCOPE;
+drop index ACT_IDX_TASK_SUB_SCOPE;
+drop index ACT_IDX_TASK_SCOPE_DEF;
+
+drop table ACT_RU_TASK;
+
+drop index ACT_IDX_VAR_BYTEARRAY;
+drop index ACT_IDX_RU_VAR_SCOPE_ID_TYPE;
+drop index ACT_IDX_RU_VAR_SUB_ID_TYPE;
+
+alter table ACT_RU_VARIABLE
+ drop CONSTRAINT ACT_FK_VAR_BYTEARRAY;
+
+drop table ACT_RU_VARIABLE;
+
+
drop table ACT_GE_BYTEARRAY;
-drop table ACT_GE_PROPERTY;
\ No newline at end of file
+drop table ACT_GE_PROPERTY;
+
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.postgres.drop.common.sql b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.postgres.drop.common.sql
index 9fd50cba413..743c649600f 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.postgres.drop.common.sql
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/drop/flowable.postgres.drop.common.sql
@@ -1,2 +1,26 @@
+drop table if exists FLW_RU_BATCH_PART cascade;
+drop table if exists FLW_RU_BATCH cascade;
+
+drop table if exists ACT_RU_ENTITYLINK cascade;
+
+drop table if exists ACT_RU_EVENT_SUBSCR cascade;
+
+drop table if exists ACT_RU_IDENTITYLINK cascade;
+
+drop table if exists ACT_RU_JOB cascade;
+drop table if exists ACT_RU_TIMER_JOB cascade;
+drop table if exists ACT_RU_SUSPENDED_JOB cascade;
+drop table if exists ACT_RU_DEADLETTER_JOB cascade;
+drop table if exists ACT_RU_HISTORY_JOB cascade;
+drop table if exists ACT_RU_EXTERNAL_JOB cascade;
+
+drop table if exists ACT_RU_TASK cascade;
+
+
+drop table if exists ACT_RU_VARIABLE cascade;
+
+
drop table if exists ACT_GE_BYTEARRAY cascade;
drop table if exists ACT_GE_PROPERTY cascade;
+
+
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/mapping/ChangeLog.xml b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/mapping/ChangeLog.xml
new file mode 100644
index 00000000000..02c17b226b8
--- /dev/null
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/mapping/ChangeLog.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/mapping/entity/Property.xml b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/mapping/entity/Property.xml
index 2c598d5d3c9..b2baff3e0a5 100644
--- a/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/mapping/entity/Property.xml
+++ b/modules/flowable-engine-common/src/main/resources/org/flowable/common/db/mapping/entity/Property.xml
@@ -77,8 +77,8 @@
-
-
- org.liquibase
- liquibase-core
-
com.h2database
@@ -128,7 +124,8 @@
org.flowable.eventregistry.impl
- org.flowable.eventregistry.db.liquibase,
+ org.flowable.eventregistry.db.create,
+ org.flowable.eventregistry.db.upgrade,
org.flowable.eventregistry.db.mapping.entity,
@@ -136,7 +133,6 @@
org.junit*;resolution:=optional,
org.junit.jupiter*;resolution:=optional,
com.sun*;resolution:=optional,
- liquibase*;resolution:=optional,
jakarta.activation*;resolution:=optional,
jakarta.persistence*;resolution:=optional,
jakarta.mail*;resolution:=optional,
diff --git a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventManagementServiceImpl.java b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventManagementServiceImpl.java
index abbe355f8c8..1271507f75d 100644
--- a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventManagementServiceImpl.java
+++ b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventManagementServiceImpl.java
@@ -15,7 +15,9 @@
import java.util.Collection;
import java.util.Map;
+import org.flowable.common.engine.api.lock.LockManager;
import org.flowable.common.engine.impl.cmd.GetTableCountCmd;
+import org.flowable.common.engine.impl.lock.LockManagerImpl;
import org.flowable.common.engine.impl.service.CommonEngineServiceImpl;
import org.flowable.eventregistry.api.EventManagementService;
import org.flowable.eventregistry.impl.cmd.GetTableNamesCmd;
@@ -43,5 +45,10 @@ public Collection getTableNames() {
public void executeEventRegistryChangeDetection() {
configuration.getEventRegistryChangeDetectionManager().detectChanges();
}
+
+ @Override
+ public LockManager getLockManager(String lockName) {
+ return new LockManagerImpl(commandExecutor, lockName, getConfiguration().getLockPollRate(), configuration.getEngineCfgKey());
+ }
}
diff --git a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEngineConfiguration.java b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEngineConfiguration.java
index 894d2f6c12d..adaee476f96 100755
--- a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEngineConfiguration.java
+++ b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEngineConfiguration.java
@@ -21,10 +21,12 @@
import java.util.function.Consumer;
import org.flowable.common.engine.api.scope.ScopeTypes;
+import org.flowable.common.engine.impl.AbstractBuildableEngineConfiguration;
import org.flowable.common.engine.impl.AbstractEngineConfiguration;
import org.flowable.common.engine.impl.HasExpressionManagerEngineConfiguration;
import org.flowable.common.engine.impl.cfg.BeansConfigurationHelper;
import org.flowable.common.engine.impl.db.DbSqlSessionFactory;
+import org.flowable.common.engine.impl.db.SchemaManager;
import org.flowable.common.engine.impl.el.DefaultExpressionManager;
import org.flowable.common.engine.impl.el.ExpressionManager;
import org.flowable.common.engine.impl.interceptor.CommandInterceptor;
@@ -48,7 +50,6 @@
import org.flowable.eventregistry.api.management.EventRegistryChangeDetectionManager;
import org.flowable.eventregistry.impl.cfg.StandaloneEventRegistryEngineConfiguration;
import org.flowable.eventregistry.impl.cfg.StandaloneInMemEventRegistryEngineConfiguration;
-import org.flowable.eventregistry.impl.cmd.SchemaOperationsEventRegistryEngineBuild;
import org.flowable.eventregistry.impl.db.EntityDependencyOrder;
import org.flowable.eventregistry.impl.db.EventDbSchemaManager;
import org.flowable.eventregistry.impl.deployer.CachingAndArtifactsManager;
@@ -91,17 +92,11 @@
import org.flowable.eventregistry.json.converter.ChannelJsonConverter;
import org.flowable.eventregistry.json.converter.EventJsonConverter;
-import liquibase.Liquibase;
-import liquibase.database.Database;
-import liquibase.exception.DatabaseException;
-
-public class EventRegistryEngineConfiguration extends AbstractEngineConfiguration
+public class EventRegistryEngineConfiguration extends AbstractBuildableEngineConfiguration
implements EventRegistryConfigurationApi, HasExpressionManagerEngineConfiguration {
public static final String DEFAULT_MYBATIS_MAPPING_FILE = "org/flowable/eventregistry/db/mapping/mappings.xml";
- public static final String LIQUIBASE_CHANGELOG_PREFIX = "FLW_EV_";
-
protected String eventRegistryEngineName = EventRegistryEngines.NAME_DEFAULT;
// SERVICES
@@ -205,25 +200,24 @@ public static EventRegistryEngineConfiguration createStandaloneInMemEventRegistr
// buildEventRegistryEngine
// ///////////////////////////////////////////////////////
- public EventRegistryEngine buildEventRegistryEngine() {
- init();
- EventRegistryEngineImpl eventRegistryEngine = new EventRegistryEngineImpl(this);
-
- if (enableEventRegistryChangeDetectionAfterEngineCreate) {
-
- eventRegistryEngine.handleDeployedChannelDefinitions();
+ @Override
+ protected EventRegistryEngine createEngine() {
+ return new EventRegistryEngineImpl(this);
+ }
- if (enableEventRegistryChangeDetection) {
- eventRegistryChangeDetectionExecutor.initialize();
- }
- }
+ @Override
+ protected Consumer createPostEngineBuildConsumer() {
+ return new EventRegistryEnginePostEngineBuildConsumer();
+ }
- return eventRegistryEngine;
+ public EventRegistryEngine buildEventRegistryEngine() {
+ return buildEngine();
}
// init
// /////////////////////////////////////////////////////////////////////
+ @Override
protected void init() {
initEngineConfigurations();
initConfigurators();
@@ -341,32 +335,8 @@ public void initEntityManagers() {
// data model ///////////////////////////////////////////////////////////////
@Override
- public void initSchemaManager() {
- super.initSchemaManager();
- if (this.schemaManager == null) {
- this.schemaManager = new EventDbSchemaManager();
- }
- }
-
- public void initSchemaManagementCommand() {
- if (schemaManagementCmd == null) {
- if (usingRelationalDatabase && databaseSchemaUpdate != null) {
- this.schemaManagementCmd = new SchemaOperationsEventRegistryEngineBuild();
- }
- }
- }
-
- private void closeDatabase(Liquibase liquibase) {
- if (liquibase != null) {
- Database database = liquibase.getDatabase();
- if (database != null) {
- try {
- database.close();
- } catch (DatabaseException e) {
- logger.warn("Error closing database", e);
- }
- }
- }
+ protected SchemaManager createEngineSchemaManager() {
+ return new EventDbSchemaManager();
}
// session factories ////////////////////////////////////////////////////////
diff --git a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEngineImpl.java b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEngineImpl.java
index 57b32eb7258..44c305a7aa4 100644
--- a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEngineImpl.java
+++ b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEngineImpl.java
@@ -54,12 +54,6 @@ public EventRegistryEngineImpl(EventRegistryEngineConfiguration engineConfigurat
}
EventRegistryEngines.registerEventRegistryEngine(this);
-
- if (engineConfiguration.getEngineLifecycleListeners() != null) {
- for (EngineLifecycleListener engineLifecycleListener : engineConfiguration.getEngineLifecycleListeners()) {
- engineLifecycleListener.onEngineBuilt(this);
- }
- }
}
@Override
diff --git a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEnginePostEngineBuildConsumer.java b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEnginePostEngineBuildConsumer.java
new file mode 100644
index 00000000000..cf609dad7ef
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventRegistryEnginePostEngineBuildConsumer.java
@@ -0,0 +1,42 @@
+/* Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.flowable.eventregistry.impl;
+
+import java.util.function.Consumer;
+
+import org.flowable.common.engine.api.engine.EngineLifecycleListener;
+
+/**
+ * @author Filip Hrisafov
+ */
+public class EventRegistryEnginePostEngineBuildConsumer implements Consumer {
+
+ @Override
+ public void accept(EventRegistryEngine eventRegistryEngine) {
+ EventRegistryEngineConfiguration engineConfiguration = eventRegistryEngine.getEventRegistryEngineConfiguration();
+ if (engineConfiguration.getEngineLifecycleListeners() != null) {
+ for (EngineLifecycleListener engineLifecycleListener : engineConfiguration.getEngineLifecycleListeners()) {
+ engineLifecycleListener.onEngineBuilt(eventRegistryEngine);
+ }
+ }
+
+ if (engineConfiguration.isEnableEventRegistryChangeDetectionAfterEngineCreate()) {
+
+ eventRegistryEngine.handleDeployedChannelDefinitions();
+
+ if (engineConfiguration.isEnableEventRegistryChangeDetection()) {
+ engineConfiguration.getEventRegistryChangeDetectionExecutor().initialize();
+ }
+ }
+ }
+}
diff --git a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/aot/FlowableEventRegistryRuntimeHints.java b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/aot/FlowableEventRegistryRuntimeHints.java
index 772beee6752..84f92b4fb30 100644
--- a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/aot/FlowableEventRegistryRuntimeHints.java
+++ b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/aot/FlowableEventRegistryRuntimeHints.java
@@ -12,14 +12,7 @@
*/
package org.flowable.eventregistry.impl.aot;
-import java.util.Collections;
-
import org.flowable.common.engine.impl.aot.FlowableMyBatisResourceHintsRegistrar;
-import org.flowable.eventregistry.impl.db.SetChannelDefinitionTypeAndImplementationCustomChange;
-import org.flowable.eventregistry.impl.persistence.ResourceRefTypeHandler;
-import org.springframework.aot.hint.ExecutableMode;
-import org.springframework.aot.hint.MemberCategory;
-import org.springframework.aot.hint.ResourceHints;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar;
@@ -30,12 +23,6 @@ public class FlowableEventRegistryRuntimeHints implements RuntimeHintsRegistrar
@Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
- ResourceHints resourceHints = hints.resources();
FlowableMyBatisResourceHintsRegistrar.registerMappingResources("org/flowable/eventregistry/db/mapping", hints, classLoader);
- resourceHints.registerPattern("org/flowable/eventregistry/db/liquibase/flowable-eventregistry-db-changelog.xml");
- hints.reflection()
- .registerType(SetChannelDefinitionTypeAndImplementationCustomChange.class,
- hint -> hint.withConstructor(Collections.emptyList(), ExecutableMode.INVOKE))
- .registerType(ResourceRefTypeHandler.class, MemberCategory.values());
}
}
diff --git a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/cmd/SchemaOperationsEventRegistryEngineBuild.java b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/cmd/SchemaOperationsEventRegistryEngineBuild.java
deleted file mode 100644
index dbcdc6a2b47..00000000000
--- a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/cmd/SchemaOperationsEventRegistryEngineBuild.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.flowable.eventregistry.impl.cmd;
-
-import org.flowable.common.engine.impl.interceptor.Command;
-import org.flowable.common.engine.impl.interceptor.CommandContext;
-import org.flowable.eventregistry.impl.EventRegistryEngineConfiguration;
-import org.flowable.eventregistry.impl.db.EventDbSchemaManager;
-import org.flowable.eventregistry.impl.util.CommandContextUtil;
-
-/**
- * @author Joram Barrez
- */
-public class SchemaOperationsEventRegistryEngineBuild implements Command {
-
- @Override
- public Void execute(CommandContext commandContext) {
- EventRegistryEngineConfiguration configuration = CommandContextUtil.getEventRegistryConfiguration(commandContext);
- ((EventDbSchemaManager) configuration.getSchemaManager()).initSchema(configuration);
- return null;
- }
-
-}
diff --git a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/db/DbSchemaDrop.java b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/db/DbSchemaDrop.java
index 270c4258302..a285bc30b4c 100644
--- a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/db/DbSchemaDrop.java
+++ b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/db/DbSchemaDrop.java
@@ -13,52 +13,21 @@
package org.flowable.eventregistry.impl.db;
-import javax.sql.DataSource;
-
-import org.apache.commons.lang3.StringUtils;
-import org.flowable.eventregistry.impl.EventRegistryEngine;
-import org.flowable.eventregistry.impl.EventRegistryEngineConfiguration;
+import org.flowable.common.engine.impl.db.SchemaOperationsEngineDropDbCmd;
+import org.flowable.common.engine.impl.interceptor.CommandConfig;
+import org.flowable.common.engine.impl.interceptor.CommandExecutor;
+import org.flowable.eventregistry.impl.EventRegistryEngineImpl;
import org.flowable.eventregistry.impl.EventRegistryEngines;
-import liquibase.Liquibase;
-import liquibase.database.Database;
-import liquibase.database.DatabaseConnection;
-import liquibase.database.DatabaseFactory;
-import liquibase.database.jvm.JdbcConnection;
-import liquibase.resource.ClassLoaderResourceAccessor;
-
/**
* @author Tijs Rademakers
*/
public class DbSchemaDrop {
public static void main(String[] args) {
- try {
- EventRegistryEngine eventRegistryEngine = EventRegistryEngines.getDefaultEventRegistryEngine();
- EventRegistryEngineConfiguration eventRegistryEngineConfiguration = eventRegistryEngine.getEventRegistryEngineConfiguration();
- DataSource dataSource = eventRegistryEngineConfiguration.getDataSource();
-
- DatabaseConnection connection = new JdbcConnection(dataSource.getConnection());
- Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection);
- database.setDatabaseChangeLogTableName(EventRegistryEngineConfiguration.LIQUIBASE_CHANGELOG_PREFIX + database.getDatabaseChangeLogTableName());
- database.setDatabaseChangeLogLockTableName(EventRegistryEngineConfiguration.LIQUIBASE_CHANGELOG_PREFIX + database.getDatabaseChangeLogLockTableName());
-
- if (StringUtils.isNotEmpty(eventRegistryEngineConfiguration.getDatabaseSchema())) {
- database.setDefaultSchemaName(eventRegistryEngineConfiguration.getDatabaseSchema());
- database.setLiquibaseSchemaName(eventRegistryEngineConfiguration.getDatabaseSchema());
- }
-
- if (StringUtils.isNotEmpty(eventRegistryEngineConfiguration.getDatabaseCatalog())) {
- database.setDefaultCatalogName(eventRegistryEngineConfiguration.getDatabaseCatalog());
- database.setLiquibaseCatalogName(eventRegistryEngineConfiguration.getDatabaseCatalog());
- }
-
- Liquibase liquibase = new Liquibase("org/flowable/eventregistry/db/liquibase/flowable-eventregistry-db-changelog.xml", new ClassLoaderResourceAccessor(), database);
- liquibase.dropAll();
- liquibase.getDatabase().close();
-
- } catch (Exception e) {
- e.printStackTrace();
- }
+ EventRegistryEngineImpl eventRegistryEngine = (EventRegistryEngineImpl) EventRegistryEngines.getDefaultEventRegistryEngine();
+ CommandExecutor commandExecutor = eventRegistryEngine.getEventRegistryEngineConfiguration().getCommandExecutor();
+ CommandConfig config = new CommandConfig().transactionNotSupported();
+ commandExecutor.execute(config, new SchemaOperationsEngineDropDbCmd(eventRegistryEngine.getEventRegistryEngineConfiguration().getEngineScopeType()));
}
}
diff --git a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/db/EventDbSchemaManager.java b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/db/EventDbSchemaManager.java
index 99c06f32cbd..8ab96d07722 100644
--- a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/db/EventDbSchemaManager.java
+++ b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/db/EventDbSchemaManager.java
@@ -12,59 +12,85 @@
*/
package org.flowable.eventregistry.impl.db;
-import org.flowable.common.engine.impl.db.EngineDatabaseConfiguration;
-import org.flowable.common.engine.impl.db.LiquibaseBasedSchemaManager;
-import org.flowable.common.engine.impl.db.LiquibaseDatabaseConfiguration;
-import org.flowable.common.engine.impl.db.SchemaManager;
-import org.flowable.eventregistry.impl.EventRegistryEngineConfiguration;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.flowable.common.engine.impl.AbstractEngineConfiguration;
+import org.flowable.common.engine.impl.db.EngineSqlScriptBasedDbSchemaManager;
+import org.flowable.eventregistry.impl.EventRegistryEngine;
+import org.flowable.eventregistry.impl.cmd.UpdateChannelDefinitionTypeAndImplementationForAllChannelDefinitionsCmd;
import org.flowable.eventregistry.impl.util.CommandContextUtil;
-public class EventDbSchemaManager extends LiquibaseBasedSchemaManager {
-
- public static final String LIQUIBASE_CHANGELOG = "org/flowable/eventregistry/db/liquibase/flowable-eventregistry-db-changelog.xml";
+public class EventDbSchemaManager extends EngineSqlScriptBasedDbSchemaManager {
+
+ protected static final String EVENTREGISTRY_DB_SCHEMA_LOCK_NAME = "eventRegistryDbSchemaLock";
+
+ protected static final Map changeLogVersionMap = Map.ofEntries(
+ Map.entry("1", "6.5.0.6"),
+ Map.entry("2", "6.7.2.0"),
+ Map.entry("3", "6.7.2.0"),
+ Map.entry("4", "7.1.0.0"),
+ Map.entry("5", "7.1.0.0")
+ );
public EventDbSchemaManager() {
- super("eventregistry", LIQUIBASE_CHANGELOG, EventRegistryEngineConfiguration.LIQUIBASE_CHANGELOG_PREFIX);
+ super("eventregistry");
}
@Override
- protected LiquibaseDatabaseConfiguration getDatabaseConfiguration() {
- return new EngineDatabaseConfiguration(CommandContextUtil.getEventRegistryConfiguration());
+ protected String getEngineVersion() {
+ return EventRegistryEngine.VERSION;
}
- public void initSchema(EventRegistryEngineConfiguration eventRegistryConfiguration) {
- initSchema(eventRegistryConfiguration.getDatabaseSchemaUpdate());
+ @Override
+ protected String getSchemaVersionPropertyName() {
+ return "eventregistry.schema.version";
}
@Override
- public void schemaCreate() {
- getCommonSchemaManager().schemaCreate();
- super.schemaCreate();
+ protected String getDbSchemaLockName() {
+ return EVENTREGISTRY_DB_SCHEMA_LOCK_NAME;
}
@Override
- public void schemaDrop() {
- try {
- super.schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping event registry engine tables", e);
- }
+ protected String getEngineTableName() {
+ return "FLW_EVENT_DEFINITION";
+ }
- try {
- getCommonSchemaManager().schemaDrop();
- } catch (Exception e) {
- logger.info("Error dropping common tables", e);
+ @Override
+ protected String getChangeLogTableName() {
+ return "FLW_EV_DATABASECHANGELOG";
+ }
+
+ @Override
+ protected String getChangeLogTablePrefixName() {
+ return "FLW_EV";
+ }
+
+ @Override
+ protected String getDbVersionForChangelogVersion(String changeLogVersion) {
+ if (StringUtils.isNotEmpty(changeLogVersion) && changeLogVersionMap.containsKey(changeLogVersion)) {
+ return changeLogVersionMap.get(changeLogVersion);
}
+ return "6.5.0.0";
}
@Override
- public String schemaUpdate() {
- getCommonSchemaManager().schemaUpdate();
- return super.schemaUpdate();
+ protected AbstractEngineConfiguration getEngineConfiguration() {
+ return CommandContextUtil.getEventRegistryConfiguration();
+ }
+
+ @Override
+ protected void dbSchemaUpgraded(ChangeLogVersion changeLogVersion) {
+ String version = changeLogVersion.version();
+ if ("1".equals(version) || "2".equals(version)) {
+ getEngineConfiguration().getCommandExecutor().execute(new UpdateChannelDefinitionTypeAndImplementationForAllChannelDefinitionsCmd());
+ }
}
- protected SchemaManager getCommonSchemaManager() {
- return CommandContextUtil.getEventRegistryConfiguration().getCommonSchemaManager();
+ @Override
+ protected String getResourcesRootDirectory() {
+ return "org/flowable/eventregistry/db/";
}
}
diff --git a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/db/SetChannelDefinitionTypeAndImplementationCustomChange.java b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/db/SetChannelDefinitionTypeAndImplementationCustomChange.java
deleted file mode 100644
index 63d8f6a05f2..00000000000
--- a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/db/SetChannelDefinitionTypeAndImplementationCustomChange.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.flowable.eventregistry.impl.db;
-
-import org.flowable.common.engine.impl.context.Context;
-import org.flowable.common.engine.impl.interceptor.CommandContext;
-import org.flowable.eventregistry.impl.cmd.UpdateChannelDefinitionTypeAndImplementationForAllChannelDefinitionsCmd;
-
-import liquibase.change.custom.CustomTaskChange;
-import liquibase.database.Database;
-import liquibase.exception.CustomChangeException;
-import liquibase.exception.SetupException;
-import liquibase.exception.ValidationErrors;
-import liquibase.resource.ResourceAccessor;
-
-/**
- * @author Filip Hrisafov
- */
-public class SetChannelDefinitionTypeAndImplementationCustomChange implements CustomTaskChange {
-
- @Override
- public void execute(Database database) throws CustomChangeException {
-
- CommandContext commandContext = Context.getCommandContext();
- if (commandContext != null) {
- new UpdateChannelDefinitionTypeAndImplementationForAllChannelDefinitionsCmd().execute(commandContext);
- }
- }
-
- @Override
- public String getConfirmationMessage() {
- return "Set Channel Definition type and implementation columns";
- }
-
- @Override
- public void setUp() throws SetupException {
-
- }
-
- @Override
- public void setFileOpener(ResourceAccessor resourceAccessor) {
-
- }
-
- @Override
- public ValidationErrors validate(Database database) {
- return new ValidationErrors();
- }
-}
diff --git a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/test/FlowableEventExtension.java b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/test/FlowableEventExtension.java
index f7213a3947c..95ea56fdf81 100644
--- a/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/test/FlowableEventExtension.java
+++ b/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/test/FlowableEventExtension.java
@@ -169,16 +169,7 @@ protected void assertAndEnsureCleanDb(EventRegistryEngine eventRegistryEngine, E
eventRegistryEngine.getEventRegistryEngineConfiguration(),
ensureCleanDb,
!context.getExecutionException().isPresent(),
- new Command<>() {
-
- @Override
- public Void execute(CommandContext commandContext) {
- SchemaManager schemaManager = CommandContextUtil.getEventRegistryConfiguration(commandContext).getSchemaManager();
- schemaManager.schemaDrop();
- schemaManager.schemaCreate();
- return null;
- }
- }
+ eventRegistryEngine.getEventRegistryEngineConfiguration().getSchemaManagementCmd()
);
}
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.db2.create.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.db2.create.eventregistry.sql
new file mode 100644
index 00000000000..87cba89e1a7
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.db2.create.eventregistry.sql
@@ -0,0 +1,22 @@
+CREATE TABLE FLW_EVENT_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP(3), TENANT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), CONSTRAINT PK_FLW_EVENT_DEPL PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_FLW_EVENT_RESO PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INTEGER, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT PK_FLW_EVENT_DEFI PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+CREATE TABLE FLW_CHANNEL_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INTEGER, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), CREATE_TIME_ TIMESTAMP(3), TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT PK_FLW_CHANNEL_DE PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD TYPE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE FLW_CHANNEL_DEFINITION');
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD IMPLEMENTATION_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE FLW_CHANNEL_DEFINITION');
+
+insert into ACT_GE_PROPERTY
+values ('eventregistry.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.h2.create.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.h2.create.eventregistry.sql
new file mode 100644
index 00000000000..944a2d46998
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.h2.create.eventregistry.sql
@@ -0,0 +1,18 @@
+CREATE TABLE FLW_EVENT_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), CONSTRAINT PK_FLW_EVENT_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_FLW_EVENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INT, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT PK_FLW_EVENT_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+CREATE TABLE FLW_CHANNEL_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INT, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), CREATE_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT PK_FLW_CHANNEL_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD TYPE_ VARCHAR(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD IMPLEMENTATION_ VARCHAR(255);
+
+insert into ACT_GE_PROPERTY
+values ('eventregistry.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.mssql.create.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.mssql.create.eventregistry.sql
new file mode 100644
index 00000000000..2e345e94933
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.mssql.create.eventregistry.sql
@@ -0,0 +1,38 @@
+CREATE TABLE FLW_EVENT_DEPLOYMENT (ID_ varchar(255) NOT NULL, NAME_ varchar(255), CATEGORY_ varchar(255), DEPLOY_TIME_ datetime, TENANT_ID_ varchar(255), PARENT_DEPLOYMENT_ID_ varchar(255), CONSTRAINT PK_FLW_EVENT_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_RESOURCE (ID_ varchar(255) NOT NULL, NAME_ varchar(255), DEPLOYMENT_ID_ varchar(255), RESOURCE_BYTES_ varbinary(MAX), CONSTRAINT PK_FLW_EVENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_DEFINITION (ID_ varchar(255) NOT NULL, NAME_ varchar(255), VERSION_ int, KEY_ varchar(255), CATEGORY_ varchar(255), DEPLOYMENT_ID_ varchar(255), TENANT_ID_ varchar(255), RESOURCE_NAME_ varchar(255), DESCRIPTION_ varchar(255), CONSTRAINT PK_FLW_EVENT_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE NONCLUSTERED INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+CREATE TABLE FLW_CHANNEL_DEFINITION (ID_ varchar(255) NOT NULL, NAME_ varchar(255), VERSION_ int, KEY_ varchar(255), CATEGORY_ varchar(255), DEPLOYMENT_ID_ varchar(255), CREATE_TIME_ datetime, TENANT_ID_ varchar(255), RESOURCE_NAME_ varchar(255), DESCRIPTION_ varchar(255), CONSTRAINT PK_FLW_CHANNEL_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE NONCLUSTERED INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD TYPE_ varchar(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD IMPLEMENTATION_ varchar(255);
+
+ALTER TABLE FLW_EVENT_DEPLOYMENT ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE FLW_EVENT_RESOURCE ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ALTER COLUMN CATEGORY_ nvarchar(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ALTER COLUMN RESOURCE_NAME_ nvarchar(255);
+
+ALTER TABLE FLW_EVENT_DEFINITION ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE FLW_EVENT_DEFINITION ALTER COLUMN CATEGORY_ nvarchar(255);
+
+ALTER TABLE FLW_EVENT_DEFINITION ALTER COLUMN RESOURCE_NAME_ nvarchar(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ALTER COLUMN DESCRIPTION_ nvarchar(255);
+
+ALTER TABLE FLW_EVENT_DEFINITION ALTER COLUMN DESCRIPTION_ nvarchar(255);
+
+insert into ACT_GE_PROPERTY
+values ('eventregistry.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.mysql.create.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.mysql.create.eventregistry.sql
new file mode 100644
index 00000000000..f29c1f82634
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.mysql.create.eventregistry.sql
@@ -0,0 +1,18 @@
+CREATE TABLE FLW_EVENT_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOY_TIME_ datetime(3) NULL, TENANT_ID_ VARCHAR(255) NULL, PARENT_DEPLOYMENT_ID_ VARCHAR(255) NULL, CONSTRAINT PK_FLW_EVENT_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, RESOURCE_BYTES_ LONGBLOB NULL, CONSTRAINT PK_FLW_EVENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, VERSION_ INT NULL, KEY_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) NULL, RESOURCE_NAME_ VARCHAR(255) NULL, DESCRIPTION_ VARCHAR(255) NULL, CONSTRAINT PK_FLW_EVENT_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+CREATE TABLE FLW_CHANNEL_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, VERSION_ INT NULL, KEY_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, CREATE_TIME_ datetime(3) NULL, TENANT_ID_ VARCHAR(255) NULL, RESOURCE_NAME_ VARCHAR(255) NULL, DESCRIPTION_ VARCHAR(255) NULL, CONSTRAINT PK_FLW_CHANNEL_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD TYPE_ VARCHAR(255) NULL;
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD IMPLEMENTATION_ VARCHAR(255) NULL;
+
+insert into ACT_GE_PROPERTY
+values ('eventregistry.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.oracle.create.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.oracle.create.eventregistry.sql
new file mode 100644
index 00000000000..7e0dcc9908f
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.oracle.create.eventregistry.sql
@@ -0,0 +1,18 @@
+CREATE TABLE FLW_EVENT_DEPLOYMENT (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), DEPLOY_TIME_ TIMESTAMP(3), TENANT_ID_ VARCHAR2(255), PARENT_DEPLOYMENT_ID_ VARCHAR2(255), CONSTRAINT PK_FLW_EVENT_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_RESOURCE (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_FLW_EVENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_DEFINITION (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), VERSION_ INTEGER, KEY_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255), RESOURCE_NAME_ VARCHAR2(255), DESCRIPTION_ VARCHAR2(255), CONSTRAINT PK_FLW_EVENT_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+CREATE TABLE FLW_CHANNEL_DEFINITION (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), VERSION_ INTEGER, KEY_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), CREATE_TIME_ TIMESTAMP(3), TENANT_ID_ VARCHAR2(255), RESOURCE_NAME_ VARCHAR2(255), DESCRIPTION_ VARCHAR2(255), CONSTRAINT PK_FLW_CHANNEL_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD TYPE_ VARCHAR2(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD IMPLEMENTATION_ VARCHAR2(255);
+
+insert into ACT_GE_PROPERTY
+values ('eventregistry.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.postgres.create.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.postgres.create.eventregistry.sql
new file mode 100644
index 00000000000..09d5af96d6a
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/create/flowable.postgres.create.eventregistry.sql
@@ -0,0 +1,18 @@
+CREATE TABLE FLW_EVENT_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE, TENANT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), CONSTRAINT "FLW_EVENT_DEPLOYMENT_pkey" PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BYTEA, CONSTRAINT "FLW_EVENT_RESOURCE_pkey" PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INTEGER, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT "FLW_EVENT_DEFINITION_pkey" PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+CREATE TABLE FLW_CHANNEL_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INTEGER, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), CREATE_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE, TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT "FLW_CHANNEL_DEFINITION_pkey" PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD TYPE_ VARCHAR(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD IMPLEMENTATION_ VARCHAR(255);
+
+insert into ACT_GE_PROPERTY
+values ('eventregistry.schema.version', '7.1.0.1', 1);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/drop/flowable.h2.drop.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/drop/flowable.h2.drop.eventregistry.sql
new file mode 100644
index 00000000000..eeaa7dbb273
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/drop/flowable.h2.drop.eventregistry.sql
@@ -0,0 +1,7 @@
+drop index if exists ACT_IDX_CHANNEL_DEF_UNIQ;
+drop index if exists ACT_IDX_EVENT_DEF_UNIQ;
+
+drop table if exists FLW_CHANNEL_DEFINITION cascade constraints;
+drop table if exists FLW_EVENT_DEFINITION cascade constraints;
+drop table if exists FLW_EVENT_RESOURCE cascade constraints;
+drop table if exists FLW_EVENT_DEPLOYMENT cascade constraints;
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/drop/flowable.mysql.drop.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/drop/flowable.mysql.drop.eventregistry.sql
new file mode 100644
index 00000000000..f837b4f15b5
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/drop/flowable.mysql.drop.eventregistry.sql
@@ -0,0 +1,7 @@
+drop index ACT_IDX_CHANNEL_DEF_UNIQ on FLW_CHANNEL_DEFINITION;
+drop index ACT_IDX_EVENT_DEF_UNIQ on FLW_EVENT_DEFINITION;
+
+drop table if exists FLW_CHANNEL_DEFINITION;
+drop table if exists FLW_EVENT_DEFINITION;
+drop table if exists FLW_EVENT_RESOURCE;
+drop table if exists FLW_EVENT_DEPLOYMENT;
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/drop/flowable.postgres.drop.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/drop/flowable.postgres.drop.eventregistry.sql
new file mode 100644
index 00000000000..cf02564069d
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/drop/flowable.postgres.drop.eventregistry.sql
@@ -0,0 +1,4 @@
+drop table if exists FLW_CHANNEL_DEFINITION cascade;
+drop table if exists FLW_EVENT_DEFINITION cascade;
+drop table if exists FLW_EVENT_RESOURCE cascade;
+drop table if exists FLW_EVENT_DEPLOYMENT cascade;
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/liquibase/flowable-eventregistry-db-changelog.xml b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/liquibase/flowable-eventregistry-db-changelog.xml
deleted file mode 100644
index 1aa53c383ad..00000000000
--- a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/liquibase/flowable-eventregistry-db-changelog.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/mapping/mappings.xml b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/mapping/mappings.xml
index afd26fcafe7..93f594dda49 100644
--- a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/mapping/mappings.xml
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/mapping/mappings.xml
@@ -18,6 +18,7 @@
+
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.all.upgradestep.7100.to.7101.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.all.upgradestep.7100.to.7101.eventregistry.sql
new file mode 100644
index 00000000000..447fc20a3b2
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.all.upgradestep.7100.to.7101.eventregistry.sql
@@ -0,0 +1,5 @@
+insert into ACT_GE_PROPERTY
+values ('eventregistry.schema.version', '7.1.0.1', 1);
+
+drop table FLW_EV_DATABASECHANGELOG;
+drop table FLW_EV_DATABASECHANGELOGLOCK;
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.db2.upgradestep.6501.to.6502.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.db2.upgradestep.6501.to.6502.eventregistry.sql
new file mode 100644
index 00000000000..4059d377428
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.db2.upgradestep.6501.to.6502.eventregistry.sql
@@ -0,0 +1,13 @@
+CREATE TABLE FLW_EVENT_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP(3), TENANT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), CONSTRAINT PK_FLW_EVENT_DEPL PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_FLW_EVENT_RESO PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INTEGER, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT PK_FLW_EVENT_DEFI PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+CREATE TABLE FLW_CHANNEL_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INTEGER, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), CREATE_TIME_ TIMESTAMP(3), TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT PK_FLW_CHANNEL_DE PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.db2.upgradestep.6710.to.6720.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.db2.upgradestep.6710.to.6720.eventregistry.sql
new file mode 100644
index 00000000000..15bc8cba12c
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.db2.upgradestep.6710.to.6720.eventregistry.sql
@@ -0,0 +1,9 @@
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD TYPE_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE FLW_CHANNEL_DEFINITION');
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD IMPLEMENTATION_ VARCHAR(255);
+
+CALL SYSPROC.ADMIN_CMD ('REORG TABLE FLW_CHANNEL_DEFINITION');
+
+
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.h2.upgradestep.6501.to.6502.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.h2.upgradestep.6501.to.6502.eventregistry.sql
new file mode 100644
index 00000000000..54e6fbd12df
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.h2.upgradestep.6501.to.6502.eventregistry.sql
@@ -0,0 +1,11 @@
+CREATE TABLE FLW_EVENT_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), CONSTRAINT PK_FLW_EVENT_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_FLW_EVENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INT, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT PK_FLW_EVENT_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+CREATE TABLE FLW_CHANNEL_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INT, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), CREATE_TIME_ TIMESTAMP, TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT PK_FLW_CHANNEL_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.h2.upgradestep.6710.to.6720.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.h2.upgradestep.6710.to.6720.eventregistry.sql
new file mode 100644
index 00000000000..c8f873af992
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.h2.upgradestep.6710.to.6720.eventregistry.sql
@@ -0,0 +1,3 @@
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD TYPE_ VARCHAR(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD IMPLEMENTATION_ VARCHAR(255);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mssql.upgradestep.6501.to.6502.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mssql.upgradestep.6501.to.6502.eventregistry.sql
new file mode 100644
index 00000000000..61a851d6f9d
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mssql.upgradestep.6501.to.6502.eventregistry.sql
@@ -0,0 +1,11 @@
+CREATE TABLE FLW_EVENT_DEPLOYMENT (ID_ varchar(255) NOT NULL, NAME_ varchar(255), CATEGORY_ varchar(255), DEPLOY_TIME_ datetime, TENANT_ID_ varchar(255), PARENT_DEPLOYMENT_ID_ varchar(255), CONSTRAINT PK_FLW_EVENT_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_RESOURCE (ID_ varchar(255) NOT NULL, NAME_ varchar(255), DEPLOYMENT_ID_ varchar(255), RESOURCE_BYTES_ varbinary(MAX), CONSTRAINT PK_FLW_EVENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_DEFINITION (ID_ varchar(255) NOT NULL, NAME_ varchar(255), VERSION_ int, KEY_ varchar(255), CATEGORY_ varchar(255), DEPLOYMENT_ID_ varchar(255), TENANT_ID_ varchar(255), RESOURCE_NAME_ varchar(255), DESCRIPTION_ varchar(255), CONSTRAINT PK_FLW_EVENT_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE NONCLUSTERED INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+CREATE TABLE FLW_CHANNEL_DEFINITION (ID_ varchar(255) NOT NULL, NAME_ varchar(255), VERSION_ int, KEY_ varchar(255), CATEGORY_ varchar(255), DEPLOYMENT_ID_ varchar(255), CREATE_TIME_ datetime, TENANT_ID_ varchar(255), RESOURCE_NAME_ varchar(255), DESCRIPTION_ varchar(255), CONSTRAINT PK_FLW_CHANNEL_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE NONCLUSTERED INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mssql.upgradestep.6710.to.6720.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mssql.upgradestep.6710.to.6720.eventregistry.sql
new file mode 100644
index 00000000000..dc8157e895f
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mssql.upgradestep.6710.to.6720.eventregistry.sql
@@ -0,0 +1,3 @@
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD TYPE_ varchar(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD IMPLEMENTATION_ varchar(255);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mssql.upgradestep.7011.to.7100.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mssql.upgradestep.7011.to.7100.eventregistry.sql
new file mode 100644
index 00000000000..dd7a77d6c83
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mssql.upgradestep.7011.to.7100.eventregistry.sql
@@ -0,0 +1,19 @@
+ALTER TABLE FLW_EVENT_DEPLOYMENT ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE FLW_EVENT_RESOURCE ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ALTER COLUMN CATEGORY_ nvarchar(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ALTER COLUMN RESOURCE_NAME_ nvarchar(255);
+
+ALTER TABLE FLW_EVENT_DEFINITION ALTER COLUMN NAME_ nvarchar(255);
+
+ALTER TABLE FLW_EVENT_DEFINITION ALTER COLUMN CATEGORY_ nvarchar(255);
+
+ALTER TABLE FLW_EVENT_DEFINITION ALTER COLUMN RESOURCE_NAME_ nvarchar(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ALTER COLUMN DESCRIPTION_ nvarchar(255);
+
+ALTER TABLE FLW_EVENT_DEFINITION ALTER COLUMN DESCRIPTION_ nvarchar(255);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mysql.upgradestep.6501.to.6502.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mysql.upgradestep.6501.to.6502.eventregistry.sql
new file mode 100644
index 00000000000..bc7f8cc359a
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mysql.upgradestep.6501.to.6502.eventregistry.sql
@@ -0,0 +1,11 @@
+CREATE TABLE FLW_EVENT_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOY_TIME_ datetime(3) NULL, TENANT_ID_ VARCHAR(255) NULL, PARENT_DEPLOYMENT_ID_ VARCHAR(255) NULL, CONSTRAINT PK_FLW_EVENT_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, RESOURCE_BYTES_ LONGBLOB NULL, CONSTRAINT PK_FLW_EVENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, VERSION_ INT NULL, KEY_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, TENANT_ID_ VARCHAR(255) NULL, RESOURCE_NAME_ VARCHAR(255) NULL, DESCRIPTION_ VARCHAR(255) NULL, CONSTRAINT PK_FLW_EVENT_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+CREATE TABLE FLW_CHANNEL_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255) NULL, VERSION_ INT NULL, KEY_ VARCHAR(255) NULL, CATEGORY_ VARCHAR(255) NULL, DEPLOYMENT_ID_ VARCHAR(255) NULL, CREATE_TIME_ datetime(3) NULL, TENANT_ID_ VARCHAR(255) NULL, RESOURCE_NAME_ VARCHAR(255) NULL, DESCRIPTION_ VARCHAR(255) NULL, CONSTRAINT PK_FLW_CHANNEL_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mysql.upgradestep.6710.to.6720.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mysql.upgradestep.6710.to.6720.eventregistry.sql
new file mode 100644
index 00000000000..5d1773b3101
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.mysql.upgradestep.6710.to.6720.eventregistry.sql
@@ -0,0 +1,3 @@
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD TYPE_ VARCHAR(255) NULL;
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD IMPLEMENTATION_ VARCHAR(255) NULL;
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.oracle.upgradestep.6501.to.6502.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.oracle.upgradestep.6501.to.6502.eventregistry.sql
new file mode 100644
index 00000000000..54ebbf729b7
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.oracle.upgradestep.6501.to.6502.eventregistry.sql
@@ -0,0 +1,11 @@
+CREATE TABLE FLW_EVENT_DEPLOYMENT (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), DEPLOY_TIME_ TIMESTAMP(3), TENANT_ID_ VARCHAR2(255), PARENT_DEPLOYMENT_ID_ VARCHAR2(255), CONSTRAINT PK_FLW_EVENT_DEPLOYMENT PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_RESOURCE (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), RESOURCE_BYTES_ BLOB, CONSTRAINT PK_FLW_EVENT_RESOURCE PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_DEFINITION (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), VERSION_ INTEGER, KEY_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), TENANT_ID_ VARCHAR2(255), RESOURCE_NAME_ VARCHAR2(255), DESCRIPTION_ VARCHAR2(255), CONSTRAINT PK_FLW_EVENT_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+CREATE TABLE FLW_CHANNEL_DEFINITION (ID_ VARCHAR2(255) NOT NULL, NAME_ VARCHAR2(255), VERSION_ INTEGER, KEY_ VARCHAR2(255), CATEGORY_ VARCHAR2(255), DEPLOYMENT_ID_ VARCHAR2(255), CREATE_TIME_ TIMESTAMP(3), TENANT_ID_ VARCHAR2(255), RESOURCE_NAME_ VARCHAR2(255), DESCRIPTION_ VARCHAR2(255), CONSTRAINT PK_FLW_CHANNEL_DEFINITION PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.oracle.upgradestep.6710.to.6720.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.oracle.upgradestep.6710.to.6720.eventregistry.sql
new file mode 100644
index 00000000000..fb191dc4024
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.oracle.upgradestep.6710.to.6720.eventregistry.sql
@@ -0,0 +1,3 @@
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD TYPE_ VARCHAR2(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD IMPLEMENTATION_ VARCHAR2(255);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.postgres.upgradestep.6501.to.6502.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.postgres.upgradestep.6501.to.6502.eventregistry.sql
new file mode 100644
index 00000000000..151353e89a1
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.postgres.upgradestep.6501.to.6502.eventregistry.sql
@@ -0,0 +1,11 @@
+CREATE TABLE FLW_EVENT_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE, TENANT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), CONSTRAINT "FLW_EVENT_DEPLOYMENT_pkey" PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BYTEA, CONSTRAINT "FLW_EVENT_RESOURCE_pkey" PRIMARY KEY (ID_));
+
+CREATE TABLE FLW_EVENT_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INTEGER, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT "FLW_EVENT_DEFINITION_pkey" PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_, VERSION_, TENANT_ID_);
+
+CREATE TABLE FLW_CHANNEL_DEFINITION (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), VERSION_ INTEGER, KEY_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), CREATE_TIME_ TIMESTAMP(3) WITHOUT TIME ZONE, TENANT_ID_ VARCHAR(255), RESOURCE_NAME_ VARCHAR(255), DESCRIPTION_ VARCHAR(255), CONSTRAINT "FLW_CHANNEL_DEFINITION_pkey" PRIMARY KEY (ID_));
+
+CREATE UNIQUE INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_, VERSION_, TENANT_ID_);
diff --git a/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.postgres.upgradestep.6710.to.6720.eventregistry.sql b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.postgres.upgradestep.6710.to.6720.eventregistry.sql
new file mode 100644
index 00000000000..c8f873af992
--- /dev/null
+++ b/modules/flowable-event-registry/src/main/resources/org/flowable/eventregistry/db/upgrade/flowable.postgres.upgradestep.6710.to.6720.eventregistry.sql
@@ -0,0 +1,3 @@
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD TYPE_ VARCHAR(255);
+
+ALTER TABLE FLW_CHANNEL_DEFINITION ADD IMPLEMENTATION_ VARCHAR(255);
diff --git a/modules/flowable-event-registry/src/test/resources/flowable.eventregistry.cfg.xml b/modules/flowable-event-registry/src/test/resources/flowable.eventregistry.cfg.xml
index e8d2acd34c6..172b3dbb677 100644
--- a/modules/flowable-event-registry/src/test/resources/flowable.eventregistry.cfg.xml
+++ b/modules/flowable-event-registry/src/test/resources/flowable.eventregistry.cfg.xml
@@ -28,6 +28,8 @@
+
+
diff --git a/modules/flowable-event-registry/src/test/resources/flowableChangeDetector.eventregistry.cfg.xml b/modules/flowable-event-registry/src/test/resources/flowableChangeDetector.eventregistry.cfg.xml
index 3f9095e9cbd..1275ea823be 100644
--- a/modules/flowable-event-registry/src/test/resources/flowableChangeDetector.eventregistry.cfg.xml
+++ b/modules/flowable-event-registry/src/test/resources/flowableChangeDetector.eventregistry.cfg.xml
@@ -28,6 +28,8 @@
+
+
diff --git a/modules/flowable-eventsubscription-service/src/main/java/org/flowable/eventsubscription/service/impl/db/EventSubscriptionDbSchemaManager.java b/modules/flowable-eventsubscription-service/src/main/java/org/flowable/eventsubscription/service/impl/db/EventSubscriptionDbSchemaManager.java
deleted file mode 100644
index 8d4e7d46ffa..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/java/org/flowable/eventsubscription/service/impl/db/EventSubscriptionDbSchemaManager.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.flowable.eventsubscription.service.impl.db;
-
-import org.flowable.common.engine.impl.db.ServiceSqlScriptBasedDbSchemaManager;
-
-/**
- * @author Joram Barrez
- */
-public class EventSubscriptionDbSchemaManager extends ServiceSqlScriptBasedDbSchemaManager {
-
- private static final String TABLE = "ACT_RU_EVENT_SUBSCR";
- private static final String VERSION_PROPERTY = "eventsubscription.schema.version";
- private static final String SCHEMA_COMPONENT = "eventsubscription";
-
- public EventSubscriptionDbSchemaManager() {
- super(TABLE, SCHEMA_COMPONENT, null, VERSION_PROPERTY);
- }
-
- @Override
- protected String getResourcesRootDirectory() {
- return "org/flowable/eventsubscription/service/db/";
- }
-
-}
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.cockroachdb.create.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.cockroachdb.create.eventsubscription.sql
deleted file mode 100644
index 79d9fcba3f2..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.cockroachdb.create.eventsubscription.sql
+++ /dev/null
@@ -1,27 +0,0 @@
-create table ACT_RU_EVENT_SUBSCR (
- ID_ varchar(64) not null,
- REV_ integer,
- EVENT_TYPE_ varchar(255) not null,
- EVENT_NAME_ varchar(255),
- EXECUTION_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- ACTIVITY_ID_ varchar(64),
- CONFIGURATION_ varchar(255),
- CREATED_ timestamp not null,
- PROC_DEF_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_ID_ varchar(64),
- SCOPE_DEFINITION_ID_ varchar(64),
- SCOPE_DEFINITION_KEY_ varchar(255),
- SCOPE_TYPE_ varchar(64),
- LOCK_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
-create index ACT_IDX_EVENT_SUBSCR on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_);
-create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.db2.create.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.db2.create.eventsubscription.sql
deleted file mode 100644
index 57f34a39199..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.db2.create.eventsubscription.sql
+++ /dev/null
@@ -1,27 +0,0 @@
-create table ACT_RU_EVENT_SUBSCR (
- ID_ varchar(64) not null,
- REV_ integer,
- EVENT_TYPE_ varchar(255) not null,
- EVENT_NAME_ varchar(255),
- EXECUTION_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- ACTIVITY_ID_ varchar(64),
- CONFIGURATION_ varchar(255),
- CREATED_ timestamp not null,
- PROC_DEF_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_ID_ varchar(64),
- SCOPE_DEFINITION_ID_ varchar(64),
- SCOPE_DEFINITION_KEY_ varchar(255),
- SCOPE_TYPE_ varchar(64),
- LOCK_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
-create index ACT_IDX_EVENT_SUBSCR_EXEC_ID on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_);
-create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.h2.create.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.h2.create.eventsubscription.sql
deleted file mode 100644
index 873bb0bf292..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.h2.create.eventsubscription.sql
+++ /dev/null
@@ -1,26 +0,0 @@
-create table ACT_RU_EVENT_SUBSCR (
- ID_ varchar(64) not null,
- REV_ integer,
- EVENT_TYPE_ varchar(255) not null,
- EVENT_NAME_ varchar(255),
- EXECUTION_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- ACTIVITY_ID_ varchar(64),
- CONFIGURATION_ varchar(255),
- CREATED_ timestamp not null,
- PROC_DEF_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_ID_ varchar(64),
- SCOPE_DEFINITION_ID_ varchar(64),
- SCOPE_DEFINITION_KEY_ varchar(255),
- SCOPE_TYPE_ varchar(64),
- LOCK_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
-create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.hsql.create.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.hsql.create.eventsubscription.sql
deleted file mode 100644
index 873bb0bf292..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.hsql.create.eventsubscription.sql
+++ /dev/null
@@ -1,26 +0,0 @@
-create table ACT_RU_EVENT_SUBSCR (
- ID_ varchar(64) not null,
- REV_ integer,
- EVENT_TYPE_ varchar(255) not null,
- EVENT_NAME_ varchar(255),
- EXECUTION_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- ACTIVITY_ID_ varchar(64),
- CONFIGURATION_ varchar(255),
- CREATED_ timestamp not null,
- PROC_DEF_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_ID_ varchar(64),
- SCOPE_DEFINITION_ID_ varchar(64),
- SCOPE_DEFINITION_KEY_ varchar(255),
- SCOPE_TYPE_ varchar(64),
- LOCK_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
-create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.mssql.create.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.mssql.create.eventsubscription.sql
deleted file mode 100644
index b71bf8d7ca0..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.mssql.create.eventsubscription.sql
+++ /dev/null
@@ -1,27 +0,0 @@
-create table ACT_RU_EVENT_SUBSCR (
- ID_ nvarchar(64) not null,
- REV_ int,
- EVENT_TYPE_ nvarchar(255) not null,
- EVENT_NAME_ nvarchar(255),
- EXECUTION_ID_ nvarchar(64),
- PROC_INST_ID_ nvarchar(64),
- ACTIVITY_ID_ nvarchar(64),
- CONFIGURATION_ nvarchar(255),
- CREATED_ datetime not null,
- PROC_DEF_ID_ nvarchar(64),
- SUB_SCOPE_ID_ nvarchar(64),
- SCOPE_ID_ nvarchar(64),
- SCOPE_DEFINITION_ID_ nvarchar(64),
- SCOPE_DEFINITION_KEY_ nvarchar(255),
- SCOPE_TYPE_ nvarchar(64),
- LOCK_TIME_ datetime,
- LOCK_OWNER_ nvarchar(255),
- TENANT_ID_ nvarchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
-create index ACT_IDX_EVENT_SUBSCR_EXEC_ID on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_);
-create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.mysql.create.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.mysql.create.eventsubscription.sql
deleted file mode 100644
index f08b3828317..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.mysql.create.eventsubscription.sql
+++ /dev/null
@@ -1,26 +0,0 @@
-create table ACT_RU_EVENT_SUBSCR (
- ID_ varchar(64) not null,
- REV_ integer,
- EVENT_TYPE_ varchar(255) not null,
- EVENT_NAME_ varchar(255),
- EXECUTION_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- ACTIVITY_ID_ varchar(64),
- CONFIGURATION_ varchar(255),
- CREATED_ timestamp(3) not null DEFAULT CURRENT_TIMESTAMP(3),
- PROC_DEF_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_ID_ varchar(64),
- SCOPE_DEFINITION_ID_ varchar(64),
- SCOPE_DEFINITION_KEY_ varchar(255),
- SCOPE_TYPE_ varchar(64),
- LOCK_TIME_ timestamp(3) NULL,
- LOCK_OWNER_ varchar(255),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
-create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.mysql55.create.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.mysql55.create.eventsubscription.sql
deleted file mode 100644
index 54efcbf3577..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.mysql55.create.eventsubscription.sql
+++ /dev/null
@@ -1,26 +0,0 @@
-create table ACT_RU_EVENT_SUBSCR (
- ID_ varchar(64) not null,
- REV_ integer,
- EVENT_TYPE_ varchar(255) not null,
- EVENT_NAME_ varchar(255),
- EXECUTION_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- ACTIVITY_ID_ varchar(64),
- CONFIGURATION_ varchar(255),
- CREATED_ timestamp not null DEFAULT CURRENT_TIMESTAMP,
- PROC_DEF_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_ID_ varchar(64),
- SCOPE_DEFINITION_ID_ varchar(64),
- SCOPE_DEFINITION_KEY_ varchar(255),
- SCOPE_TYPE_ varchar(64),
- LOCK_TIME_ timestamp(3) NULL,
- LOCK_OWNER_ varchar(255),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
-create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.oracle.create.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.oracle.create.eventsubscription.sql
deleted file mode 100644
index 26371662a49..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.oracle.create.eventsubscription.sql
+++ /dev/null
@@ -1,27 +0,0 @@
-create table ACT_RU_EVENT_SUBSCR (
- ID_ NVARCHAR2(64) not null,
- REV_ integer,
- EVENT_TYPE_ NVARCHAR2(255) not null,
- EVENT_NAME_ NVARCHAR2(255),
- EXECUTION_ID_ NVARCHAR2(64),
- PROC_INST_ID_ NVARCHAR2(64),
- ACTIVITY_ID_ NVARCHAR2(64),
- CONFIGURATION_ NVARCHAR2(255),
- CREATED_ TIMESTAMP(6) not null,
- PROC_DEF_ID_ NVARCHAR2(64),
- SUB_SCOPE_ID_ NVARCHAR2(64),
- SCOPE_ID_ NVARCHAR2(64),
- SCOPE_DEFINITION_ID_ NVARCHAR2(64),
- SCOPE_DEFINITION_KEY_ NVARCHAR2(255),
- SCOPE_TYPE_ NVARCHAR2(64),
- LOCK_TIME_ TIMESTAMP(6),
- LOCK_OWNER_ NVARCHAR2(255),
- TENANT_ID_ NVARCHAR2(255) DEFAULT '',
- primary key (ID_)
-);
-
-create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
-create index ACT_IDX_EVENT_SUBSCR on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_);
-create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.postgres.create.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.postgres.create.eventsubscription.sql
deleted file mode 100644
index 79d9fcba3f2..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/create/flowable.postgres.create.eventsubscription.sql
+++ /dev/null
@@ -1,27 +0,0 @@
-create table ACT_RU_EVENT_SUBSCR (
- ID_ varchar(64) not null,
- REV_ integer,
- EVENT_TYPE_ varchar(255) not null,
- EVENT_NAME_ varchar(255),
- EXECUTION_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- ACTIVITY_ID_ varchar(64),
- CONFIGURATION_ varchar(255),
- CREATED_ timestamp not null,
- PROC_DEF_ID_ varchar(64),
- SUB_SCOPE_ID_ varchar(64),
- SCOPE_ID_ varchar(64),
- SCOPE_DEFINITION_ID_ varchar(64),
- SCOPE_DEFINITION_KEY_ varchar(255),
- SCOPE_TYPE_ varchar(64),
- LOCK_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
-create index ACT_IDX_EVENT_SUBSCR on ACT_RU_EVENT_SUBSCR(EXECUTION_ID_);
-create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.cockroachdb.drop.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.cockroachdb.drop.eventsubscription.sql
deleted file mode 100644
index b36a479af6a..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.cockroachdb.drop.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-drop table if exists ACT_RU_EVENT_SUBSCR cascade;
\ No newline at end of file
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.db2.drop.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.db2.drop.eventsubscription.sql
deleted file mode 100644
index 59260a8acd2..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.db2.drop.eventsubscription.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-drop index ACT_IDX_EVENT_SUBSCR_CONFIG_;
-drop index ACT_IDX_EVENT_SUBSCR_EXEC_ID;
-drop index ACT_IDX_EVENT_SUBSCR_SCOPEREF_;
-
-drop table ACT_RU_EVENT_SUBSCR;
\ No newline at end of file
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.h2.drop.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.h2.drop.eventsubscription.sql
deleted file mode 100644
index 3639bf58299..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.h2.drop.eventsubscription.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-drop table if exists ACT_RU_EVENT_SUBSCR cascade constraints;
-
-drop index if exists ACT_IDX_EVENT_SUBSCR_CONFIG_;
-drop index if exists ACT_IDX_EVENT_SUBSCR_SCOPEREF_;
\ No newline at end of file
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.hsql.drop.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.hsql.drop.eventsubscription.sql
deleted file mode 100644
index 5f5df645d65..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.hsql.drop.eventsubscription.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-drop table if exists ACT_RU_EVENT_SUBSCR cascade;
-
-drop index if exists ACT_IDX_EVENT_SUBSCR_CONFIG_;
-drop index if exists ACT_IDX_EVENT_SUBSCR_SCOPEREF_;
\ No newline at end of file
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.mssql.drop.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.mssql.drop.eventsubscription.sql
deleted file mode 100644
index d3f2c97d1a0..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.mssql.drop.eventsubscription.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_EVENT_SUBSCR_CONFIG_') drop index ACT_RU_EVENT_SUBSCR.ACT_IDX_EVENT_SUBSCR_CONFIG_;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_EVENT_SUBSCR_EXEC_ID') drop index ACT_RU_EVENT_SUBSCR.ACT_IDX_EVENT_SUBSCR_EXEC_ID;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_EVENT_SUBSCR_SCOPEREF_') drop index ACT_RU_EVENT_SUBSCR.ACT_IDX_EVENT_SUBSCR_SCOPEREF_;
-
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_EVENT_SUBSCR') drop table ACT_RU_EVENT_SUBSCR;
\ No newline at end of file
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.mysql.drop.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.mysql.drop.eventsubscription.sql
deleted file mode 100644
index fef93c02512..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.mysql.drop.eventsubscription.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-drop index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR;
-drop index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR;
-
-drop table if exists ACT_RU_EVENT_SUBSCR;
\ No newline at end of file
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.oracle.drop.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.oracle.drop.eventsubscription.sql
deleted file mode 100644
index 0d027a27d66..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.oracle.drop.eventsubscription.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-drop index ACT_IDX_EVENT_SUBSCR_CONFIG_;
-drop index ACT_IDX_EVENT_SUBSCR;
-drop index ACT_IDX_EVENT_SUBSCR_SCOPEREF_;
-
-drop table ACT_RU_EVENT_SUBSCR;
\ No newline at end of file
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.postgres.drop.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.postgres.drop.eventsubscription.sql
deleted file mode 100644
index b36a479af6a..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/drop/flowable.postgres.drop.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-drop table if exists ACT_RU_EVENT_SUBSCR cascade;
\ No newline at end of file
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6500.to.6501.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6500.to.6501.eventsubscription.sql
deleted file mode 100644
index ab76654567c..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6500.to.6501.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.1' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6501.to.6502.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6501.to.6502.eventsubscription.sql
deleted file mode 100644
index 6d8125bfe0c..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6501.to.6502.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.2' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6502.to.6503.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6502.to.6503.eventsubscription.sql
deleted file mode 100644
index 6ee30ab0d44..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6502.to.6503.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.3' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6503.to.6504.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6503.to.6504.eventsubscription.sql
deleted file mode 100644
index 34950503887..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6503.to.6504.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.4' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6504.to.6505.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6504.to.6505.eventsubscription.sql
deleted file mode 100644
index bdf11479eb5..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6504.to.6505.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.5' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6505.to.6506.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6505.to.6506.eventsubscription.sql
deleted file mode 100644
index 29419490c56..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6505.to.6506.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.6' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6506.to.6510.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6506.to.6510.eventsubscription.sql
deleted file mode 100644
index 6ba82056132..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6506.to.6510.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.0' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6510.to.6511.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6510.to.6511.eventsubscription.sql
deleted file mode 100644
index ebd0aff43c0..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6510.to.6511.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.1' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6511.to.6512.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6511.to.6512.eventsubscription.sql
deleted file mode 100644
index 45ac743458a..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6511.to.6512.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.2' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6512.to.6513.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6512.to.6513.eventsubscription.sql
deleted file mode 100644
index cb824cbcecd..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6512.to.6513.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.3' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6513.to.6514.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6513.to.6514.eventsubscription.sql
deleted file mode 100644
index f7aec701f95..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6513.to.6514.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.4' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6514.to.6515.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6514.to.6515.eventsubscription.sql
deleted file mode 100644
index e2aec8f8c21..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6514.to.6515.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.5' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6515.to.6516.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6515.to.6516.eventsubscription.sql
deleted file mode 100644
index eac6b414725..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6515.to.6516.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.6' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6516.to.6600.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6516.to.6600.eventsubscription.sql
deleted file mode 100644
index 2ae3eb85205..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6516.to.6600.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.0.0' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6600.to.6601.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6600.to.6601.eventsubscription.sql
deleted file mode 100644
index 66c2ce75103..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6600.to.6601.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.0.1' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6601.to.6610.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6601.to.6610.eventsubscription.sql
deleted file mode 100644
index 65276e038fe..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6601.to.6610.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.1.0' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6610.to.6620.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6610.to.6620.eventsubscription.sql
deleted file mode 100644
index 5823773011c..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6610.to.6620.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.2.0' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6620.to.6621.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6620.to.6621.eventsubscription.sql
deleted file mode 100644
index eb12d56bdd9..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6620.to.6621.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.2.1' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6621.to.6700.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6621.to.6700.eventsubscription.sql
deleted file mode 100644
index ad14c179059..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6621.to.6700.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.0.0' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6700.to.6701.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6700.to.6701.eventsubscription.sql
deleted file mode 100644
index 79d505c03b9..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6700.to.6701.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.0.1' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6701.to.6710.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6701.to.6710.eventsubscription.sql
deleted file mode 100644
index 322d098b4b6..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6701.to.6710.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.1.0' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6710.to.6720.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6710.to.6720.eventsubscription.sql
deleted file mode 100644
index 7838f9e8b98..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6710.to.6720.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.0' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6720.to.6721.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6720.to.6721.eventsubscription.sql
deleted file mode 100644
index deb2eee3db9..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6720.to.6721.eventsubscription.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-create index ACT_IDX_EVENT_SUBSCR_SCOPEREF_ on ACT_RU_EVENT_SUBSCR(SCOPE_ID_, SCOPE_TYPE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.1' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6722.to.6723.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6722.to.6723.eventsubscription.sql
deleted file mode 100644
index 97dd728add7..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6722.to.6723.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.3' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6723.to.6800.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6723.to.6800.eventsubscription.sql
deleted file mode 100644
index 2df327bbcb4..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6723.to.6800.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.8.0.0' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6800.to.6810.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6800.to.6810.eventsubscription.sql
deleted file mode 100644
index 739877b904c..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6800.to.6810.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.8.1.0' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6810.to.7000.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6810.to.7000.eventsubscription.sql
deleted file mode 100644
index 5d7ee4950a6..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.6810.to.7000.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.0.0.0' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.7000.to.7010.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.7000.to.7010.eventsubscription.sql
deleted file mode 100644
index 00daf12c0dc..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.7000.to.7010.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.0' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.7011.to.7100.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.7011.to.7100.eventsubscription.sql
deleted file mode 100644
index 1ead1cd9cc7..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.all.upgradestep.7011.to.7100.eventsubscription.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.1.0.0' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.cockroachdb.upgradestep.6721.to.6722.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.cockroachdb.upgradestep.6721.to.6722.eventsubscription.sql
deleted file mode 100644
index ca2bcc8228e..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.cockroachdb.upgradestep.6721.to.6722.eventsubscription.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column LOCK_TIME_ timestamp;
-alter table ACT_RU_EVENT_SUBSCR add column LOCK_OWNER_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.2' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.db2.upgradestep.6413.to.6500.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.db2.upgradestep.6413.to.6500.eventsubscription.sql
deleted file mode 100644
index 5e1067f0479..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.db2.upgradestep.6413.to.6500.eventsubscription.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column SUB_SCOPE_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_DEFINITION_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_TYPE_ varchar(64);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '6.5.0.0', 1);
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.db2.upgradestep.6721.to.6722.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.db2.upgradestep.6721.to.6722.eventsubscription.sql
deleted file mode 100644
index ca2bcc8228e..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.db2.upgradestep.6721.to.6722.eventsubscription.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column LOCK_TIME_ timestamp;
-alter table ACT_RU_EVENT_SUBSCR add column LOCK_OWNER_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.2' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.db2.upgradestep.7010.to.7011.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.db2.upgradestep.7010.to.7011.eventsubscription.sql
deleted file mode 100644
index 4d86f560f61..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.db2.upgradestep.7010.to.7011.eventsubscription.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_DEFINITION_KEY_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.1' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.h2.upgradestep.6413.to.6500.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.h2.upgradestep.6413.to.6500.eventsubscription.sql
deleted file mode 100644
index 0f52fce6961..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.h2.upgradestep.6413.to.6500.eventsubscription.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column SUB_SCOPE_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_DEFINITION_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_TYPE_ varchar(64);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '6.5.0.0', 1);
\ No newline at end of file
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.h2.upgradestep.6721.to.6722.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.h2.upgradestep.6721.to.6722.eventsubscription.sql
deleted file mode 100644
index ca2bcc8228e..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.h2.upgradestep.6721.to.6722.eventsubscription.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column LOCK_TIME_ timestamp;
-alter table ACT_RU_EVENT_SUBSCR add column LOCK_OWNER_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.2' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.h2.upgradestep.7010.to.7011.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.h2.upgradestep.7010.to.7011.eventsubscription.sql
deleted file mode 100644
index 4d86f560f61..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.h2.upgradestep.7010.to.7011.eventsubscription.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_DEFINITION_KEY_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.1' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.hsql.upgradestep.6413.to.6500.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.hsql.upgradestep.6413.to.6500.eventsubscription.sql
deleted file mode 100644
index 0f52fce6961..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.hsql.upgradestep.6413.to.6500.eventsubscription.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column SUB_SCOPE_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_DEFINITION_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_TYPE_ varchar(64);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '6.5.0.0', 1);
\ No newline at end of file
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.hsql.upgradestep.6721.to.6722.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.hsql.upgradestep.6721.to.6722.eventsubscription.sql
deleted file mode 100644
index ca2bcc8228e..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.hsql.upgradestep.6721.to.6722.eventsubscription.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column LOCK_TIME_ timestamp;
-alter table ACT_RU_EVENT_SUBSCR add column LOCK_OWNER_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.2' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.hsql.upgradestep.7010.to.7011.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.hsql.upgradestep.7010.to.7011.eventsubscription.sql
deleted file mode 100644
index 4d86f560f61..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.hsql.upgradestep.7010.to.7011.eventsubscription.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_DEFINITION_KEY_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.1' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mssql.upgradestep.6413.to.6500.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mssql.upgradestep.6413.to.6500.eventsubscription.sql
deleted file mode 100644
index 7f3315ad8a5..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mssql.upgradestep.6413.to.6500.eventsubscription.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add SUB_SCOPE_ID_ nvarchar(64);
-alter table ACT_RU_EVENT_SUBSCR add SCOPE_ID_ nvarchar(64);
-alter table ACT_RU_EVENT_SUBSCR add SCOPE_DEFINITION_ID_ nvarchar(64);
-alter table ACT_RU_EVENT_SUBSCR add SCOPE_TYPE_ nvarchar(64);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '6.5.0.0', 1);
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mssql.upgradestep.6721.to.6722.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mssql.upgradestep.6721.to.6722.eventsubscription.sql
deleted file mode 100644
index 4a92632506a..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mssql.upgradestep.6721.to.6722.eventsubscription.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add LOCK_TIME_ datetime;
-alter table ACT_RU_EVENT_SUBSCR add LOCK_OWNER_ nvarchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.2' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mssql.upgradestep.7010.to.7011.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mssql.upgradestep.7010.to.7011.eventsubscription.sql
deleted file mode 100644
index 975d894804f..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mssql.upgradestep.7010.to.7011.eventsubscription.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add SCOPE_DEFINITION_KEY_ nvarchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.1' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql.upgradestep.6413.to.6500.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql.upgradestep.6413.to.6500.eventsubscription.sql
deleted file mode 100644
index 0f52fce6961..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql.upgradestep.6413.to.6500.eventsubscription.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column SUB_SCOPE_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_DEFINITION_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_TYPE_ varchar(64);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '6.5.0.0', 1);
\ No newline at end of file
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql.upgradestep.6721.to.6722.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql.upgradestep.6721.to.6722.eventsubscription.sql
deleted file mode 100644
index 2e21f31f2fe..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql.upgradestep.6721.to.6722.eventsubscription.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column LOCK_TIME_ timestamp(3) NULL;
-alter table ACT_RU_EVENT_SUBSCR add column LOCK_OWNER_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.2' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql.upgradestep.7010.to.7011.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql.upgradestep.7010.to.7011.eventsubscription.sql
deleted file mode 100644
index 4d86f560f61..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql.upgradestep.7010.to.7011.eventsubscription.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_DEFINITION_KEY_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.1' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql55.upgradestep.6413.to.6500.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql55.upgradestep.6413.to.6500.eventsubscription.sql
deleted file mode 100644
index 0f52fce6961..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql55.upgradestep.6413.to.6500.eventsubscription.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column SUB_SCOPE_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_DEFINITION_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_TYPE_ varchar(64);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '6.5.0.0', 1);
\ No newline at end of file
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql55.upgradestep.6721.to.6722.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql55.upgradestep.6721.to.6722.eventsubscription.sql
deleted file mode 100644
index 2e21f31f2fe..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql55.upgradestep.6721.to.6722.eventsubscription.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column LOCK_TIME_ timestamp(3) NULL;
-alter table ACT_RU_EVENT_SUBSCR add column LOCK_OWNER_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.2' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql55.upgradestep.7010.to.7011.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql55.upgradestep.7010.to.7011.eventsubscription.sql
deleted file mode 100644
index 4d86f560f61..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.mysql55.upgradestep.7010.to.7011.eventsubscription.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_DEFINITION_KEY_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.1' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.oracle.upgradestep.6413.to.6500.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.oracle.upgradestep.6413.to.6500.eventsubscription.sql
deleted file mode 100644
index 386a22253d6..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.oracle.upgradestep.6413.to.6500.eventsubscription.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add SUB_SCOPE_ID_ NVARCHAR2(64);
-alter table ACT_RU_EVENT_SUBSCR add SCOPE_ID_ NVARCHAR2(64);
-alter table ACT_RU_EVENT_SUBSCR add SCOPE_DEFINITION_ID_ NVARCHAR2(64);
-alter table ACT_RU_EVENT_SUBSCR add SCOPE_TYPE_ NVARCHAR2(64);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '6.5.0.0', 1);
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.oracle.upgradestep.6721.to.6722.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.oracle.upgradestep.6721.to.6722.eventsubscription.sql
deleted file mode 100644
index 723a694b503..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.oracle.upgradestep.6721.to.6722.eventsubscription.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add LOCK_TIME_ TIMESTAMP(6);
-alter table ACT_RU_EVENT_SUBSCR add LOCK_OWNER_ NVARCHAR2(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.2' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.oracle.upgradestep.7010.to.7011.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.oracle.upgradestep.7010.to.7011.eventsubscription.sql
deleted file mode 100644
index e931396ddd6..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.oracle.upgradestep.7010.to.7011.eventsubscription.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add SCOPE_DEFINITION_KEY_ NVARCHAR2(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.1' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.postgres.upgradestep.6413.to.6500.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.postgres.upgradestep.6413.to.6500.eventsubscription.sql
deleted file mode 100644
index 0f52fce6961..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.postgres.upgradestep.6413.to.6500.eventsubscription.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column SUB_SCOPE_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_DEFINITION_ID_ varchar(64);
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_TYPE_ varchar(64);
-
-insert into ACT_GE_PROPERTY values ('eventsubscription.schema.version', '6.5.0.0', 1);
\ No newline at end of file
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.postgres.upgradestep.6721.to.6722.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.postgres.upgradestep.6721.to.6722.eventsubscription.sql
deleted file mode 100644
index ca2bcc8228e..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.postgres.upgradestep.6721.to.6722.eventsubscription.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column LOCK_TIME_ timestamp;
-alter table ACT_RU_EVENT_SUBSCR add column LOCK_OWNER_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.2' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.postgres.upgradestep.7010.to.7011.eventsubscription.sql b/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.postgres.upgradestep.7010.to.7011.eventsubscription.sql
deleted file mode 100644
index 4d86f560f61..00000000000
--- a/modules/flowable-eventsubscription-service/src/main/resources/org/flowable/eventsubscription/service/db/upgrade/flowable.postgres.upgradestep.7010.to.7011.eventsubscription.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_EVENT_SUBSCR add column SCOPE_DEFINITION_KEY_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.1' where NAME_ = 'eventsubscription.schema.version';
diff --git a/modules/flowable-external-job-rest/src/test/resources/application.properties b/modules/flowable-external-job-rest/src/test/resources/application.properties
index 8c1c686ff60..b2c37351d5a 100644
--- a/modules/flowable-external-job-rest/src/test/resources/application.properties
+++ b/modules/flowable-external-job-rest/src/test/resources/application.properties
@@ -1,6 +1,5 @@
spring.datasource.url=${jdbc.url:jdbc:h2:mem:flowable;DB_CLOSE_DELAY=1000}
spring.datasource.username=${jdbc.username:sa}
spring.datasource.password=${jdbc.password:}
-spring.liquibase.enabled=false
debug=true
logging.level.web=trace
diff --git a/modules/flowable-identitylink-service/src/main/java/org/flowable/identitylink/service/impl/db/IdentityLinkDbSchemaManager.java b/modules/flowable-identitylink-service/src/main/java/org/flowable/identitylink/service/impl/db/IdentityLinkDbSchemaManager.java
deleted file mode 100644
index 7b6fa7f55f2..00000000000
--- a/modules/flowable-identitylink-service/src/main/java/org/flowable/identitylink/service/impl/db/IdentityLinkDbSchemaManager.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.flowable.identitylink.service.impl.db;
-
-import org.flowable.common.engine.impl.db.ServiceSqlScriptBasedDbSchemaManager;
-
-/**
- * @author Joram Barrez
- */
-public class IdentityLinkDbSchemaManager extends ServiceSqlScriptBasedDbSchemaManager {
-
- private static final String TABLE = "ACT_RU_IDENTITYLINK";
- private static final String VERSION_PROPERTY = "identitylink.schema.version";
- private static final String SCHEMA_COMPONENT = "identitylink";
- private static final String SCHEMA_COMPONENT_HISTORY = "identitylink.history";
-
- public IdentityLinkDbSchemaManager() {
- super(TABLE, SCHEMA_COMPONENT, SCHEMA_COMPONENT_HISTORY, VERSION_PROPERTY);
- }
-
- @Override
- protected String getResourcesRootDirectory() {
- return "org/flowable/identitylink/service/db/";
- }
-
-}
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.cockroachdb.create.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.cockroachdb.create.identitylink.history.sql
deleted file mode 100644
index 03ba93cab94..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.cockroachdb.create.identitylink.history.sql
+++ /dev/null
@@ -1,21 +0,0 @@
-CREATE TABLE ACT_HI_IDENTITYLINK (
- ID_ varchar(64),
- GROUP_ID_ varchar(255),
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- PROC_INST_ID_ varchar(64),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- primary key (ID_)
-);
-
-create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
--- force-commit
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.cockroachdb.create.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.cockroachdb.create.identitylink.sql
deleted file mode 100644
index edbc6f89d7e..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.cockroachdb.create.identitylink.sql
+++ /dev/null
@@ -1,25 +0,0 @@
-create table ACT_RU_IDENTITYLINK (
- ID_ varchar(64),
- REV_ integer,
- GROUP_ID_ varchar(255),
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- PROC_DEF_ID_ varchar (64),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- primary key (ID_)
-);
-
-create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('identitylink.schema.version', '7.1.0.0', 1);
-
--- force-commit
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.db2.create.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.db2.create.identitylink.history.sql
deleted file mode 100644
index 65e0aa948b5..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.db2.create.identitylink.history.sql
+++ /dev/null
@@ -1,19 +0,0 @@
-create table ACT_HI_IDENTITYLINK (
- ID_ varchar(64) not null,
- GROUP_ID_ varchar(255),
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- PROC_INST_ID_ varchar(64),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- primary key (ID_)
-);
-
-create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.db2.create.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.db2.create.identitylink.sql
deleted file mode 100644
index b4ba495c060..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.db2.create.identitylink.sql
+++ /dev/null
@@ -1,23 +0,0 @@
-create table ACT_RU_IDENTITYLINK (
- ID_ varchar(64) not null,
- REV_ integer,
- GROUP_ID_ varchar(255),
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- primary key (ID_)
-);
-
-create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('identitylink.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.h2.create.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.h2.create.identitylink.history.sql
deleted file mode 100644
index 026e6eddcb5..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.h2.create.identitylink.history.sql
+++ /dev/null
@@ -1,19 +0,0 @@
-create table ACT_HI_IDENTITYLINK (
- ID_ varchar(64),
- GROUP_ID_ varchar(255),
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- PROC_INST_ID_ varchar(64) null,
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- primary key (ID_)
-);
-
-create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.h2.create.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.h2.create.identitylink.sql
deleted file mode 100644
index ec165ee5896..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.h2.create.identitylink.sql
+++ /dev/null
@@ -1,23 +0,0 @@
-create table ACT_RU_IDENTITYLINK (
- ID_ varchar(64),
- REV_ integer,
- GROUP_ID_ varchar(255),
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- PROC_INST_ID_ varchar(64) null,
- PROC_DEF_ID_ varchar(64),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- primary key (ID_)
-);
-
-create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('identitylink.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.hsql.create.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.hsql.create.identitylink.history.sql
deleted file mode 100644
index b8f6fce23d7..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.hsql.create.identitylink.history.sql
+++ /dev/null
@@ -1,20 +0,0 @@
-create table ACT_HI_IDENTITYLINK (
- ID_ varchar(64),
- GROUP_ID_ varchar(255),
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- PROC_INST_ID_ varchar(64) null,
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- primary key (ID_)
-);
-
-
-create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.hsql.create.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.hsql.create.identitylink.sql
deleted file mode 100644
index ec165ee5896..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.hsql.create.identitylink.sql
+++ /dev/null
@@ -1,23 +0,0 @@
-create table ACT_RU_IDENTITYLINK (
- ID_ varchar(64),
- REV_ integer,
- GROUP_ID_ varchar(255),
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- PROC_INST_ID_ varchar(64) null,
- PROC_DEF_ID_ varchar(64),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- primary key (ID_)
-);
-
-create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('identitylink.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mssql.create.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mssql.create.identitylink.history.sql
deleted file mode 100644
index 4912e3e705b..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mssql.create.identitylink.history.sql
+++ /dev/null
@@ -1,19 +0,0 @@
-create table ACT_HI_IDENTITYLINK (
- ID_ nvarchar(64),
- GROUP_ID_ nvarchar(255),
- TYPE_ nvarchar(255),
- USER_ID_ nvarchar(255),
- TASK_ID_ nvarchar(64),
- CREATE_TIME_ datetime,
- PROC_INST_ID_ nvarchar(64),
- SCOPE_ID_ nvarchar(255),
- SUB_SCOPE_ID_ nvarchar(255),
- SCOPE_TYPE_ nvarchar(255),
- SCOPE_DEFINITION_ID_ nvarchar(255),
- primary key (ID_)
-);
-
-create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mssql.create.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mssql.create.identitylink.sql
deleted file mode 100644
index f3a8959f8d4..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mssql.create.identitylink.sql
+++ /dev/null
@@ -1,23 +0,0 @@
-create table ACT_RU_IDENTITYLINK (
- ID_ nvarchar(64),
- REV_ int,
- GROUP_ID_ nvarchar(255),
- TYPE_ nvarchar(255),
- USER_ID_ nvarchar(255),
- TASK_ID_ nvarchar(64),
- PROC_INST_ID_ nvarchar(64),
- PROC_DEF_ID_ nvarchar(64),
- SCOPE_ID_ nvarchar(255),
- SUB_SCOPE_ID_ nvarchar(255),
- SCOPE_TYPE_ nvarchar(255),
- SCOPE_DEFINITION_ID_ nvarchar(255),
- primary key (ID_)
-);
-
-create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('identitylink.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mysql.create.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mysql.create.identitylink.history.sql
deleted file mode 100644
index deae8bf1176..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mysql.create.identitylink.history.sql
+++ /dev/null
@@ -1,19 +0,0 @@
-create table ACT_HI_IDENTITYLINK (
- ID_ varchar(64),
- GROUP_ID_ varchar(255),
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- CREATE_TIME_ datetime(3),
- PROC_INST_ID_ varchar(64),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mysql.create.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mysql.create.identitylink.sql
deleted file mode 100644
index d80d38ec04d..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mysql.create.identitylink.sql
+++ /dev/null
@@ -1,23 +0,0 @@
-create table ACT_RU_IDENTITYLINK (
- ID_ varchar(64),
- REV_ integer,
- GROUP_ID_ varchar(255),
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('identitylink.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mysql55.create.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mysql55.create.identitylink.history.sql
deleted file mode 100644
index 28a8def7b8b..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mysql55.create.identitylink.history.sql
+++ /dev/null
@@ -1,19 +0,0 @@
-create table ACT_HI_IDENTITYLINK (
- ID_ varchar(64),
- GROUP_ID_ varchar(255),
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- CREATE_TIME_ datetime,
- PROC_INST_ID_ varchar(64),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mysql55.create.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mysql55.create.identitylink.sql
deleted file mode 100644
index d80d38ec04d..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.mysql55.create.identitylink.sql
+++ /dev/null
@@ -1,23 +0,0 @@
-create table ACT_RU_IDENTITYLINK (
- ID_ varchar(64),
- REV_ integer,
- GROUP_ID_ varchar(255),
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('identitylink.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.oracle.create.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.oracle.create.identitylink.history.sql
deleted file mode 100644
index 5192322023b..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.oracle.create.identitylink.history.sql
+++ /dev/null
@@ -1,19 +0,0 @@
-create table ACT_HI_IDENTITYLINK (
- ID_ NVARCHAR2(64),
- GROUP_ID_ NVARCHAR2(255),
- TYPE_ NVARCHAR2(255),
- USER_ID_ NVARCHAR2(255),
- TASK_ID_ NVARCHAR2(64),
- CREATE_TIME_ TIMESTAMP(6),
- PROC_INST_ID_ NVARCHAR2(64),
- SCOPE_ID_ NVARCHAR2(255),
- SUB_SCOPE_ID_ NVARCHAR2(255),
- SCOPE_TYPE_ NVARCHAR2(255),
- SCOPE_DEFINITION_ID_ NVARCHAR2(255),
- primary key (ID_)
-);
-
-create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.oracle.create.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.oracle.create.identitylink.sql
deleted file mode 100644
index 8958e9ac4ef..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.oracle.create.identitylink.sql
+++ /dev/null
@@ -1,23 +0,0 @@
-create table ACT_RU_IDENTITYLINK (
- ID_ NVARCHAR2(64),
- REV_ INTEGER,
- GROUP_ID_ NVARCHAR2(255),
- TYPE_ NVARCHAR2(255),
- USER_ID_ NVARCHAR2(255),
- TASK_ID_ NVARCHAR2(64),
- PROC_INST_ID_ NVARCHAR2(64),
- PROC_DEF_ID_ NVARCHAR2(64),
- SCOPE_ID_ NVARCHAR2(255),
- SUB_SCOPE_ID_ NVARCHAR2(255),
- SCOPE_TYPE_ NVARCHAR2(255),
- SCOPE_DEFINITION_ID_ NVARCHAR2(255),
- primary key (ID_)
-);
-
-create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('identitylink.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.postgres.create.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.postgres.create.identitylink.history.sql
deleted file mode 100644
index e61df98fd1f..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.postgres.create.identitylink.history.sql
+++ /dev/null
@@ -1,19 +0,0 @@
-create table ACT_HI_IDENTITYLINK (
- ID_ varchar(64),
- GROUP_ID_ varchar(255),
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- PROC_INST_ID_ varchar(64),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- primary key (ID_)
-);
-
-create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.postgres.create.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.postgres.create.identitylink.sql
deleted file mode 100644
index f7d0778b800..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/create/flowable.postgres.create.identitylink.sql
+++ /dev/null
@@ -1,23 +0,0 @@
-create table ACT_RU_IDENTITYLINK (
- ID_ varchar(64),
- REV_ integer,
- GROUP_ID_ varchar(255),
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- PROC_DEF_ID_ varchar (64),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- primary key (ID_)
-);
-
-create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
-create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('identitylink.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.cockroachdb.drop.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.cockroachdb.drop.identitylink.history.sql
deleted file mode 100644
index b5b6f2da29b..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.cockroachdb.drop.identitylink.history.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-drop table if exists act_hi_identitylink cascade;
-
--- force-commit
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.cockroachdb.drop.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.cockroachdb.drop.identitylink.sql
deleted file mode 100644
index b86ebb33620..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.cockroachdb.drop.identitylink.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-drop table if exists act_ru_identitylink cascade;
-
--- force-commit
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.db2.drop.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.db2.drop.identitylink.history.sql
deleted file mode 100644
index 2bc03868639..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.db2.drop.identitylink.history.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-drop index ACT_IDX_HI_IDENT_LNK_USER;
-drop index ACT_IDX_HI_IDENT_LNK_SCOPE;
-drop index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE;
-drop index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF;
-
-drop table ACT_HI_IDENTITYLINK;
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.db2.drop.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.db2.drop.identitylink.sql
deleted file mode 100644
index 979ebb2439b..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.db2.drop.identitylink.sql
+++ /dev/null
@@ -1,7 +0,0 @@
-drop index ACT_IDX_IDENT_LNK_USER;
-drop index ACT_IDX_IDENT_LNK_GROUP;
-drop index ACT_IDX_IDENT_LNK_SCOPE;
-drop index ACT_IDX_IDENT_LNK_SUB_SCOPE;
-drop index ACT_IDX_IDENT_LNK_SCOPE_DEF;
-
-drop table ACT_RU_IDENTITYLINK;
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.h2.drop.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.h2.drop.identitylink.history.sql
deleted file mode 100644
index 06a80767905..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.h2.drop.identitylink.history.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-drop table if exists ACT_HI_IDENTITYLINK cascade constraints;
-
-drop index if exists ACT_IDX_HI_IDENT_LNK_USER;
-drop index if exists ACT_IDX_HI_IDENT_LNK_SCOPE;
-drop index if exists ACT_IDX_HI_IDENT_LNK_SUB_SCOPE;
-drop index if exists ACT_IDX_HI_IDENT_LNK_SCOPE_DEF;
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.h2.drop.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.h2.drop.identitylink.sql
deleted file mode 100644
index 5b88f5e8910..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.h2.drop.identitylink.sql
+++ /dev/null
@@ -1,7 +0,0 @@
-drop table if exists ACT_RU_IDENTITYLINK cascade constraints;
-
-drop index if exists ACT_IDX_IDENT_LNK_USER;
-drop index if exists ACT_IDX_IDENT_LNK_GROUP;
-drop index if exists ACT_IDX_IDENT_LNK_SCOPE;
-drop index if exists ACT_IDX_IDENT_LNK_SUB_SCOPE;
-drop index if exists ACT_IDX_IDENT_LNK_SCOPE_DEF;
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.hsql.drop.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.hsql.drop.identitylink.history.sql
deleted file mode 100644
index 8db436518ca..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.hsql.drop.identitylink.history.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-drop table if exists ACT_HI_IDENTITYLINK cascade;
-
-drop index if exists ACT_IDX_HI_IDENT_LNK_USER;
-drop index if exists ACT_IDX_HI_IDENT_LNK_SCOPE;
-drop index if exists ACT_IDX_HI_IDENT_LNK_SUB_SCOPE;
-drop index if exists ACT_IDX_HI_IDENT_LNK_SCOPE_DEF;
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.hsql.drop.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.hsql.drop.identitylink.sql
deleted file mode 100644
index 2659517a307..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.hsql.drop.identitylink.sql
+++ /dev/null
@@ -1,7 +0,0 @@
-drop table if exists ACT_RU_IDENTITYLINK cascade;
-
-drop index if exists ACT_IDX_IDENT_LNK_USER;
-drop index if exists ACT_IDX_IDENT_LNK_GROUP;
-drop index if exists ACT_IDX_IDENT_LNK_SCOPE;
-drop index if exists ACT_IDX_IDENT_LNK_SUB_SCOPE;
-drop index if exists ACT_IDX_IDENT_LNK_SCOPE_DEF;
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.mssql.drop.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.mssql.drop.identitylink.history.sql
deleted file mode 100644
index 65fd96baadb..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.mssql.drop.identitylink.history.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_HI_IDENT_LNK_USER') drop index ACT_HI_IDENTITYLINK.ACT_IDX_HI_IDENT_LNK_USER;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_HI_IDENT_LNK_SCOPE') drop index ACT_HI_IDENTITYLINK.ACT_IDX_HI_IDENT_LNK_SCOPE;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_HI_IDENT_LNK_SUB_SCOPE') drop index ACT_HI_IDENTITYLINK.ACT_IDX_HI_IDENT_LNK_SUB_SCOPE;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_HI_IDENT_LNK_SCOPE_DEF') drop index ACT_HI_IDENTITYLINK.ACT_IDX_HI_IDENT_LNK_SCOPE_DEF;
-
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_HI_IDENTITYLINK') drop table ACT_HI_IDENTITYLINK;
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.mssql.drop.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.mssql.drop.identitylink.sql
deleted file mode 100644
index c56d08dd81a..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.mssql.drop.identitylink.sql
+++ /dev/null
@@ -1,7 +0,0 @@
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_IDENT_LNK_USER') drop index ACT_RU_IDENTITYLINK.ACT_IDX_IDENT_LNK_USER;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_IDENT_LNK_GROUP') drop index ACT_RU_IDENTITYLINK.ACT_IDX_IDENT_LNK_GROUP;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_IDENT_LNK_SCOPE') drop index ACT_RU_IDENTITYLINK.ACT_IDX_IDENT_LNK_SCOPE;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_IDENT_LNK_SUB_SCOPE') drop index ACT_RU_IDENTITYLINK.ACT_IDX_IDENT_LNK_SUB_SCOPE;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_IDENT_LNK_SCOPE_DEF') drop index ACT_RU_IDENTITYLINK.ACT_IDX_IDENT_LNK_SCOPE_DEF;
-
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_IDENTITYLINK') drop table ACT_RU_IDENTITYLINK;
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.mysql.drop.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.mysql.drop.identitylink.history.sql
deleted file mode 100644
index cc3d7576fe2..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.mysql.drop.identitylink.history.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-drop index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK;
-drop index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK;
-drop index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK;
-drop index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK;
-
-drop table if exists ACT_HI_IDENTITYLINK;
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.mysql.drop.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.mysql.drop.identitylink.sql
deleted file mode 100644
index 066373b4a5d..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.mysql.drop.identitylink.sql
+++ /dev/null
@@ -1,7 +0,0 @@
-drop index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK;
-drop index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK;
-drop index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK;
-drop index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK;
-drop index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK;
-
-drop table if exists ACT_RU_IDENTITYLINK;
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.oracle.drop.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.oracle.drop.identitylink.history.sql
deleted file mode 100644
index 2bc03868639..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.oracle.drop.identitylink.history.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-drop index ACT_IDX_HI_IDENT_LNK_USER;
-drop index ACT_IDX_HI_IDENT_LNK_SCOPE;
-drop index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE;
-drop index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF;
-
-drop table ACT_HI_IDENTITYLINK;
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.oracle.drop.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.oracle.drop.identitylink.sql
deleted file mode 100644
index 979ebb2439b..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.oracle.drop.identitylink.sql
+++ /dev/null
@@ -1,7 +0,0 @@
-drop index ACT_IDX_IDENT_LNK_USER;
-drop index ACT_IDX_IDENT_LNK_GROUP;
-drop index ACT_IDX_IDENT_LNK_SCOPE;
-drop index ACT_IDX_IDENT_LNK_SUB_SCOPE;
-drop index ACT_IDX_IDENT_LNK_SCOPE_DEF;
-
-drop table ACT_RU_IDENTITYLINK;
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.postgres.drop.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.postgres.drop.identitylink.history.sql
deleted file mode 100644
index 4472d3a0cb5..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.postgres.drop.identitylink.history.sql
+++ /dev/null
@@ -1 +0,0 @@
-drop table if exists ACT_HI_IDENTITYLINK cascade;
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.postgres.drop.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.postgres.drop.identitylink.sql
deleted file mode 100644
index f71af376db8..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/drop/flowable.postgres.drop.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-drop table if exists ACT_RU_IDENTITYLINK cascade;
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6120.to.6200.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6120.to.6200.identitylink.sql
deleted file mode 100644
index 2dedba8c440..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6120.to.6200.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-insert into ACT_GE_PROPERTY values ('identitylink.schema.version', '6.2.0.0', 1);
\ No newline at end of file
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6200.to.6210.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6200.to.6210.identitylink.sql
deleted file mode 100644
index 3d8f67312bc..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6200.to.6210.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.2.1.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6300.to.6301.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6300.to.6301.identitylink.sql
deleted file mode 100644
index 45421676fa2..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6300.to.6301.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.3.0.1' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6301.to.6310.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6301.to.6310.identitylink.sql
deleted file mode 100644
index 6c2ce2954c7..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6301.to.6310.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.3.1.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6310.to.6320.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6310.to.6320.identitylink.sql
deleted file mode 100644
index 94345275e9c..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6310.to.6320.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.3.2.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6320.to.6400.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6320.to.6400.identitylink.sql
deleted file mode 100644
index c54f451c3b7..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6320.to.6400.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.4.0.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6400.to.6410.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6400.to.6410.identitylink.sql
deleted file mode 100644
index 718b2296f61..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6400.to.6410.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.4.1.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6410.to.6411.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6410.to.6411.identitylink.sql
deleted file mode 100644
index ddce22359e1..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6410.to.6411.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.4.1.1' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6411.to.6412.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6411.to.6412.identitylink.history.sql
deleted file mode 100644
index d40b18a5c51..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6411.to.6412.identitylink.history.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-update ACT_HI_IDENTITYLINK set SCOPE_DEFINITION_ID_ = null where SCOPE_ID_ is not null and SCOPE_DEFINITION_ID_ is not null;
-
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6411.to.6412.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6411.to.6412.identitylink.sql
deleted file mode 100644
index 251cb58fd85..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6411.to.6412.identitylink.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-update ACT_RU_IDENTITYLINK set SCOPE_DEFINITION_ID_ = null where SCOPE_ID_ is not null and SCOPE_DEFINITION_ID_ is not null;
-
-update ACT_GE_PROPERTY set VALUE_ = '6.4.1.2' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6412.to.6413.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6412.to.6413.identitylink.sql
deleted file mode 100644
index 1ae143dbd00..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6412.to.6413.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.4.1.3' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6413.to.6500.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6413.to.6500.identitylink.sql
deleted file mode 100644
index 3caa0af8651..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6413.to.6500.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6500.to.6501.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6500.to.6501.identitylink.sql
deleted file mode 100644
index 2aad659be98..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6500.to.6501.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.1' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6501.to.6502.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6501.to.6502.identitylink.sql
deleted file mode 100644
index c54b0510994..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6501.to.6502.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.2' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6503.to.6504.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6503.to.6504.identitylink.sql
deleted file mode 100644
index 1dcfac8fc66..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6503.to.6504.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.4' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6504.to.6505.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6504.to.6505.identitylink.sql
deleted file mode 100644
index 8b9bf1c2b95..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6504.to.6505.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.5' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6505.to.6506.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6505.to.6506.identitylink.sql
deleted file mode 100644
index 577a1406840..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6505.to.6506.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.6' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6506.to.6510.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6506.to.6510.identitylink.sql
deleted file mode 100644
index 75be8aec0d4..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6506.to.6510.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6510.to.6511.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6510.to.6511.identitylink.sql
deleted file mode 100644
index 12495a30bc0..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6510.to.6511.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.1' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6511.to.6512.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6511.to.6512.identitylink.sql
deleted file mode 100644
index 70f1a65f932..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6511.to.6512.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.2' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6512.to.6513.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6512.to.6513.identitylink.sql
deleted file mode 100644
index 90073233cda..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6512.to.6513.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.3' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6513.to.6514.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6513.to.6514.identitylink.sql
deleted file mode 100644
index d3cea641a71..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6513.to.6514.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.4' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6514.to.6515.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6514.to.6515.identitylink.sql
deleted file mode 100644
index 21b9fc64855..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6514.to.6515.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.5' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6515.to.6516.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6515.to.6516.identitylink.sql
deleted file mode 100644
index e4b2d8563ba..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6515.to.6516.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.6' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6516.to.6600.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6516.to.6600.identitylink.sql
deleted file mode 100644
index 700eca3d51e..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6516.to.6600.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.0.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6600.to.6601.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6600.to.6601.identitylink.sql
deleted file mode 100644
index 2d8df6ab1a1..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6600.to.6601.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.0.1' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6601.to.6610.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6601.to.6610.identitylink.sql
deleted file mode 100644
index 30b57239e14..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6601.to.6610.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.1.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6610.to.6620.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6610.to.6620.identitylink.sql
deleted file mode 100644
index e354b32c039..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6610.to.6620.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.2.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6620.to.6621.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6620.to.6621.identitylink.sql
deleted file mode 100644
index e66b56db69e..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6620.to.6621.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.2.1' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6621.to.6700.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6621.to.6700.identitylink.sql
deleted file mode 100644
index edf889400ad..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6621.to.6700.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.0.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6700.to.6701.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6700.to.6701.identitylink.sql
deleted file mode 100644
index e6387b9ac2b..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6700.to.6701.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.0.1' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6701.to.6710.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6701.to.6710.identitylink.sql
deleted file mode 100644
index 09fad6c0125..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6701.to.6710.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.1.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6710.to.6720.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6710.to.6720.identitylink.sql
deleted file mode 100644
index 8e2dec89f86..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6710.to.6720.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6720.to.6721.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6720.to.6721.identitylink.sql
deleted file mode 100644
index 13698fcbd26..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6720.to.6721.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.1' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6721.to.6722.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6721.to.6722.identitylink.sql
deleted file mode 100644
index 0b72f2d6f19..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6721.to.6722.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.2' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6722.to.6723.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6722.to.6723.identitylink.sql
deleted file mode 100644
index bf5ee879d77..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6722.to.6723.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.3' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6723.to.6800.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6723.to.6800.identitylink.sql
deleted file mode 100644
index 2fbe1042f42..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6723.to.6800.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.8.0.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6800.to.6810.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6800.to.6810.identitylink.sql
deleted file mode 100644
index a862bddc808..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6800.to.6810.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.8.1.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6810.to.7000.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6810.to.7000.identitylink.sql
deleted file mode 100644
index b738672367f..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.6810.to.7000.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.0.0.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.7000.to.7010.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.7000.to.7010.identitylink.sql
deleted file mode 100644
index 9ad56369414..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.7000.to.7010.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.7010.to.7011.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.7010.to.7011.identitylink.sql
deleted file mode 100644
index fff15ef60f9..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.7010.to.7011.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.1' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.7011.to.7100.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.7011.to.7100.identitylink.sql
deleted file mode 100644
index 15812286b26..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.all.upgradestep.7011.to.7100.identitylink.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.1.0.0' where NAME_ = 'identitylink.schema.version';
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.db2.upgradestep.6210.to.6300.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.db2.upgradestep.6210.to.6300.identitylink.history.sql
deleted file mode 100644
index c42ddb32f38..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.db2.upgradestep.6210.to.6300.identitylink.history.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add column SCOPE_ID_ varchar(255);
-alter table ACT_HI_IDENTITYLINK add column SCOPE_TYPE_ varchar(255);
-alter table ACT_HI_IDENTITYLINK add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.db2.upgradestep.6210.to.6300.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.db2.upgradestep.6210.to.6300.identitylink.sql
deleted file mode 100644
index a944cc77a90..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.db2.upgradestep.6210.to.6300.identitylink.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.3.0.0' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_IDENTITYLINK add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_IDENTITYLINK add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.db2.upgradestep.6502.to.6503.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.db2.upgradestep.6502.to.6503.identitylink.history.sql
deleted file mode 100644
index 4c4565e8ad4..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.db2.upgradestep.6502.to.6503.identitylink.history.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add column SUB_SCOPE_ID_ varchar(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.db2.upgradestep.6502.to.6503.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.db2.upgradestep.6502.to.6503.identitylink.sql
deleted file mode 100644
index 7f8c226a1f5..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.db2.upgradestep.6502.to.6503.identitylink.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.3' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add column SUB_SCOPE_ID_ varchar(255);
-
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.h2.upgradestep.6210.to.6300.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.h2.upgradestep.6210.to.6300.identitylink.history.sql
deleted file mode 100644
index c42ddb32f38..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.h2.upgradestep.6210.to.6300.identitylink.history.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add column SCOPE_ID_ varchar(255);
-alter table ACT_HI_IDENTITYLINK add column SCOPE_TYPE_ varchar(255);
-alter table ACT_HI_IDENTITYLINK add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.h2.upgradestep.6210.to.6300.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.h2.upgradestep.6210.to.6300.identitylink.sql
deleted file mode 100644
index a944cc77a90..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.h2.upgradestep.6210.to.6300.identitylink.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.3.0.0' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_IDENTITYLINK add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_IDENTITYLINK add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.h2.upgradestep.6502.to.6503.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.h2.upgradestep.6502.to.6503.identitylink.history.sql
deleted file mode 100644
index 4c4565e8ad4..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.h2.upgradestep.6502.to.6503.identitylink.history.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add column SUB_SCOPE_ID_ varchar(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.h2.upgradestep.6502.to.6503.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.h2.upgradestep.6502.to.6503.identitylink.sql
deleted file mode 100644
index 7f8c226a1f5..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.h2.upgradestep.6502.to.6503.identitylink.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.3' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add column SUB_SCOPE_ID_ varchar(255);
-
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.hsql.upgradestep.6210.to.6300.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.hsql.upgradestep.6210.to.6300.identitylink.history.sql
deleted file mode 100644
index c42ddb32f38..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.hsql.upgradestep.6210.to.6300.identitylink.history.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add column SCOPE_ID_ varchar(255);
-alter table ACT_HI_IDENTITYLINK add column SCOPE_TYPE_ varchar(255);
-alter table ACT_HI_IDENTITYLINK add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.hsql.upgradestep.6210.to.6300.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.hsql.upgradestep.6210.to.6300.identitylink.sql
deleted file mode 100644
index a944cc77a90..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.hsql.upgradestep.6210.to.6300.identitylink.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.3.0.0' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_IDENTITYLINK add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_IDENTITYLINK add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.hsql.upgradestep.6502.to.6503.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.hsql.upgradestep.6502.to.6503.identitylink.history.sql
deleted file mode 100644
index 4c4565e8ad4..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.hsql.upgradestep.6502.to.6503.identitylink.history.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add column SUB_SCOPE_ID_ varchar(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.hsql.upgradestep.6502.to.6503.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.hsql.upgradestep.6502.to.6503.identitylink.sql
deleted file mode 100644
index 7f8c226a1f5..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.hsql.upgradestep.6502.to.6503.identitylink.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.3' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add column SUB_SCOPE_ID_ varchar(255);
-
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mssql.upgradestep.6210.to.6300.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mssql.upgradestep.6210.to.6300.identitylink.history.sql
deleted file mode 100644
index 3cb73ad5545..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mssql.upgradestep.6210.to.6300.identitylink.history.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add SCOPE_ID_ nvarchar(255);
-alter table ACT_HI_IDENTITYLINK add SCOPE_TYPE_ nvarchar(255);
-alter table ACT_HI_IDENTITYLINK add SCOPE_DEFINITION_ID_ nvarchar(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mssql.upgradestep.6210.to.6300.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mssql.upgradestep.6210.to.6300.identitylink.sql
deleted file mode 100644
index 17e1aa23ea2..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mssql.upgradestep.6210.to.6300.identitylink.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.3.0.0' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add SCOPE_ID_ nvarchar(255);
-alter table ACT_RU_IDENTITYLINK add SCOPE_TYPE_ nvarchar(255);
-alter table ACT_RU_IDENTITYLINK add SCOPE_DEFINITION_ID_ nvarchar(255);
-
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mssql.upgradestep.6502.to.6503.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mssql.upgradestep.6502.to.6503.identitylink.history.sql
deleted file mode 100644
index 7a80e975be3..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mssql.upgradestep.6502.to.6503.identitylink.history.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add SUB_SCOPE_ID_ nvarchar(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mssql.upgradestep.6502.to.6503.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mssql.upgradestep.6502.to.6503.identitylink.sql
deleted file mode 100644
index 84fc90d4921..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mssql.upgradestep.6502.to.6503.identitylink.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.3' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add SUB_SCOPE_ID_ nvarchar(255);
-
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql.upgradestep.6210.to.6300.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql.upgradestep.6210.to.6300.identitylink.history.sql
deleted file mode 100644
index c42ddb32f38..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql.upgradestep.6210.to.6300.identitylink.history.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add column SCOPE_ID_ varchar(255);
-alter table ACT_HI_IDENTITYLINK add column SCOPE_TYPE_ varchar(255);
-alter table ACT_HI_IDENTITYLINK add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql.upgradestep.6210.to.6300.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql.upgradestep.6210.to.6300.identitylink.sql
deleted file mode 100644
index a944cc77a90..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql.upgradestep.6210.to.6300.identitylink.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.3.0.0' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_IDENTITYLINK add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_IDENTITYLINK add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql.upgradestep.6502.to.6503.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql.upgradestep.6502.to.6503.identitylink.history.sql
deleted file mode 100644
index 4c4565e8ad4..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql.upgradestep.6502.to.6503.identitylink.history.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add column SUB_SCOPE_ID_ varchar(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql.upgradestep.6502.to.6503.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql.upgradestep.6502.to.6503.identitylink.sql
deleted file mode 100644
index 7f8c226a1f5..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql.upgradestep.6502.to.6503.identitylink.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.3' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add column SUB_SCOPE_ID_ varchar(255);
-
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql55.upgradestep.6210.to.6300.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql55.upgradestep.6210.to.6300.identitylink.history.sql
deleted file mode 100644
index c42ddb32f38..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql55.upgradestep.6210.to.6300.identitylink.history.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add column SCOPE_ID_ varchar(255);
-alter table ACT_HI_IDENTITYLINK add column SCOPE_TYPE_ varchar(255);
-alter table ACT_HI_IDENTITYLINK add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql55.upgradestep.6210.to.6300.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql55.upgradestep.6210.to.6300.identitylink.sql
deleted file mode 100644
index a944cc77a90..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql55.upgradestep.6210.to.6300.identitylink.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.3.0.0' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_IDENTITYLINK add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_IDENTITYLINK add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql55.upgradestep.6502.to.6503.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql55.upgradestep.6502.to.6503.identitylink.history.sql
deleted file mode 100644
index 4c4565e8ad4..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql55.upgradestep.6502.to.6503.identitylink.history.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add column SUB_SCOPE_ID_ varchar(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql55.upgradestep.6502.to.6503.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql55.upgradestep.6502.to.6503.identitylink.sql
deleted file mode 100644
index 7f8c226a1f5..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.mysql55.upgradestep.6502.to.6503.identitylink.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.3' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add column SUB_SCOPE_ID_ varchar(255);
-
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.oracle.upgradestep.6210.to.6300.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.oracle.upgradestep.6210.to.6300.identitylink.history.sql
deleted file mode 100644
index f58c8e5d7cd..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.oracle.upgradestep.6210.to.6300.identitylink.history.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add SCOPE_ID_ NVARCHAR2(255);
-alter table ACT_HI_IDENTITYLINK add SCOPE_TYPE_ NVARCHAR2(255);
-alter table ACT_HI_IDENTITYLINK add SCOPE_DEFINITION_ID_ NVARCHAR2(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.oracle.upgradestep.6210.to.6300.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.oracle.upgradestep.6210.to.6300.identitylink.sql
deleted file mode 100644
index ffacfc4b550..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.oracle.upgradestep.6210.to.6300.identitylink.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.3.0.0' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add SCOPE_ID_ NVARCHAR2(255);
-alter table ACT_RU_IDENTITYLINK add SCOPE_TYPE_ NVARCHAR2(255);
-alter table ACT_RU_IDENTITYLINK add SCOPE_DEFINITION_ID_ NVARCHAR2(255);
-
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.oracle.upgradestep.6502.to.6503.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.oracle.upgradestep.6502.to.6503.identitylink.history.sql
deleted file mode 100644
index 16887a6c1ee..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.oracle.upgradestep.6502.to.6503.identitylink.history.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add SUB_SCOPE_ID_ NVARCHAR2(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.oracle.upgradestep.6502.to.6503.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.oracle.upgradestep.6502.to.6503.identitylink.sql
deleted file mode 100644
index 774262368fc..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.oracle.upgradestep.6502.to.6503.identitylink.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.3' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add SUB_SCOPE_ID_ NVARCHAR2(255);
-
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.postgres.upgradestep.6210.to.6300.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.postgres.upgradestep.6210.to.6300.identitylink.history.sql
deleted file mode 100644
index c42ddb32f38..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.postgres.upgradestep.6210.to.6300.identitylink.history.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add column SCOPE_ID_ varchar(255);
-alter table ACT_HI_IDENTITYLINK add column SCOPE_TYPE_ varchar(255);
-alter table ACT_HI_IDENTITYLINK add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SCOPE on ACT_HI_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF on ACT_HI_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.postgres.upgradestep.6210.to.6300.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.postgres.upgradestep.6210.to.6300.identitylink.sql
deleted file mode 100644
index a944cc77a90..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.postgres.upgradestep.6210.to.6300.identitylink.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.3.0.0' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_IDENTITYLINK add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_IDENTITYLINK add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_IDENT_LNK_SCOPE on ACT_RU_IDENTITYLINK(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_IDENT_LNK_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.postgres.upgradestep.6502.to.6503.identitylink.history.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.postgres.upgradestep.6502.to.6503.identitylink.history.sql
deleted file mode 100644
index 4c4565e8ad4..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.postgres.upgradestep.6502.to.6503.identitylink.history.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_HI_IDENTITYLINK add column SUB_SCOPE_ID_ varchar(255);
-
-create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE on ACT_HI_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.postgres.upgradestep.6502.to.6503.identitylink.sql b/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.postgres.upgradestep.6502.to.6503.identitylink.sql
deleted file mode 100644
index 7f8c226a1f5..00000000000
--- a/modules/flowable-identitylink-service/src/main/resources/org/flowable/identitylink/service/db/upgrade/flowable.postgres.upgradestep.6502.to.6503.identitylink.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.3' where NAME_ = 'identitylink.schema.version';
-
-alter table ACT_RU_IDENTITYLINK add column SUB_SCOPE_ID_ varchar(255);
-
-create index ACT_IDX_IDENT_LNK_SUB_SCOPE on ACT_RU_IDENTITYLINK(SUB_SCOPE_ID_, SCOPE_TYPE_);
diff --git a/modules/flowable-idm-engine-configurator/src/main/java/org/flowable/idm/engine/configurator/IdmEngineConfigurator.java b/modules/flowable-idm-engine-configurator/src/main/java/org/flowable/idm/engine/configurator/IdmEngineConfigurator.java
index 5b9ae87e347..936b38ab57a 100644
--- a/modules/flowable-idm-engine-configurator/src/main/java/org/flowable/idm/engine/configurator/IdmEngineConfigurator.java
+++ b/modules/flowable-idm-engine-configurator/src/main/java/org/flowable/idm/engine/configurator/IdmEngineConfigurator.java
@@ -19,6 +19,7 @@
import org.flowable.common.engine.impl.EngineDeployer;
import org.flowable.common.engine.impl.interceptor.EngineConfigurationConstants;
import org.flowable.common.engine.impl.persistence.entity.Entity;
+import org.flowable.idm.engine.IdmEngine;
import org.flowable.idm.engine.IdmEngineConfiguration;
import org.flowable.idm.engine.impl.cfg.StandaloneIdmEngineConfiguration;
import org.flowable.idm.engine.impl.db.EntityDependencyOrder;
@@ -27,7 +28,7 @@
* @author Tijs Rademakers
* @author Joram Barrez
*/
-public class IdmEngineConfigurator extends AbstractEngineConfigurator {
+public class IdmEngineConfigurator extends AbstractEngineConfigurator {
protected IdmEngineConfiguration idmEngineConfiguration;
@@ -54,11 +55,16 @@ public void configure(AbstractEngineConfiguration engineConfiguration) {
initialiseCommonProperties(engineConfiguration, idmEngineConfiguration);
- idmEngineConfiguration.buildIdmEngine();
+ initEngine();
initServiceConfigurations(engineConfiguration, idmEngineConfiguration);
}
+ @Override
+ protected IdmEngine buildEngine() {
+ return idmEngineConfiguration.buildEngine();
+ }
+
@Override
protected List> getEntityInsertionOrder() {
return EntityDependencyOrder.INSERT_ORDER;
diff --git a/modules/flowable-idm-engine/pom.xml b/modules/flowable-idm-engine/pom.xml
index a731827f2d2..5b9da9298d0 100755
--- a/modules/flowable-idm-engine/pom.xml
+++ b/modules/flowable-idm-engine/pom.xml
@@ -20,7 +20,7 @@
org.flowable.idm.db.create,
- org.flowable.idm.db.update,
+ org.flowable.idm.db.upgrade,
org.flowable.idm.db.mapping,
org.flowable.idm.db.mapping.entity,
diff --git a/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/IdmEngineConfiguration.java b/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/IdmEngineConfiguration.java
index 6a80d69dc3b..a271ef03011 100755
--- a/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/IdmEngineConfiguration.java
+++ b/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/IdmEngineConfiguration.java
@@ -18,15 +18,17 @@
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
+import java.util.function.Consumer;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.transaction.TransactionFactory;
import org.flowable.common.engine.api.delegate.event.FlowableEventDispatcher;
import org.flowable.common.engine.api.delegate.event.FlowableEventListener;
-import org.flowable.common.engine.impl.AbstractEngineConfiguration;
+import org.flowable.common.engine.impl.AbstractBuildableEngineConfiguration;
import org.flowable.common.engine.impl.cfg.BeansConfigurationHelper;
import org.flowable.common.engine.impl.cfg.IdGenerator;
import org.flowable.common.engine.impl.db.DbSqlSessionFactory;
+import org.flowable.common.engine.impl.db.SchemaManager;
import org.flowable.common.engine.impl.event.FlowableEventDispatcherImpl;
import org.flowable.common.engine.impl.interceptor.CommandConfig;
import org.flowable.common.engine.impl.interceptor.CommandInterceptor;
@@ -41,9 +43,9 @@
import org.flowable.idm.api.PasswordSalt;
import org.flowable.idm.api.event.FlowableIdmEventType;
import org.flowable.idm.engine.impl.IdmEngineImpl;
+import org.flowable.idm.engine.impl.IdmEnginePostEngineBuildConsumer;
import org.flowable.idm.engine.impl.IdmIdentityServiceImpl;
import org.flowable.idm.engine.impl.IdmManagementServiceImpl;
-import org.flowable.idm.engine.impl.SchemaOperationsIdmEngineBuild;
import org.flowable.idm.engine.impl.authentication.BlankSalt;
import org.flowable.idm.engine.impl.authentication.ClearTextPasswordEncoder;
import org.flowable.idm.engine.impl.cfg.StandaloneIdmEngineConfiguration;
@@ -87,7 +89,7 @@
import org.flowable.idm.engine.impl.persistence.entity.data.impl.MybatisTokenDataManager;
import org.flowable.idm.engine.impl.persistence.entity.data.impl.MybatisUserDataManager;
-public class IdmEngineConfiguration extends AbstractEngineConfiguration implements IdmEngineConfigurationApi {
+public class IdmEngineConfiguration extends AbstractBuildableEngineConfiguration implements IdmEngineConfigurationApi {
public static final String DEFAULT_MYBATIS_MAPPING_FILE = "org/flowable/idm/db/mapping/mappings.xml";
@@ -159,14 +161,24 @@ public IdmEngineConfiguration() {
// buildProcessEngine
// ///////////////////////////////////////////////////////
- public IdmEngine buildIdmEngine() {
- init();
+ @Override
+ protected IdmEngine createEngine() {
return new IdmEngineImpl(this);
}
+ @Override
+ protected Consumer createPostEngineBuildConsumer() {
+ return new IdmEnginePostEngineBuildConsumer();
+ }
+
+ public IdmEngine buildIdmEngine() {
+ return buildEngine();
+ }
+
// init
// /////////////////////////////////////////////////////////////////////
+ @Override
protected void init() {
initEngineConfigurations();
initClock();
@@ -201,19 +213,8 @@ protected void init() {
}
@Override
- public void initSchemaManager() {
- super.initSchemaManager();
- if (this.schemaManager == null) {
- this.schemaManager = new IdmDbSchemaManager();
- }
- }
-
- public void initSchemaManagementCommand() {
- if (schemaManagementCmd == null) {
- if (usingRelationalDatabase && databaseSchemaUpdate != null) {
- this.schemaManagementCmd = new SchemaOperationsIdmEngineBuild();
- }
- }
+ protected SchemaManager createEngineSchemaManager() {
+ return new IdmDbSchemaManager();
}
// services
diff --git a/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/IdmEnginePostEngineBuildConsumer.java b/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/IdmEnginePostEngineBuildConsumer.java
new file mode 100644
index 00000000000..81fa1bf9883
--- /dev/null
+++ b/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/IdmEnginePostEngineBuildConsumer.java
@@ -0,0 +1,35 @@
+/* Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.flowable.idm.engine.impl;
+
+import java.util.function.Consumer;
+
+import org.flowable.common.engine.api.engine.EngineLifecycleListener;
+import org.flowable.idm.engine.IdmEngine;
+import org.flowable.idm.engine.IdmEngineConfiguration;
+
+/**
+ * @author Filip Hrisafov
+ */
+public class IdmEnginePostEngineBuildConsumer implements Consumer {
+
+ @Override
+ public void accept(IdmEngine idmEngine) {
+ IdmEngineConfiguration engineConfiguration = idmEngine.getIdmEngineConfiguration();
+ if (engineConfiguration.getEngineLifecycleListeners() != null) {
+ for (EngineLifecycleListener engineLifecycleListener : engineConfiguration.getEngineLifecycleListeners()) {
+ engineLifecycleListener.onEngineBuilt(idmEngine);
+ }
+ }
+ }
+}
diff --git a/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/SchemaOperationsIdmEngineBuild.java b/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/SchemaOperationsIdmEngineBuild.java
deleted file mode 100644
index 1c9c5a23708..00000000000
--- a/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/SchemaOperationsIdmEngineBuild.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.flowable.idm.engine.impl;
-
-import org.flowable.common.engine.impl.interceptor.Command;
-import org.flowable.common.engine.impl.interceptor.CommandContext;
-import org.flowable.idm.engine.impl.db.IdmDbSchemaManager;
-import org.flowable.idm.engine.impl.util.CommandContextUtil;
-
-/**
- * @author Tijs Rademakers
- * @author Joram Barrez
- */
-public final class SchemaOperationsIdmEngineBuild implements Command {
-
- @Override
- public Void execute(CommandContext commandContext) {
- IdmDbSchemaManager idmDbSchemaManager = (IdmDbSchemaManager) CommandContextUtil.getIdmEngineConfiguration(commandContext).getSchemaManager();
- idmDbSchemaManager.performSchemaOperationsIdmEngineBuild();
- return null;
- }
-}
\ No newline at end of file
diff --git a/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/db/DbSchemaDrop.java b/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/db/DbSchemaDrop.java
index 1f1d8920884..030843ea5cc 100644
--- a/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/db/DbSchemaDrop.java
+++ b/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/db/DbSchemaDrop.java
@@ -13,13 +13,11 @@
package org.flowable.idm.engine.impl.db;
-import org.flowable.common.engine.impl.interceptor.Command;
+import org.flowable.common.engine.impl.db.SchemaOperationsEngineDropDbCmd;
import org.flowable.common.engine.impl.interceptor.CommandConfig;
-import org.flowable.common.engine.impl.interceptor.CommandContext;
import org.flowable.common.engine.impl.interceptor.CommandExecutor;
import org.flowable.idm.engine.IdmEngine;
import org.flowable.idm.engine.IdmEngines;
-import org.flowable.idm.engine.impl.util.CommandContextUtil;
/**
* @author Tijs Rademakers
@@ -30,12 +28,6 @@ public static void main(String[] args) {
IdmEngine idmEngine = IdmEngines.getDefaultIdmEngine();
CommandExecutor commandExecutor = idmEngine.getIdmEngineConfiguration().getCommandExecutor();
CommandConfig config = new CommandConfig().transactionNotSupported();
- commandExecutor.execute(config, new Command<>() {
- @Override
- public Object execute(CommandContext commandContext) {
- CommandContextUtil.getIdmEngineConfiguration(commandContext).getSchemaManager().schemaDrop();
- return null;
- }
- });
+ commandExecutor.execute(config, new SchemaOperationsEngineDropDbCmd(idmEngine.getIdmEngineConfiguration().getEngineScopeType()));
}
}
diff --git a/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/db/IdmDbSchemaManager.java b/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/db/IdmDbSchemaManager.java
index c1e4419e66f..1f2e86818ae 100644
--- a/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/db/IdmDbSchemaManager.java
+++ b/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/db/IdmDbSchemaManager.java
@@ -16,8 +16,6 @@
import org.flowable.common.engine.api.FlowableWrongDbException;
import org.flowable.common.engine.impl.db.ServiceSqlScriptBasedDbSchemaManager;
import org.flowable.idm.engine.IdmEngine;
-import org.flowable.idm.engine.IdmEngineConfiguration;
-import org.flowable.idm.engine.impl.util.CommandContextUtil;
public class IdmDbSchemaManager extends ServiceSqlScriptBasedDbSchemaManager {
@@ -27,7 +25,7 @@ public class IdmDbSchemaManager extends ServiceSqlScriptBasedDbSchemaManager {
public IdmDbSchemaManager() {
// note; no schema property set, managed by this class itself as it has (for historical reasons) it's own property table
- super(IDM_PROPERTY_TABLE, SCHEMA_COMPONENT, null, VERSION_PROPERTY);
+ super(IDM_PROPERTY_TABLE, SCHEMA_COMPONENT, VERSION_PROPERTY);
}
@Override
@@ -131,26 +129,8 @@ protected boolean isMissingTablesException(Exception e) {
return false;
}
- public void performSchemaOperationsIdmEngineBuild() {
- String databaseSchemaUpdate = CommandContextUtil.getIdmEngineConfiguration().getDatabaseSchemaUpdate();
- if (IdmEngineConfiguration.DB_SCHEMA_UPDATE_DROP_CREATE.equals(databaseSchemaUpdate)) {
- try {
- schemaDrop();
- } catch (RuntimeException e) {
- // ignore
- }
- }
- if (IdmEngineConfiguration.DB_SCHEMA_UPDATE_CREATE_DROP.equals(databaseSchemaUpdate) || IdmEngineConfiguration.DB_SCHEMA_UPDATE_DROP_CREATE.equals(databaseSchemaUpdate)
- || IdmEngineConfiguration.DB_SCHEMA_UPDATE_CREATE.equals(databaseSchemaUpdate)) {
- schemaCreate();
-
- } else if (IdmEngineConfiguration.DB_SCHEMA_UPDATE_FALSE.equals(databaseSchemaUpdate)) {
- schemaCheckVersion();
-
- } else if (IdmEngineConfiguration.DB_SCHEMA_UPDATE_TRUE.equals(databaseSchemaUpdate)) {
- schemaUpdate();
- }
+ @Override
+ public String getContext() {
+ return SCHEMA_COMPONENT;
}
-
-
}
diff --git a/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/test/InternalFlowableIdmExtension.java b/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/test/InternalFlowableIdmExtension.java
index 8e3668cc371..6519a9192a1 100644
--- a/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/test/InternalFlowableIdmExtension.java
+++ b/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/test/InternalFlowableIdmExtension.java
@@ -92,16 +92,7 @@ protected void assertAndEnsureCleanDb(IdmEngine idmEngine, ExtensionContext cont
idmEngine.getIdmEngineConfiguration(),
ensureCleanDb,
!context.getExecutionException().isPresent(),
- new Command<>() {
-
- @Override
- public Void execute(CommandContext commandContext) {
- SchemaManager schemaManager = CommandContextUtil.getIdmEngineConfiguration(commandContext).getSchemaManager();
- schemaManager.schemaDrop();
- schemaManager.schemaCreate();
- return null;
- }
- }
+ idmEngine.getIdmEngineConfiguration().getSchemaManagementCmd()
);
}
diff --git a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.cockroachdb.create.identity.sql b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.cockroachdb.create.identity.sql
index aaa86d5ca57..bafc54c6909 100644
--- a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.cockroachdb.create.identity.sql
+++ b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.cockroachdb.create.identity.sql
@@ -6,7 +6,7 @@ create table ACT_ID_PROPERTY (
);
insert into ACT_ID_PROPERTY
-values ('schema.version', '7.1.0.0', 1);
+values ('schema.version', '7.1.0.1', 1);
create table ACT_ID_BYTEARRAY (
ID_ varchar(64),
diff --git a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.db2.create.identity.sql b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.db2.create.identity.sql
index 33cfd2a22cb..2fcea67663e 100644
--- a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.db2.create.identity.sql
+++ b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.db2.create.identity.sql
@@ -6,7 +6,7 @@ create table ACT_ID_PROPERTY (
);
insert into ACT_ID_PROPERTY
-values ('schema.version', '7.1.0.0', 1);
+values ('schema.version', '7.1.0.1', 1);
create table ACT_ID_BYTEARRAY (
ID_ varchar(64) not null,
diff --git a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.h2.create.identity.sql b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.h2.create.identity.sql
index 20be7bbfadf..b7a87980dd7 100644
--- a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.h2.create.identity.sql
+++ b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.h2.create.identity.sql
@@ -6,7 +6,7 @@ create table ACT_ID_PROPERTY (
);
insert into ACT_ID_PROPERTY
-values ('schema.version', '7.1.0.0', 1);
+values ('schema.version', '7.1.0.1', 1);
create table ACT_ID_BYTEARRAY (
ID_ varchar(64),
diff --git a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.hsql.create.identity.sql b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.hsql.create.identity.sql
index 9e3c5134d2f..ec69af6b76f 100644
--- a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.hsql.create.identity.sql
+++ b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.hsql.create.identity.sql
@@ -6,7 +6,7 @@ create table ACT_ID_PROPERTY (
);
insert into ACT_ID_PROPERTY
-values ('schema.version', '7.1.0.0', 1);
+values ('schema.version', '7.1.0.1', 1);
create table ACT_ID_BYTEARRAY (
ID_ varchar(64),
diff --git a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.mssql.create.identity.sql b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.mssql.create.identity.sql
index 35db6657c1c..d3f093cedab 100644
--- a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.mssql.create.identity.sql
+++ b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.mssql.create.identity.sql
@@ -6,7 +6,7 @@ create table ACT_ID_PROPERTY (
);
insert into ACT_ID_PROPERTY
-values ('schema.version', '7.1.0.0', 1);
+values ('schema.version', '7.1.0.1', 1);
create table ACT_ID_BYTEARRAY (
ID_ nvarchar(64),
diff --git a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.mysql.create.identity.sql b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.mysql.create.identity.sql
index de9906ff6fc..333336f8d15 100644
--- a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.mysql.create.identity.sql
+++ b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.mysql.create.identity.sql
@@ -6,7 +6,7 @@ create table ACT_ID_PROPERTY (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
insert into ACT_ID_PROPERTY
-values ('schema.version', '7.1.0.0', 1);
+values ('schema.version', '7.1.0.1', 1);
create table ACT_ID_BYTEARRAY (
ID_ varchar(64),
diff --git a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.mysql55.create.identity.sql b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.mysql55.create.identity.sql
index 93fd7aa6dc7..f7277b37879 100644
--- a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.mysql55.create.identity.sql
+++ b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.mysql55.create.identity.sql
@@ -6,7 +6,7 @@ create table ACT_ID_PROPERTY (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
insert into ACT_ID_PROPERTY
-values ('schema.version', '7.1.0.0', 1);
+values ('schema.version', '7.1.0.1', 1);
create table ACT_ID_BYTEARRAY (
ID_ varchar(64),
diff --git a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.oracle.create.identity.sql b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.oracle.create.identity.sql
index 11153c1a5fb..e7c2a366d14 100644
--- a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.oracle.create.identity.sql
+++ b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.oracle.create.identity.sql
@@ -6,7 +6,7 @@ create table ACT_ID_PROPERTY (
);
insert into ACT_ID_PROPERTY
-values ('schema.version', '7.1.0.0', 1);
+values ('schema.version', '7.1.0.1', 1);
create table ACT_ID_BYTEARRAY (
ID_ NVARCHAR2(64),
diff --git a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.postgres.create.identity.sql b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.postgres.create.identity.sql
index 7f8c0cc6c5a..a3d79991af6 100644
--- a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.postgres.create.identity.sql
+++ b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/create/flowable.postgres.create.identity.sql
@@ -6,7 +6,7 @@ create table ACT_ID_PROPERTY (
);
insert into ACT_ID_PROPERTY
-values ('schema.version', '7.1.0.0', 1);
+values ('schema.version', '7.1.0.1', 1);
create table ACT_ID_BYTEARRAY (
ID_ varchar(64),
diff --git a/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/upgrade/flowable.all.upgradestep.7100.to.7101.identity.sql b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/upgrade/flowable.all.upgradestep.7100.to.7101.identity.sql
new file mode 100644
index 00000000000..09287db1907
--- /dev/null
+++ b/modules/flowable-idm-engine/src/main/resources/org/flowable/idm/db/upgrade/flowable.all.upgradestep.7100.to.7101.identity.sql
@@ -0,0 +1 @@
+update ACT_ID_PROPERTY set VALUE_ = '7.1.0.1' where NAME_ = 'schema.version';
diff --git a/modules/flowable-idm-spring-configurator/src/main/java/org/flowable/idm/spring/configurator/SpringIdmEngineConfigurator.java b/modules/flowable-idm-spring-configurator/src/main/java/org/flowable/idm/spring/configurator/SpringIdmEngineConfigurator.java
index a184004fd54..25c4a74530f 100644
--- a/modules/flowable-idm-spring-configurator/src/main/java/org/flowable/idm/spring/configurator/SpringIdmEngineConfigurator.java
+++ b/modules/flowable-idm-spring-configurator/src/main/java/org/flowable/idm/spring/configurator/SpringIdmEngineConfigurator.java
@@ -34,7 +34,7 @@ public void configure(AbstractEngineConfiguration engineConfiguration) {
SpringEngineConfiguration springEngineConfiguration = (SpringEngineConfiguration) engineConfiguration;
((SpringIdmEngineConfiguration) idmEngineConfiguration).setTransactionManager(springEngineConfiguration.getTransactionManager());
- idmEngineConfiguration.buildIdmEngine();
+ initEngine();
initServiceConfigurations(engineConfiguration, idmEngineConfiguration);
}
diff --git a/modules/flowable-idm-spring/src/main/java/org/flowable/idm/spring/SpringIdmEngineConfiguration.java b/modules/flowable-idm-spring/src/main/java/org/flowable/idm/spring/SpringIdmEngineConfiguration.java
index 513a55c0c42..f8dc9d56bca 100644
--- a/modules/flowable-idm-spring/src/main/java/org/flowable/idm/spring/SpringIdmEngineConfiguration.java
+++ b/modules/flowable-idm-spring/src/main/java/org/flowable/idm/spring/SpringIdmEngineConfiguration.java
@@ -46,8 +46,8 @@ public SpringIdmEngineConfiguration() {
}
@Override
- public IdmEngine buildIdmEngine() {
- IdmEngine idmEngine = super.buildIdmEngine();
+ public IdmEngine buildEngine() {
+ IdmEngine idmEngine = super.buildEngine();
IdmEngines.setInitialized(true);
return idmEngine;
}
diff --git a/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/asyncexecutor/AcquireAsyncJobsDueRunnable.java b/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/asyncexecutor/AcquireAsyncJobsDueRunnable.java
index 8d32e60b04e..a97c1d3e4e9 100644
--- a/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/asyncexecutor/AcquireAsyncJobsDueRunnable.java
+++ b/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/asyncexecutor/AcquireAsyncJobsDueRunnable.java
@@ -18,8 +18,8 @@
import org.flowable.common.engine.api.FlowableException;
import org.flowable.common.engine.api.FlowableOptimisticLockingException;
+import org.flowable.common.engine.api.lock.LockManager;
import org.flowable.common.engine.impl.interceptor.CommandExecutor;
-import org.flowable.common.engine.impl.lock.LockManager;
import org.flowable.common.engine.impl.lock.LockManagerImpl;
import org.flowable.job.service.impl.cmd.AcquireJobsCmd;
import org.flowable.job.service.impl.cmd.AcquireJobsWithGlobalAcquireLockCmd;
diff --git a/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/asyncexecutor/AcquireTimerJobsRunnable.java b/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/asyncexecutor/AcquireTimerJobsRunnable.java
index f78a5499609..977ff5c3d81 100644
--- a/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/asyncexecutor/AcquireTimerJobsRunnable.java
+++ b/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/asyncexecutor/AcquireTimerJobsRunnable.java
@@ -24,8 +24,8 @@
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
import org.flowable.common.engine.api.FlowableException;
import org.flowable.common.engine.api.FlowableOptimisticLockingException;
+import org.flowable.common.engine.api.lock.LockManager;
import org.flowable.common.engine.impl.interceptor.CommandExecutor;
-import org.flowable.common.engine.impl.lock.LockManager;
import org.flowable.common.engine.impl.lock.LockManagerImpl;
import org.flowable.job.service.impl.cmd.AcquireTimerJobsCmd;
import org.flowable.job.service.impl.cmd.AcquireTimerJobsWithGlobalAcquireLockCmd;
diff --git a/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/db/JobDbSchemaManager.java b/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/db/JobDbSchemaManager.java
deleted file mode 100644
index 93dad28bde6..00000000000
--- a/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/db/JobDbSchemaManager.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.flowable.job.service.impl.db;
-
-import org.flowable.common.engine.impl.db.ServiceSqlScriptBasedDbSchemaManager;
-
-/**
- * @author Joram Barrez
- */
-public class JobDbSchemaManager extends ServiceSqlScriptBasedDbSchemaManager {
-
- private static final String JOB_TABLE = "ACT_RU_JOB";
- private static final String JOB_VERSION_PROPERTY = "job.schema.version";
- private static final String SCHEMA_COMPONENT = "job";
-
- public JobDbSchemaManager() {
- super(JOB_TABLE, SCHEMA_COMPONENT, null, JOB_VERSION_PROPERTY);
- }
-
- @Override
- protected String getResourcesRootDirectory() {
- return "org/flowable/job/service/db/";
- }
-
-}
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.cockroachdb.create.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.cockroachdb.create.job.sql
deleted file mode 100644
index d6f213e9b69..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.cockroachdb.create.job.sql
+++ /dev/null
@@ -1,264 +0,0 @@
-CREATE TABLE ACT_RU_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-CREATE TABLE ACT_RU_TIMER_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-CREATE TABLE ACT_RU_SUSPENDED_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-CREATE TABLE ACT_RU_DEADLETTER_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-CREATE TABLE ACT_RU_HISTORY_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- ADV_HANDLER_CFG_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- SCOPE_TYPE_ varchar(255),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-CREATE TABLE ACT_RU_EXTERNAL_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_JOB_EXCEPTION_STACK_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
--- force-commit
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-insert into ACT_GE_PROPERTY values ('job.schema.version', '7.1.0.0', 1);
-
--- force-commit
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.db2.create.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.db2.create.job.sql
deleted file mode 100644
index 1c666e523d3..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.db2.create.job.sql
+++ /dev/null
@@ -1,260 +0,0 @@
-create table ACT_RU_JOB (
- ID_ varchar(64) not null,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) not null,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ smallint check(EXCLUSIVE_ in (1,0)),
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_TIMER_JOB (
- ID_ varchar(64) not null,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) not null,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ smallint check(EXCLUSIVE_ in (1,0)),
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_SUSPENDED_JOB (
- ID_ varchar(64) not null,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) not null,
- EXCLUSIVE_ smallint check(EXCLUSIVE_ in (1,0)),
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_DEADLETTER_JOB (
- ID_ varchar(64) not null,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) not null,
- EXCLUSIVE_ smallint check(EXCLUSIVE_ in (1,0)),
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_HISTORY_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- ADV_HANDLER_CFG_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- SCOPE_TYPE_ varchar(255),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_EXTERNAL_JOB (
- ID_ varchar(64) not null,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) not null,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ smallint check(EXCLUSIVE_ in (1,0)),
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_JOB_EXCEPTION_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_JOB_CUSTOM_VAL_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_TJOB_EXCEPTION_ID on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_TJOB_CUSTOM_VAL_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TJOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_TJOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-create index ACT_IDX_SJOB_EXCEPTION_ID on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_SJOB_CUSTOM_VAL_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SJOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_DJOB_EXCEPTION_ID on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_DJOB_CUSTOM_VAL_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DJOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_EJOB_EXCEPTION_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EJOB_CUSTOM_VAL_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_EJOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TJOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SJOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DJOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EJOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('job.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.h2.create.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.h2.create.job.sql
deleted file mode 100644
index ac9fc25ed96..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.h2.create.job.sql
+++ /dev/null
@@ -1,260 +0,0 @@
-create table ACT_RU_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_TIMER_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_SUSPENDED_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_DEADLETTER_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_HISTORY_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- ADV_HANDLER_CFG_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- SCOPE_TYPE_ varchar(255),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_EXTERNAL_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_JOB_EXCEPTION_STACK_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('job.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.hsql.create.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.hsql.create.job.sql
deleted file mode 100644
index f4842df8fba..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.hsql.create.job.sql
+++ /dev/null
@@ -1,260 +0,0 @@
-create table ACT_RU_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_TIMER_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_SUSPENDED_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_DEADLETTER_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_HISTORY_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- ADV_HANDLER_CFG_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- SCOPE_TYPE_ varchar(255),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_EXTERNAL_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_JOB_EXCEPTION_STACK_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('job.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.mssql.create.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.mssql.create.job.sql
deleted file mode 100644
index 983cec73446..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.mssql.create.job.sql
+++ /dev/null
@@ -1,260 +0,0 @@
-create table ACT_RU_JOB (
- ID_ nvarchar(64) NOT NULL,
- REV_ int,
- CATEGORY_ varchar(255),
- TYPE_ nvarchar(255) NOT NULL,
- LOCK_EXP_TIME_ datetime,
- LOCK_OWNER_ nvarchar(255),
- EXCLUSIVE_ bit,
- EXECUTION_ID_ nvarchar(64),
- PROCESS_INSTANCE_ID_ nvarchar(64),
- PROC_DEF_ID_ nvarchar(64),
- ELEMENT_ID_ nvarchar(255),
- ELEMENT_NAME_ nvarchar(255),
- SCOPE_ID_ nvarchar(255),
- SUB_SCOPE_ID_ nvarchar(255),
- SCOPE_TYPE_ nvarchar(255),
- SCOPE_DEFINITION_ID_ nvarchar(255),
- CORRELATION_ID_ nvarchar(255),
- RETRIES_ int,
- EXCEPTION_STACK_ID_ nvarchar(64),
- EXCEPTION_MSG_ nvarchar(4000),
- DUEDATE_ datetime NULL,
- REPEAT_ nvarchar(255),
- HANDLER_TYPE_ nvarchar(255),
- HANDLER_CFG_ nvarchar(4000),
- CUSTOM_VALUES_ID_ nvarchar(64),
- CREATE_TIME_ datetime2 NULL,
- TENANT_ID_ nvarchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_TIMER_JOB (
- ID_ nvarchar(64) NOT NULL,
- REV_ int,
- CATEGORY_ varchar(255),
- TYPE_ nvarchar(255) NOT NULL,
- LOCK_EXP_TIME_ datetime,
- LOCK_OWNER_ nvarchar(255),
- EXCLUSIVE_ bit,
- EXECUTION_ID_ nvarchar(64),
- PROCESS_INSTANCE_ID_ nvarchar(64),
- PROC_DEF_ID_ nvarchar(64),
- ELEMENT_ID_ nvarchar(255),
- ELEMENT_NAME_ nvarchar(255),
- SCOPE_ID_ nvarchar(255),
- SUB_SCOPE_ID_ nvarchar(255),
- SCOPE_TYPE_ nvarchar(255),
- SCOPE_DEFINITION_ID_ nvarchar(255),
- CORRELATION_ID_ nvarchar(255),
- RETRIES_ int,
- EXCEPTION_STACK_ID_ nvarchar(64),
- EXCEPTION_MSG_ nvarchar(4000),
- DUEDATE_ datetime NULL,
- REPEAT_ nvarchar(255),
- HANDLER_TYPE_ nvarchar(255),
- HANDLER_CFG_ nvarchar(4000),
- CUSTOM_VALUES_ID_ nvarchar(64),
- CREATE_TIME_ datetime2 NULL,
- TENANT_ID_ nvarchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_SUSPENDED_JOB (
- ID_ nvarchar(64) NOT NULL,
- REV_ int,
- CATEGORY_ varchar(255),
- TYPE_ nvarchar(255) NOT NULL,
- EXCLUSIVE_ bit,
- EXECUTION_ID_ nvarchar(64),
- PROCESS_INSTANCE_ID_ nvarchar(64),
- PROC_DEF_ID_ nvarchar(64),
- ELEMENT_ID_ nvarchar(255),
- ELEMENT_NAME_ nvarchar(255),
- SCOPE_ID_ nvarchar(255),
- SUB_SCOPE_ID_ nvarchar(255),
- SCOPE_TYPE_ nvarchar(255),
- SCOPE_DEFINITION_ID_ nvarchar(255),
- CORRELATION_ID_ nvarchar(255),
- RETRIES_ int,
- EXCEPTION_STACK_ID_ nvarchar(64),
- EXCEPTION_MSG_ nvarchar(4000),
- DUEDATE_ datetime NULL,
- REPEAT_ nvarchar(255),
- HANDLER_TYPE_ nvarchar(255),
- HANDLER_CFG_ nvarchar(4000),
- CUSTOM_VALUES_ID_ nvarchar(64),
- CREATE_TIME_ datetime2 NULL,
- TENANT_ID_ nvarchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_DEADLETTER_JOB (
- ID_ nvarchar(64) NOT NULL,
- REV_ int,
- CATEGORY_ varchar(255),
- TYPE_ nvarchar(255) NOT NULL,
- EXCLUSIVE_ bit,
- EXECUTION_ID_ nvarchar(64),
- PROCESS_INSTANCE_ID_ nvarchar(64),
- PROC_DEF_ID_ nvarchar(64),
- ELEMENT_ID_ nvarchar(255),
- ELEMENT_NAME_ nvarchar(255),
- SCOPE_ID_ nvarchar(255),
- SUB_SCOPE_ID_ nvarchar(255),
- SCOPE_TYPE_ nvarchar(255),
- SCOPE_DEFINITION_ID_ nvarchar(255),
- CORRELATION_ID_ nvarchar(255),
- EXCEPTION_STACK_ID_ nvarchar(64),
- EXCEPTION_MSG_ nvarchar(4000),
- DUEDATE_ datetime NULL,
- REPEAT_ nvarchar(255),
- HANDLER_TYPE_ nvarchar(255),
- HANDLER_CFG_ nvarchar(4000),
- CUSTOM_VALUES_ID_ nvarchar(64),
- CREATE_TIME_ datetime2 NULL,
- TENANT_ID_ nvarchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_HISTORY_JOB (
- ID_ nvarchar(64) NOT NULL,
- REV_ int,
- LOCK_EXP_TIME_ datetime NULL,
- LOCK_OWNER_ nvarchar(255),
- RETRIES_ int,
- EXCEPTION_STACK_ID_ nvarchar(64),
- EXCEPTION_MSG_ nvarchar(4000),
- HANDLER_TYPE_ nvarchar(255),
- HANDLER_CFG_ nvarchar(4000),
- CUSTOM_VALUES_ID_ nvarchar(64),
- ADV_HANDLER_CFG_ID_ nvarchar(64),
- CREATE_TIME_ datetime2 NULL,
- SCOPE_TYPE_ nvarchar(255),
- TENANT_ID_ nvarchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_EXTERNAL_JOB (
- ID_ nvarchar(64) NOT NULL,
- REV_ int,
- CATEGORY_ varchar(255),
- TYPE_ nvarchar(255) NOT NULL,
- LOCK_EXP_TIME_ datetime,
- LOCK_OWNER_ nvarchar(255),
- EXCLUSIVE_ bit,
- EXECUTION_ID_ nvarchar(64),
- PROCESS_INSTANCE_ID_ nvarchar(64),
- PROC_DEF_ID_ nvarchar(64),
- ELEMENT_ID_ nvarchar(255),
- ELEMENT_NAME_ nvarchar(255),
- SCOPE_ID_ nvarchar(255),
- SUB_SCOPE_ID_ nvarchar(255),
- SCOPE_TYPE_ nvarchar(255),
- SCOPE_DEFINITION_ID_ nvarchar(255),
- CORRELATION_ID_ nvarchar(255),
- RETRIES_ int,
- EXCEPTION_STACK_ID_ nvarchar(64),
- EXCEPTION_MSG_ nvarchar(4000),
- DUEDATE_ datetime NULL,
- REPEAT_ nvarchar(255),
- HANDLER_TYPE_ nvarchar(255),
- HANDLER_CFG_ nvarchar(4000),
- CUSTOM_VALUES_ID_ nvarchar(64),
- CREATE_TIME_ datetime2 NULL,
- TENANT_ID_ nvarchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_JOB_EXCEPTION_STACK_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('job.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.mysql.create.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.mysql.create.job.sql
deleted file mode 100644
index bfc95754613..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.mysql.create.job.sql
+++ /dev/null
@@ -1,260 +0,0 @@
-create table ACT_RU_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp(3) NULL,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp(3) NULL,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp(3) NULL,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_TIMER_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp(3) NULL,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp(3) NULL,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp(3) NULL,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_SUSPENDED_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp(3) NULL,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp(3) NULL,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_DEADLETTER_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp(3) NULL,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp(3) NULL,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_HISTORY_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- LOCK_EXP_TIME_ timestamp(3) NULL,
- LOCK_OWNER_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- ADV_HANDLER_CFG_ID_ varchar(64),
- CREATE_TIME_ timestamp(3) NULL,
- SCOPE_TYPE_ varchar(255),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_EXTERNAL_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp(3) NULL,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp(3) NULL,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp(3) NULL,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index ACT_IDX_JOB_EXCEPTION_STACK_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('job.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.mysql55.create.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.mysql55.create.job.sql
deleted file mode 100644
index 1e75050208a..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.mysql55.create.job.sql
+++ /dev/null
@@ -1,260 +0,0 @@
-create table ACT_RU_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp NULL,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp NULL,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp NULL,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_TIMER_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp NULL,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp NULL,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp NULL,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_SUSPENDED_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp NULL,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp NULL,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_DEADLETTER_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp NULL,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp NULL,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_HISTORY_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- LOCK_EXP_TIME_ timestamp NULL,
- LOCK_OWNER_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- ADV_HANDLER_CFG_ID_ varchar(64),
- CREATE_TIME_ timestamp NULL,
- SCOPE_TYPE_ varchar(255),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_RU_EXTERNAL_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp NULL,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp NULL,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp NULL,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index ACT_IDX_JOB_EXCEPTION_STACK_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('job.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.oracle.create.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.oracle.create.job.sql
deleted file mode 100644
index 4301e84583e..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.oracle.create.job.sql
+++ /dev/null
@@ -1,260 +0,0 @@
-create table ACT_RU_JOB (
- ID_ NVARCHAR2(64) NOT NULL,
- REV_ INTEGER,
- CATEGORY_ NVARCHAR2(255),
- TYPE_ NVARCHAR2(255) NOT NULL,
- LOCK_EXP_TIME_ TIMESTAMP(6),
- LOCK_OWNER_ NVARCHAR2(255),
- EXCLUSIVE_ NUMBER(1,0) CHECK (EXCLUSIVE_ IN (1,0)),
- EXECUTION_ID_ NVARCHAR2(64),
- PROCESS_INSTANCE_ID_ NVARCHAR2(64),
- PROC_DEF_ID_ NVARCHAR2(64),
- ELEMENT_ID_ NVARCHAR2(255),
- ELEMENT_NAME_ NVARCHAR2(255),
- SCOPE_ID_ NVARCHAR2(255),
- SUB_SCOPE_ID_ NVARCHAR2(255),
- SCOPE_TYPE_ NVARCHAR2(255),
- SCOPE_DEFINITION_ID_ NVARCHAR2(255),
- CORRELATION_ID_ NVARCHAR2(255),
- RETRIES_ INTEGER,
- EXCEPTION_STACK_ID_ NVARCHAR2(64),
- EXCEPTION_MSG_ NVARCHAR2(2000),
- DUEDATE_ TIMESTAMP(6),
- REPEAT_ NVARCHAR2(255),
- HANDLER_TYPE_ NVARCHAR2(255),
- HANDLER_CFG_ NVARCHAR2(2000),
- CUSTOM_VALUES_ID_ NVARCHAR2(64),
- CREATE_TIME_ TIMESTAMP(6),
- TENANT_ID_ NVARCHAR2(255) DEFAULT '',
- primary key (ID_)
-);
-
-create table ACT_RU_TIMER_JOB (
- ID_ NVARCHAR2(64) NOT NULL,
- REV_ INTEGER,
- CATEGORY_ NVARCHAR2(255),
- TYPE_ NVARCHAR2(255) NOT NULL,
- LOCK_EXP_TIME_ TIMESTAMP(6),
- LOCK_OWNER_ NVARCHAR2(255),
- EXCLUSIVE_ NUMBER(1,0) CHECK (EXCLUSIVE_ IN (1,0)),
- EXECUTION_ID_ NVARCHAR2(64),
- PROCESS_INSTANCE_ID_ NVARCHAR2(64),
- PROC_DEF_ID_ NVARCHAR2(64),
- ELEMENT_ID_ NVARCHAR2(255),
- ELEMENT_NAME_ NVARCHAR2(255),
- SCOPE_ID_ NVARCHAR2(255),
- SUB_SCOPE_ID_ NVARCHAR2(255),
- SCOPE_TYPE_ NVARCHAR2(255),
- SCOPE_DEFINITION_ID_ NVARCHAR2(255),
- CORRELATION_ID_ NVARCHAR2(255),
- RETRIES_ INTEGER,
- EXCEPTION_STACK_ID_ NVARCHAR2(64),
- EXCEPTION_MSG_ NVARCHAR2(2000),
- DUEDATE_ TIMESTAMP(6),
- REPEAT_ NVARCHAR2(255),
- HANDLER_TYPE_ NVARCHAR2(255),
- HANDLER_CFG_ NVARCHAR2(2000),
- CUSTOM_VALUES_ID_ NVARCHAR2(64),
- CREATE_TIME_ TIMESTAMP(6),
- TENANT_ID_ NVARCHAR2(255) DEFAULT '',
- primary key (ID_)
-);
-
-create table ACT_RU_SUSPENDED_JOB (
- ID_ NVARCHAR2(64) NOT NULL,
- REV_ INTEGER,
- CATEGORY_ NVARCHAR2(255),
- TYPE_ NVARCHAR2(255) NOT NULL,
- EXCLUSIVE_ NUMBER(1,0) CHECK (EXCLUSIVE_ IN (1,0)),
- EXECUTION_ID_ NVARCHAR2(64),
- PROCESS_INSTANCE_ID_ NVARCHAR2(64),
- PROC_DEF_ID_ NVARCHAR2(64),
- ELEMENT_ID_ NVARCHAR2(255),
- ELEMENT_NAME_ NVARCHAR2(255),
- SCOPE_ID_ NVARCHAR2(255),
- SUB_SCOPE_ID_ NVARCHAR2(255),
- SCOPE_TYPE_ NVARCHAR2(255),
- SCOPE_DEFINITION_ID_ NVARCHAR2(255),
- CORRELATION_ID_ NVARCHAR2(255),
- RETRIES_ INTEGER,
- EXCEPTION_STACK_ID_ NVARCHAR2(64),
- EXCEPTION_MSG_ NVARCHAR2(2000),
- DUEDATE_ TIMESTAMP(6),
- REPEAT_ NVARCHAR2(255),
- HANDLER_TYPE_ NVARCHAR2(255),
- HANDLER_CFG_ NVARCHAR2(2000),
- CUSTOM_VALUES_ID_ NVARCHAR2(64),
- CREATE_TIME_ TIMESTAMP(6),
- TENANT_ID_ NVARCHAR2(255) DEFAULT '',
- primary key (ID_)
-);
-
-create table ACT_RU_DEADLETTER_JOB (
- ID_ NVARCHAR2(64) NOT NULL,
- REV_ INTEGER,
- CATEGORY_ NVARCHAR2(255),
- TYPE_ NVARCHAR2(255) NOT NULL,
- EXCLUSIVE_ NUMBER(1,0) CHECK (EXCLUSIVE_ IN (1,0)),
- EXECUTION_ID_ NVARCHAR2(64),
- PROCESS_INSTANCE_ID_ NVARCHAR2(64),
- PROC_DEF_ID_ NVARCHAR2(64),
- ELEMENT_ID_ NVARCHAR2(255),
- ELEMENT_NAME_ NVARCHAR2(255),
- SCOPE_ID_ NVARCHAR2(255),
- SUB_SCOPE_ID_ NVARCHAR2(255),
- SCOPE_TYPE_ NVARCHAR2(255),
- SCOPE_DEFINITION_ID_ NVARCHAR2(255),
- CORRELATION_ID_ NVARCHAR2(255),
- EXCEPTION_STACK_ID_ NVARCHAR2(64),
- EXCEPTION_MSG_ NVARCHAR2(2000),
- DUEDATE_ TIMESTAMP(6),
- REPEAT_ NVARCHAR2(255),
- HANDLER_TYPE_ NVARCHAR2(255),
- HANDLER_CFG_ NVARCHAR2(2000),
- CUSTOM_VALUES_ID_ NVARCHAR2(64),
- CREATE_TIME_ TIMESTAMP(6),
- TENANT_ID_ NVARCHAR2(255) DEFAULT '',
- primary key (ID_)
-);
-
-create table ACT_RU_HISTORY_JOB (
- ID_ NVARCHAR2(64) NOT NULL,
- REV_ INTEGER,
- LOCK_EXP_TIME_ TIMESTAMP(6),
- LOCK_OWNER_ NVARCHAR2(255),
- RETRIES_ INTEGER,
- EXCEPTION_STACK_ID_ NVARCHAR2(64),
- EXCEPTION_MSG_ NVARCHAR2(2000),
- HANDLER_TYPE_ NVARCHAR2(255),
- HANDLER_CFG_ NVARCHAR2(2000),
- CUSTOM_VALUES_ID_ NVARCHAR2(64),
- ADV_HANDLER_CFG_ID_ NVARCHAR2(64),
- CREATE_TIME_ TIMESTAMP(6),
- SCOPE_TYPE_ NVARCHAR2(255),
- TENANT_ID_ NVARCHAR2(255) DEFAULT '',
- primary key (ID_)
-);
-
-create table ACT_RU_EXTERNAL_JOB (
- ID_ NVARCHAR2(64) NOT NULL,
- REV_ INTEGER,
- CATEGORY_ NVARCHAR2(255),
- TYPE_ NVARCHAR2(255) NOT NULL,
- LOCK_EXP_TIME_ TIMESTAMP(6),
- LOCK_OWNER_ NVARCHAR2(255),
- EXCLUSIVE_ NUMBER(1,0) CHECK (EXCLUSIVE_ IN (1,0)),
- EXECUTION_ID_ NVARCHAR2(64),
- PROCESS_INSTANCE_ID_ NVARCHAR2(64),
- PROC_DEF_ID_ NVARCHAR2(64),
- ELEMENT_ID_ NVARCHAR2(255),
- ELEMENT_NAME_ NVARCHAR2(255),
- SCOPE_ID_ NVARCHAR2(255),
- SUB_SCOPE_ID_ NVARCHAR2(255),
- SCOPE_TYPE_ NVARCHAR2(255),
- SCOPE_DEFINITION_ID_ NVARCHAR2(255),
- CORRELATION_ID_ NVARCHAR2(255),
- RETRIES_ INTEGER,
- EXCEPTION_STACK_ID_ NVARCHAR2(64),
- EXCEPTION_MSG_ NVARCHAR2(2000),
- DUEDATE_ TIMESTAMP(6),
- REPEAT_ NVARCHAR2(255),
- HANDLER_TYPE_ NVARCHAR2(255),
- HANDLER_CFG_ NVARCHAR2(2000),
- CUSTOM_VALUES_ID_ NVARCHAR2(64),
- CREATE_TIME_ TIMESTAMP(6),
- TENANT_ID_ NVARCHAR2(255) DEFAULT '',
- primary key (ID_)
-);
-
-create index ACT_IDX_JOB_EXCEPTION on ACT_RU_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_JOB_CUSTOM_VAL_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_TJOB_EXCEPTION on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_TJOB_CUSTOM_VAL_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TJOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_TJOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-create index ACT_IDX_SJOB_EXCEPTION on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_SJOB_CUSTOM_VAL_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SJOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_DJOB_EXCEPTION on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_DJOB_CUSTOM_VAL_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DJOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_EJOB_EXCEPTION on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EJOB_CUSTOM_VAL_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_EJOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TJOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SJOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DJOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EJOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('job.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.postgres.create.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.postgres.create.job.sql
deleted file mode 100644
index ac9fc25ed96..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/create/flowable.postgres.create.job.sql
+++ /dev/null
@@ -1,260 +0,0 @@
-create table ACT_RU_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_TIMER_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_SUSPENDED_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_DEADLETTER_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_HISTORY_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- ADV_HANDLER_CFG_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- SCOPE_TYPE_ varchar(255),
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create table ACT_RU_EXTERNAL_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- CORRELATION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_JOB_EXCEPTION_STACK_ID on ACT_RU_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID on ACT_RU_TIMER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID on ACT_RU_SUSPENDED_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID on ACT_RU_DEADLETTER_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-
-create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-insert into ACT_GE_PROPERTY values ('job.schema.version', '7.1.0.0', 1);
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.cockroachdb.drop.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.cockroachdb.drop.job.sql
deleted file mode 100644
index 27bf672c324..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.cockroachdb.drop.job.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-drop table if exists act_ru_job cascade;
-drop table if exists act_ru_timer_job cascade;
-drop table if exists act_ru_suspended_job cascade;
-drop table if exists act_ru_deadletter_job cascade;
-drop table if exists act_ru_history_job cascade;
-drop table if exists act_ru_external_job cascade;
-
--- force-commit
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.db2.drop.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.db2.drop.job.sql
deleted file mode 100644
index f37f0cec506..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.db2.drop.job.sql
+++ /dev/null
@@ -1,52 +0,0 @@
-drop index ACT_IDX_JOB_SCOPE;
-drop index ACT_IDX_JOB_SUB_SCOPE;
-drop index ACT_IDX_JOB_SCOPE_DEF;
-drop index ACT_IDX_TJOB_SCOPE;
-drop index ACT_IDX_TJOB_SUB_SCOPE;
-drop index ACT_IDX_TJOB_SCOPE_DEF;
-drop index ACT_IDX_SJOB_SCOPE;
-drop index ACT_IDX_SJOB_SUB_SCOPE;
-drop index ACT_IDX_SJOB_SCOPE_DEF;
-drop index ACT_IDX_DJOB_SCOPE;
-drop index ACT_IDX_DJOB_SUB_SCOPE;
-drop index ACT_IDX_DJOB_SCOPE_DEF;
-drop index ACT_IDX_EJOB_SCOPE;
-drop index ACT_IDX_EJOB_SUB_SCOPE;
-drop index ACT_IDX_EJOB_SCOPE_DEF;
-
-alter table ACT_RU_JOB
- drop foreign key ACT_FK_JOB_EXCEPTION;
-
-alter table ACT_RU_JOB
- drop foreign key ACT_FK_JOB_CUSTOM_VAL;
-
-alter table ACT_RU_TIMER_JOB
- drop foreign key ACT_FK_TJOB_EXCEPTION;
-
-alter table ACT_RU_TIMER_JOB
- drop foreign key ACT_FK_TJOB_CUSTOM_VAL;
-
-alter table ACT_RU_SUSPENDED_JOB
- drop foreign key ACT_FK_SJOB_EXCEPTION;
-
-alter table ACT_RU_SUSPENDED_JOB
- drop foreign key ACT_FK_SJOB_CUSTOM_VAL;
-
-alter table ACT_RU_DEADLETTER_JOB
- drop foreign key ACT_FK_DJOB_EXCEPTION;
-
-alter table ACT_RU_DEADLETTER_JOB
- drop foreign key ACT_FK_DJOB_CUSTOM_VAL;
-
-alter table ACT_RU_EXTERNAL_JOB
- drop foreign key ACT_FK_EJOB_EXCEPTION;
-
-alter table ACT_RU_EXTERNAL_JOB
- drop foreign key ACT_FK_EJOB_CUSTOM_VAL;
-
-drop table ACT_RU_JOB;
-drop table ACT_RU_TIMER_JOB;
-drop table ACT_RU_SUSPENDED_JOB;
-drop table ACT_RU_DEADLETTER_JOB;
-drop table ACT_RU_HISTORY_JOB;
-drop table ACT_RU_EXTERNAL_JOB;
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.h2.drop.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.h2.drop.job.sql
deleted file mode 100644
index a77840201f3..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.h2.drop.job.sql
+++ /dev/null
@@ -1,22 +0,0 @@
-drop index if exists ACT_IDX_JOB_SCOPE;
-drop index if exists ACT_IDX_JOB_SUB_SCOPE;
-drop index if exists ACT_IDX_JOB_SCOPE_DEF;
-drop index if exists ACT_IDX_TJOB_SCOPE;
-drop index if exists ACT_IDX_TJOB_SUB_SCOPE;
-drop index if exists ACT_IDX_TJOB_SCOPE_DEF;
-drop index if exists ACT_IDX_SJOB_SCOPE;
-drop index if exists ACT_IDX_SJOB_SUB_SCOPE;
-drop index if exists ACT_IDX_SJOB_SCOPE_DEF;
-drop index if exists ACT_IDX_DJOB_SCOPE;
-drop index if exists ACT_IDX_DJOB_SUB_SCOPE;
-drop index if exists ACT_IDX_DJOB_SCOPE_DEF;
-drop index if exists ACT_IDX_EJOB_SCOPE;
-drop index if exists ACT_IDX_EJOB_SUB_SCOPE;
-drop index if exists ACT_IDX_EJOB_SCOPE_DEF;
-
-drop table if exists ACT_RU_JOB cascade constraints;
-drop table if exists ACT_RU_EXTERNAL_JOB cascade constraints;
-drop table if exists ACT_RU_TIMER_JOB cascade constraints;
-drop table if exists ACT_RU_SUSPENDED_JOB cascade constraints;
-drop table if exists ACT_RU_DEADLETTER_JOB cascade constraints;
-drop table if exists ACT_RU_HISTORY_JOB cascade constraints;
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.hsql.drop.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.hsql.drop.job.sql
deleted file mode 100644
index 36671613c51..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.hsql.drop.job.sql
+++ /dev/null
@@ -1,19 +0,0 @@
-drop index if exists ACT_IDX_JOB_SCOPE;
-drop index if exists ACT_IDX_JOB_SUB_SCOPE;
-drop index if exists ACT_IDX_JOB_SCOPE_DEF;
-drop index if exists ACT_IDX_TJOB_SCOPE;
-drop index if exists ACT_IDX_TJOB_SUB_SCOPE;
-drop index if exists ACT_IDX_TJOB_SCOPE_DEF;
-drop index if exists ACT_IDX_SJOB_SCOPE;
-drop index if exists ACT_IDX_SJOB_SUB_SCOPE;
-drop index if exists ACT_IDX_SJOB_SCOPE_DEF;
-drop index if exists ACT_IDX_DJOB_SCOPE;
-drop index if exists ACT_IDX_DJOB_SUB_SCOPE;
-drop index if exists ACT_IDX_DJOB_SCOPE_DEF;
-
-drop table if exists ACT_RU_JOB cascade;
-drop table if exists ACT_RU_TIMER_JOB cascade;
-drop table if exists ACT_RU_SUSPENDED_JOB cascade;
-drop table if exists ACT_RU_DEADLETTER_JOB cascade;
-drop table if exists ACT_RU_EXTERNAL_JOB cascade;
-drop table if exists ACT_RU_HISTORY_JOB cascade;
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.mssql.drop.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.mssql.drop.job.sql
deleted file mode 100644
index cfa930c0e2c..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.mssql.drop.job.sql
+++ /dev/null
@@ -1,33 +0,0 @@
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_JOB_SCOPE') drop index ACT_RU_JOB.ACT_IDX_JOB_SCOPE;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_JOB_SUB_SCOPE') drop index ACT_RU_JOB.ACT_IDX_JOB_SUB_SCOPE;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_JOB_SCOPE_DEF') drop index ACT_RU_JOB.ACT_IDX_JOB_SCOPE_DEF;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_TJOB_SCOPE') drop index ACT_RU_TIMER_JOB.ACT_IDX_TJOB_SCOPE;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_TJOB_SUB_SCOPE') drop index ACT_RU_TIMER_JOB.ACT_IDX_TJOB_SUB_SCOPE;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_TJOB_SCOPE_DEF') drop index ACT_RU_TIMER_JOB.ACT_IDX_TJOB_SCOPE_DEF;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_SJOB_SCOPE') drop index ACT_RU_SUSPENDED_JOB.ACT_IDX_SJOB_SCOPE;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_SJOB_SUB_SCOPE') drop index ACT_RU_SUSPENDED_JOB.ACT_IDX_SJOB_SUB_SCOPE;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_SJOB_SCOPE_DEF') drop index ACT_RU_SUSPENDED_JOB.ACT_IDX_SJOB_SCOPE_DEF;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_DJOB_SCOPE') drop index ACT_RU_DEADLETTER_JOB.ACT_IDX_DJOB_SCOPE;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_DJOB_SUB_SCOPE') drop index ACT_RU_DEADLETTER_JOB.ACT_IDX_DJOB_SUB_SCOPE;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_DJOB_SCOPE_DEF') drop index ACT_RU_DEADLETTER_JOB.ACT_IDX_DJOB_SCOPE_DEF;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_EJOB_SCOPE') drop index ACT_RU_EXTERNAL_JOB.ACT_IDX_EJOB_SCOPE;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_EJOB_SUB_SCOPE') drop index ACT_RU_EXTERNAL_JOB.ACT_IDX_EJOB_SUB_SCOPE;
-IF EXISTS (SELECT name FROM sysindexes WHERE name = 'ACT_IDX_EJOB_SCOPE_DEF') drop index ACT_RU_EXTERNAL_JOB.ACT_IDX_EJOB_SCOPE_DEF;
-
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_JOB') alter table ACT_RU_JOB drop constraint ACT_FK_JOB_EXCEPTION;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_JOB') alter table ACT_RU_JOB drop constraint ACT_FK_JOB_CUSTOM_VALUES;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_TIMER_JOB') alter table ACT_RU_TIMER_JOB drop constraint ACT_FK_TIMER_JOB_EXCEPTION;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_TIMER_JOB') alter table ACT_RU_TIMER_JOB drop constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_SUSPENDED_JOB') alter table ACT_RU_SUSPENDED_JOB drop constraint ACT_FK_SUSPENDED_JOB_EXCEPTION;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_SUSPENDED_JOB') alter table ACT_RU_SUSPENDED_JOB drop constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_DEADLETTER_JOB') alter table ACT_RU_DEADLETTER_JOB drop constraint ACT_FK_DEADLETTER_JOB_EXCEPTION;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_DEADLETTER_JOB') alter table ACT_RU_DEADLETTER_JOB drop constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_EXTERNAL_JOB') alter table ACT_RU_EXTERNAL_JOB drop constraint ACT_FK_EXTERNAL_JOB_EXCEPTION;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_EXTERNAL_JOB') alter table ACT_RU_EXTERNAL_JOB drop constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES;
-
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_JOB') drop table ACT_RU_JOB;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_TIMER_JOB') drop table ACT_RU_TIMER_JOB;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_SUSPENDED_JOB') drop table ACT_RU_SUSPENDED_JOB;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_DEADLETTER_JOB') drop table ACT_RU_DEADLETTER_JOB;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_HISTORY_JOB') drop table ACT_RU_HISTORY_JOB;
-if exists (select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'ACT_RU_EXTERNAL_JOB') drop table ACT_RU_EXTERNAL_JOB;
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.mysql.drop.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.mysql.drop.job.sql
deleted file mode 100644
index 1271083b1fd..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.mysql.drop.job.sql
+++ /dev/null
@@ -1,52 +0,0 @@
-drop index ACT_IDX_JOB_SCOPE on ACT_RU_JOB;
-drop index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB;
-drop index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB;
-drop index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB;
-drop index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB;
-drop index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB;
-drop index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB;
-drop index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB;
-drop index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB;
-drop index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB;
-drop index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB;
-drop index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB;
-drop index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB;
-drop index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB;
-drop index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB;
-
-alter table ACT_RU_JOB
- drop foreign key ACT_FK_JOB_EXCEPTION;
-
-alter table ACT_RU_JOB
- drop foreign key ACT_FK_JOB_CUSTOM_VALUES;
-
-alter table ACT_RU_TIMER_JOB
- drop foreign key ACT_FK_TIMER_JOB_EXCEPTION;
-
-alter table ACT_RU_TIMER_JOB
- drop foreign key ACT_FK_TIMER_JOB_CUSTOM_VALUES;
-
-alter table ACT_RU_SUSPENDED_JOB
- drop foreign key ACT_FK_SUSPENDED_JOB_EXCEPTION;
-
-alter table ACT_RU_SUSPENDED_JOB
- drop foreign key ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES;
-
-alter table ACT_RU_DEADLETTER_JOB
- drop foreign key ACT_FK_DEADLETTER_JOB_EXCEPTION;
-
-alter table ACT_RU_DEADLETTER_JOB
- drop foreign key ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES;
-
-alter table ACT_RU_EXTERNAL_JOB
- drop foreign key ACT_FK_EXTERNAL_JOB_EXCEPTION;
-
-alter table ACT_RU_EXTERNAL_JOB
- drop foreign key ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES;
-
-drop table if exists ACT_RU_JOB;
-drop table if exists ACT_RU_TIMER_JOB;
-drop table if exists ACT_RU_SUSPENDED_JOB;
-drop table if exists ACT_RU_DEADLETTER_JOB;
-drop table if exists ACT_RU_HISTORY_JOB;
-drop table if exists ACT_RU_EXTERNAL_JOB;
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.oracle.drop.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.oracle.drop.job.sql
deleted file mode 100644
index b60c993f285..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.oracle.drop.job.sql
+++ /dev/null
@@ -1,73 +0,0 @@
-drop index ACT_IDX_JOB_SCOPE;
-drop index ACT_IDX_JOB_SUB_SCOPE;
-drop index ACT_IDX_JOB_SCOPE_DEF;
-drop index ACT_IDX_TJOB_SCOPE;
-drop index ACT_IDX_TJOB_SUB_SCOPE;
-drop index ACT_IDX_TJOB_SCOPE_DEF;
-drop index ACT_IDX_SJOB_SCOPE;
-drop index ACT_IDX_SJOB_SUB_SCOPE;
-drop index ACT_IDX_SJOB_SCOPE_DEF;
-drop index ACT_IDX_DJOB_SCOPE;
-drop index ACT_IDX_DJOB_SUB_SCOPE;
-drop index ACT_IDX_DJOB_SCOPE_DEF;
-drop index ACT_IDX_EJOB_SCOPE;
-drop index ACT_IDX_EJOB_SUB_SCOPE;
-drop index ACT_IDX_EJOB_SCOPE_DEF;
-
-drop index ACT_IDX_JOB_EXCEPTION;
-drop index ACT_IDX_JOB_CUSTOM_VAL_ID;
-drop index ACT_IDX_JOB_CORRELATION_ID;
-
-drop index ACT_IDX_TJOB_EXCEPTION;
-drop index ACT_IDX_TJOB_CUSTOM_VAL_ID;
-drop index ACT_IDX_TJOB_CORRELATION_ID;
-drop index ACT_IDX_TJOB_DUEDATE;
-
-drop index ACT_IDX_SJOB_EXCEPTION;
-drop index ACT_IDX_SJOB_CUSTOM_VAL_ID;
-drop index ACT_IDX_SJOB_CORRELATION_ID;
-
-drop index ACT_IDX_DJOB_EXCEPTION;
-drop index ACT_IDX_DJOB_CUSTOM_VAL_ID;
-drop index ACT_IDX_DJOB_CORRELATION_ID;
-
-drop index ACT_IDX_EJOB_EXCEPTION;
-drop index ACT_IDX_EJOB_CUSTOM_VAL_ID;
-drop index ACT_IDX_EJOB_CORRELATION_ID;
-
-alter table ACT_RU_JOB
- drop CONSTRAINT ACT_FK_JOB_EXCEPTION;
-
-alter table ACT_RU_JOB
- drop CONSTRAINT ACT_FK_JOB_CUSTOM_VAL;
-
-alter table ACT_RU_TIMER_JOB
- drop CONSTRAINT ACT_FK_TJOB_EXCEPTION;
-
-alter table ACT_RU_TIMER_JOB
- drop CONSTRAINT ACT_FK_TJOB_CUSTOM_VAL;
-
-alter table ACT_RU_SUSPENDED_JOB
- drop CONSTRAINT ACT_FK_SJOB_EXCEPTION;
-
-alter table ACT_RU_SUSPENDED_JOB
- drop CONSTRAINT ACT_FK_SJOB_CUSTOM_VAL;
-
-alter table ACT_RU_DEADLETTER_JOB
- drop CONSTRAINT ACT_FK_DJOB_EXCEPTION;
-
-alter table ACT_RU_DEADLETTER_JOB
- drop CONSTRAINT ACT_FK_DJOB_CUSTOM_VAL;
-
-alter table ACT_RU_EXTERNAL_JOB
- drop CONSTRAINT ACT_FK_DJOB_EXCEPTION;
-
-alter table ACT_RU_EXTERNAL_JOB
- drop CONSTRAINT ACT_FK_DJOB_CUSTOM_VAL;
-
-drop table ACT_RU_JOB;
-drop table ACT_RU_TIMER_JOB;
-drop table ACT_RU_SUSPENDED_JOB;
-drop table ACT_RU_DEADLETTER_JOB;
-drop table ACT_RU_HISTORY_JOB;
-drop table ACT_RU_EXTERNAL_JOB;
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.postgres.drop.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.postgres.drop.job.sql
deleted file mode 100644
index b40b5340063..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/drop/flowable.postgres.drop.job.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-drop table if exists ACT_RU_JOB cascade;
-drop table if exists ACT_RU_TIMER_JOB cascade;
-drop table if exists ACT_RU_SUSPENDED_JOB cascade;
-drop table if exists ACT_RU_DEADLETTER_JOB cascade;
-drop table if exists ACT_RU_HISTORY_JOB cascade;
-drop table if exists ACT_RU_EXTERNAL_JOB cascade;
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6120.to.6200.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6120.to.6200.job.sql
deleted file mode 100644
index 7dda0da7d18..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6120.to.6200.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-insert into ACT_GE_PROPERTY values ('job.schema.version', '6.2.0.0', 1);
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6210.to.6300.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6210.to.6300.job.sql
deleted file mode 100644
index 46095f642bd..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6210.to.6300.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-update ACT_RU_TIMER_JOB set HANDLER_TYPE_ = 'cmmn-trigger-timer' where HANDLER_TYPE_ = 'trigger-timer' and SCOPE_TYPE_ = 'cmmn';
-
-update ACT_GE_PROPERTY set VALUE_ = '6.3.0.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6300.to.6301.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6300.to.6301.job.sql
deleted file mode 100644
index bae42ddec20..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6300.to.6301.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.3.0.1' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6301.to.6310.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6301.to.6310.job.sql
deleted file mode 100644
index 41d60c12252..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6301.to.6310.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.3.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6310.to.6320.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6310.to.6320.job.sql
deleted file mode 100644
index 7252410620e..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6310.to.6320.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.3.2.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6320.to.6400.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6320.to.6400.job.sql
deleted file mode 100644
index 10cb9199993..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6320.to.6400.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.4.0.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6400.to.6410.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6400.to.6410.job.sql
deleted file mode 100644
index 62ff8113cc1..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6400.to.6410.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.4.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6410.to.6411.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6410.to.6411.job.sql
deleted file mode 100644
index 8f9cbc7dd51..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6410.to.6411.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.4.1.1' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6411.to.6412.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6411.to.6412.job.sql
deleted file mode 100644
index cc0995d3fd0..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6411.to.6412.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.4.1.2' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6412.to.6413.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6412.to.6413.job.sql
deleted file mode 100644
index 975a1bbd312..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6412.to.6413.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.4.1.3' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6413.to.6500.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6413.to.6500.job.sql
deleted file mode 100644
index 99cb6d43c5f..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6413.to.6500.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6501.to.6502.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6501.to.6502.job.sql
deleted file mode 100644
index e1d867942c9..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6501.to.6502.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.2' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6502.to.6503.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6502.to.6503.job.sql
deleted file mode 100644
index bc9442af361..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6502.to.6503.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.3' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6503.to.6504.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6503.to.6504.job.sql
deleted file mode 100644
index 289b3a203cf..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6503.to.6504.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.4' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6504.to.6505.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6504.to.6505.job.sql
deleted file mode 100644
index 72c549e593e..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6504.to.6505.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.5' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6505.to.6506.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6505.to.6506.job.sql
deleted file mode 100644
index e1fba2ccffa..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6505.to.6506.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.6' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6506.to.6510.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6506.to.6510.job.sql
deleted file mode 100644
index 61260fd616f..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6506.to.6510.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6510.to.6511.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6510.to.6511.job.sql
deleted file mode 100644
index fe2c46ba344..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6510.to.6511.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.1' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6514.to.6515.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6514.to.6515.job.sql
deleted file mode 100644
index 676af3544dc..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6514.to.6515.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.5' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6515.to.6516.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6515.to.6516.job.sql
deleted file mode 100644
index 02c727286f9..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6515.to.6516.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.6' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6516.to.6600.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6516.to.6600.job.sql
deleted file mode 100644
index 9a0e6411358..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6516.to.6600.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.0.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6600.to.6601.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6600.to.6601.job.sql
deleted file mode 100644
index ce5bc8ca5c9..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6600.to.6601.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.0.1' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6610.to.6620.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6610.to.6620.job.sql
deleted file mode 100644
index ec154f73a98..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6610.to.6620.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.2.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6620.to.6621.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6620.to.6621.job.sql
deleted file mode 100644
index 47b1d8ae582..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6620.to.6621.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.6.2.1' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6621.to.6700.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6621.to.6700.job.sql
deleted file mode 100644
index f3759ce4212..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6621.to.6700.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.0.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6700.to.6701.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6700.to.6701.job.sql
deleted file mode 100644
index c912718d2fc..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6700.to.6701.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.0.1' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6701.to.6710.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6701.to.6710.job.sql
deleted file mode 100644
index e4dae4ff08f..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6701.to.6710.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.1.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6710.to.6720.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6710.to.6720.job.sql
deleted file mode 100644
index aa30a3e4da1..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6710.to.6720.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6720.to.6721.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6720.to.6721.job.sql
deleted file mode 100644
index 596b6129bd1..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6720.to.6721.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.1' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6721.to.6722.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6721.to.6722.job.sql
deleted file mode 100644
index 1b0aa0f1d5e..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6721.to.6722.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.2' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6722.to.6723.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6722.to.6723.job.sql
deleted file mode 100644
index 01079003940..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6722.to.6723.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.7.2.3' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6723.to.6800.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6723.to.6800.job.sql
deleted file mode 100644
index 1cb2084ca14..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6723.to.6800.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.8.0.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6800.to.6810.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6800.to.6810.job.sql
deleted file mode 100644
index bbe273e6f0b..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6800.to.6810.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '6.8.1.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6810.to.7000.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6810.to.7000.job.sql
deleted file mode 100644
index 23bb86db458..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.6810.to.7000.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.0.0.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.7000.to.7010.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.7000.to.7010.job.sql
deleted file mode 100644
index d3bd3ad5562..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.7000.to.7010.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.7010.to.7011.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.7010.to.7011.job.sql
deleted file mode 100644
index 22769e6c381..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.7010.to.7011.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.0.1.1' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.7011.to.7100.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.7011.to.7100.job.sql
deleted file mode 100644
index 1f61efe492a..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.all.upgradestep.7011.to.7100.job.sql
+++ /dev/null
@@ -1 +0,0 @@
-update ACT_GE_PROPERTY set VALUE_ = '7.1.0.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6200.to.6210.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6200.to.6210.job.sql
deleted file mode 100644
index fc5bbd9bb03..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6200.to.6210.job.sql
+++ /dev/null
@@ -1,76 +0,0 @@
-alter table ACT_RU_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-Call Sysproc.admin_cmd ('REORG TABLE ACT_RU_JOB');
-
-alter table ACT_RU_TIMER_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-Call Sysproc.admin_cmd ('REORG TABLE ACT_RU_TIMER_JOB');
-
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-Call Sysproc.admin_cmd ('REORG TABLE ACT_RU_SUSPENDED_JOB');
-
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-Call Sysproc.admin_cmd ('REORG TABLE ACT_RU_DEADLETTER_JOB');
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-alter table ACT_RU_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_TIMER_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_SUSPENDED_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_DEADLETTER_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_HISTORY_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-
-create index ACT_IDX_JOB_CUSTOM_VAL_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TJOB_CUSTOM_VAL_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SJOB_CUSTOM_VAL_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DJOB_CUSTOM_VAL_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.2.1.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6301.to.6310.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6301.to.6310.job.sql
deleted file mode 100644
index 3f9341c4de6..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6301.to.6310.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_HISTORY_JOB add column SCOPE_TYPE_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.3.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6500.to.6501.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6500.to.6501.job.sql
deleted file mode 100644
index abcdcd980f9..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6500.to.6501.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column ELEMENT_NAME_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.1' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6511.to.6512.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6511.to.6512.job.sql
deleted file mode 100644
index 939cc483b88..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6511.to.6512.job.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-alter table ACT_RU_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column CATEGORY_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.2' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6512.to.6513.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6512.to.6513.job.sql
deleted file mode 100644
index a9944151f47..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6512.to.6513.job.sql
+++ /dev/null
@@ -1,49 +0,0 @@
-create table ACT_RU_EXTERNAL_JOB (
- ID_ varchar(64) not null,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) not null,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ smallint check(EXCLUSIVE_ in (1,0)),
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_EJOB_EXCEPTION_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EJOB_CUSTOM_VAL_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EJOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.3' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6513.to.6514.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6513.to.6514.job.sql
deleted file mode 100644
index 0e8fda8b68a..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6513.to.6514.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_EXTERNAL_JOB add column CORRELATION_ID_ varchar(255);
-
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-create index ACT_IDX_TJOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_SJOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-create index ACT_IDX_DJOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-create index ACT_IDX_EJOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.4' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6601.to.6610.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6601.to.6610.job.sql
deleted file mode 100644
index 44c3468b5b3..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.db2.upgradestep.6601.to.6610.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-create index ACT_IDX_TJOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.6.1.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6200.to.6210.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6200.to.6210.job.sql
deleted file mode 100644
index 58f59520416..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6200.to.6210.job.sql
+++ /dev/null
@@ -1,68 +0,0 @@
-alter table ACT_RU_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-alter table ACT_RU_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_TIMER_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_SUSPENDED_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_DEADLETTER_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_HISTORY_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-
-create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.2.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6301.to.6310.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6301.to.6310.job.sql
deleted file mode 100644
index 3f9341c4de6..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6301.to.6310.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_HISTORY_JOB add column SCOPE_TYPE_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.3.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6500.to.6501.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6500.to.6501.job.sql
deleted file mode 100644
index abcdcd980f9..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6500.to.6501.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column ELEMENT_NAME_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.1' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6511.to.6512.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6511.to.6512.job.sql
deleted file mode 100644
index 939cc483b88..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6511.to.6512.job.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-alter table ACT_RU_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column CATEGORY_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.2' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6512.to.6513.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6512.to.6513.job.sql
deleted file mode 100644
index 34df9073a80..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6512.to.6513.job.sql
+++ /dev/null
@@ -1,48 +0,0 @@
-create table ACT_RU_EXTERNAL_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.3' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6513.to.6514.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6513.to.6514.job.sql
deleted file mode 100644
index 8386eeb18c5..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6513.to.6514.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_EXTERNAL_JOB add column CORRELATION_ID_ varchar(255);
-
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.4' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6601.to.6610.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6601.to.6610.job.sql
deleted file mode 100644
index 1bd5f30fd36..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.h2.upgradestep.6601.to.6610.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.6.1.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6200.to.6210.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6200.to.6210.job.sql
deleted file mode 100644
index ad43d7b65bd..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6200.to.6210.job.sql
+++ /dev/null
@@ -1,68 +0,0 @@
-alter table ACT_RU_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-alter table ACT_RU_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_TIMER_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_SUSPENDED_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_DEADLETTER_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_HISTORY_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-
-create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.2.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6301.to.6310.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6301.to.6310.job.sql
deleted file mode 100644
index 3f9341c4de6..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6301.to.6310.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_HISTORY_JOB add column SCOPE_TYPE_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.3.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6500.to.6501.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6500.to.6501.job.sql
deleted file mode 100644
index abcdcd980f9..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6500.to.6501.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column ELEMENT_NAME_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.1' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6511.to.6512.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6511.to.6512.job.sql
deleted file mode 100644
index 939cc483b88..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6511.to.6512.job.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-alter table ACT_RU_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column CATEGORY_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.2' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6512.to.6513.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6512.to.6513.job.sql
deleted file mode 100644
index 34df9073a80..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6512.to.6513.job.sql
+++ /dev/null
@@ -1,48 +0,0 @@
-create table ACT_RU_EXTERNAL_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.3' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6513.to.6514.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6513.to.6514.job.sql
deleted file mode 100644
index 8386eeb18c5..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6513.to.6514.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_EXTERNAL_JOB add column CORRELATION_ID_ varchar(255);
-
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.4' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6601.to.6610.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6601.to.6610.job.sql
deleted file mode 100644
index 1bd5f30fd36..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.hsql.upgradestep.6601.to.6610.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.6.1.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6200.to.6210.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6200.to.6210.job.sql
deleted file mode 100644
index d398a38aedf..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6200.to.6210.job.sql
+++ /dev/null
@@ -1,68 +0,0 @@
-alter table ACT_RU_JOB add SCOPE_ID_ nvarchar(255);
-alter table ACT_RU_JOB add SUB_SCOPE_ID_ nvarchar(255);
-alter table ACT_RU_JOB add SCOPE_TYPE_ nvarchar(255);
-alter table ACT_RU_JOB add SCOPE_DEFINITION_ID_ nvarchar(255);
-
-alter table ACT_RU_TIMER_JOB add SCOPE_ID_ nvarchar(255);
-alter table ACT_RU_TIMER_JOB add SUB_SCOPE_ID_ nvarchar(255);
-alter table ACT_RU_TIMER_JOB add SCOPE_TYPE_ nvarchar(255);
-alter table ACT_RU_TIMER_JOB add SCOPE_DEFINITION_ID_ nvarchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add SCOPE_ID_ nvarchar(255);
-alter table ACT_RU_SUSPENDED_JOB add SUB_SCOPE_ID_ nvarchar(255);
-alter table ACT_RU_SUSPENDED_JOB add SCOPE_TYPE_ nvarchar(255);
-alter table ACT_RU_SUSPENDED_JOB add SCOPE_DEFINITION_ID_ nvarchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add SCOPE_ID_ nvarchar(255);
-alter table ACT_RU_DEADLETTER_JOB add SUB_SCOPE_ID_ nvarchar(255);
-alter table ACT_RU_DEADLETTER_JOB add SCOPE_TYPE_ nvarchar(255);
-alter table ACT_RU_DEADLETTER_JOB add SCOPE_DEFINITION_ID_ nvarchar(255);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-alter table ACT_RU_JOB add CUSTOM_VALUES_ID_ nvarchar(64);
-alter table ACT_RU_TIMER_JOB add CUSTOM_VALUES_ID_ nvarchar(64);
-alter table ACT_RU_SUSPENDED_JOB add CUSTOM_VALUES_ID_ nvarchar(64);
-alter table ACT_RU_DEADLETTER_JOB add CUSTOM_VALUES_ID_ nvarchar(64);
-alter table ACT_RU_HISTORY_JOB add CUSTOM_VALUES_ID_ nvarchar(64);
-
-create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.2.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6301.to.6310.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6301.to.6310.job.sql
deleted file mode 100644
index 72b7d0b99d5..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6301.to.6310.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_HISTORY_JOB add SCOPE_TYPE_ nvarchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.3.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6500.to.6501.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6500.to.6501.job.sql
deleted file mode 100644
index 54708f72aa3..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6500.to.6501.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add ELEMENT_ID_ nvarchar(255);
-alter table ACT_RU_JOB add ELEMENT_NAME_ nvarchar(255);
-
-alter table ACT_RU_TIMER_JOB add ELEMENT_ID_ nvarchar(255);
-alter table ACT_RU_TIMER_JOB add ELEMENT_NAME_ nvarchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add ELEMENT_ID_ nvarchar(255);
-alter table ACT_RU_SUSPENDED_JOB add ELEMENT_NAME_ nvarchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add ELEMENT_ID_ nvarchar(255);
-alter table ACT_RU_DEADLETTER_JOB add ELEMENT_NAME_ nvarchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.1' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6511.to.6512.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6511.to.6512.job.sql
deleted file mode 100644
index 98778e9e13b..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6511.to.6512.job.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-alter table ACT_RU_JOB add CATEGORY_ nvarchar(255);
-
-alter table ACT_RU_TIMER_JOB add CATEGORY_ nvarchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add CATEGORY_ nvarchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add CATEGORY_ nvarchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.2' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6512.to.6513.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6512.to.6513.job.sql
deleted file mode 100644
index e151ade2202..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6512.to.6513.job.sql
+++ /dev/null
@@ -1,48 +0,0 @@
-create table ACT_RU_EXTERNAL_JOB (
- ID_ nvarchar(64) NOT NULL,
- REV_ int,
- CATEGORY_ varchar(255),
- TYPE_ nvarchar(255) NOT NULL,
- LOCK_EXP_TIME_ datetime,
- LOCK_OWNER_ nvarchar(255),
- EXCLUSIVE_ bit,
- EXECUTION_ID_ nvarchar(64),
- PROCESS_INSTANCE_ID_ nvarchar(64),
- PROC_DEF_ID_ nvarchar(64),
- ELEMENT_ID_ nvarchar(255),
- ELEMENT_NAME_ nvarchar(255),
- SCOPE_ID_ nvarchar(255),
- SUB_SCOPE_ID_ nvarchar(255),
- SCOPE_TYPE_ nvarchar(255),
- SCOPE_DEFINITION_ID_ nvarchar(255),
- RETRIES_ int,
- EXCEPTION_STACK_ID_ nvarchar(64),
- EXCEPTION_MSG_ nvarchar(4000),
- DUEDATE_ datetime NULL,
- REPEAT_ nvarchar(255),
- HANDLER_TYPE_ nvarchar(255),
- HANDLER_CFG_ nvarchar(4000),
- CUSTOM_VALUES_ID_ nvarchar(64),
- CREATE_TIME_ datetime2 NULL,
- TENANT_ID_ nvarchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.3' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6513.to.6514.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6513.to.6514.job.sql
deleted file mode 100644
index 4e17c85c563..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6513.to.6514.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add CORRELATION_ID_ nvarchar(255);
-alter table ACT_RU_TIMER_JOB add CORRELATION_ID_ nvarchar(255);
-alter table ACT_RU_SUSPENDED_JOB add CORRELATION_ID_ nvarchar(255);
-alter table ACT_RU_DEADLETTER_JOB add CORRELATION_ID_ nvarchar(255);
-alter table ACT_RU_EXTERNAL_JOB add CORRELATION_ID_ nvarchar(255);
-
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.4' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6601.to.6610.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6601.to.6610.job.sql
deleted file mode 100644
index 1bd5f30fd36..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mssql.upgradestep.6601.to.6610.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.6.1.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6200.to.6210.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6200.to.6210.job.sql
deleted file mode 100644
index ad43d7b65bd..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6200.to.6210.job.sql
+++ /dev/null
@@ -1,68 +0,0 @@
-alter table ACT_RU_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-alter table ACT_RU_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_TIMER_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_SUSPENDED_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_DEADLETTER_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_HISTORY_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-
-create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.2.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6301.to.6310.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6301.to.6310.job.sql
deleted file mode 100644
index 3f9341c4de6..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6301.to.6310.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_HISTORY_JOB add column SCOPE_TYPE_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.3.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6500.to.6501.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6500.to.6501.job.sql
deleted file mode 100644
index abcdcd980f9..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6500.to.6501.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column ELEMENT_NAME_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.1' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6511.to.6512.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6511.to.6512.job.sql
deleted file mode 100644
index 939cc483b88..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6511.to.6512.job.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-alter table ACT_RU_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column CATEGORY_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.2' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6512.to.6513.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6512.to.6513.job.sql
deleted file mode 100644
index 2855f28cbb8..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6512.to.6513.job.sql
+++ /dev/null
@@ -1,48 +0,0 @@
-create table ACT_RU_EXTERNAL_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp(3) NULL,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp(3) NULL,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp(3) NULL,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.3' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6513.to.6514.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6513.to.6514.job.sql
deleted file mode 100644
index 8386eeb18c5..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6513.to.6514.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_EXTERNAL_JOB add column CORRELATION_ID_ varchar(255);
-
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.4' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6601.to.6610.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6601.to.6610.job.sql
deleted file mode 100644
index 1bd5f30fd36..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql.upgradestep.6601.to.6610.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.6.1.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6200.to.6210.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6200.to.6210.job.sql
deleted file mode 100644
index ad43d7b65bd..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6200.to.6210.job.sql
+++ /dev/null
@@ -1,68 +0,0 @@
-alter table ACT_RU_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-alter table ACT_RU_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_TIMER_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_SUSPENDED_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_DEADLETTER_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_HISTORY_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-
-create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.2.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6301.to.6310.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6301.to.6310.job.sql
deleted file mode 100644
index 3f9341c4de6..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6301.to.6310.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_HISTORY_JOB add column SCOPE_TYPE_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.3.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6500.to.6501.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6500.to.6501.job.sql
deleted file mode 100644
index abcdcd980f9..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6500.to.6501.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column ELEMENT_NAME_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.1' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6511.to.6512.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6511.to.6512.job.sql
deleted file mode 100644
index 939cc483b88..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6511.to.6512.job.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-alter table ACT_RU_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column CATEGORY_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.2' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6512.to.6513.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6512.to.6513.job.sql
deleted file mode 100644
index 4d49e8a81c6..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6512.to.6513.job.sql
+++ /dev/null
@@ -1,48 +0,0 @@
-create table ACT_RU_EXTERNAL_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp NULL,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp NULL,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp NULL,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.3' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6513.to.6514.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6513.to.6514.job.sql
deleted file mode 100644
index 8386eeb18c5..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6513.to.6514.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_EXTERNAL_JOB add column CORRELATION_ID_ varchar(255);
-
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.4' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6601.to.6610.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6601.to.6610.job.sql
deleted file mode 100644
index 1bd5f30fd36..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.mysql55.upgradestep.6601.to.6610.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.6.1.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6200.to.6210.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6200.to.6210.job.sql
deleted file mode 100644
index 3d80937b754..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6200.to.6210.job.sql
+++ /dev/null
@@ -1,68 +0,0 @@
-alter table ACT_RU_JOB add SCOPE_ID_ NVARCHAR2(255);
-alter table ACT_RU_JOB add SUB_SCOPE_ID_ NVARCHAR2(255);
-alter table ACT_RU_JOB add SCOPE_TYPE_ NVARCHAR2(255);
-alter table ACT_RU_JOB add SCOPE_DEFINITION_ID_ NVARCHAR2(255);
-
-alter table ACT_RU_TIMER_JOB add SCOPE_ID_ NVARCHAR2(255);
-alter table ACT_RU_TIMER_JOB add SUB_SCOPE_ID_ NVARCHAR2(255);
-alter table ACT_RU_TIMER_JOB add SCOPE_TYPE_ NVARCHAR2(255);
-alter table ACT_RU_TIMER_JOB add SCOPE_DEFINITION_ID_ NVARCHAR2(255);
-
-alter table ACT_RU_SUSPENDED_JOB add SCOPE_ID_ NVARCHAR2(255);
-alter table ACT_RU_SUSPENDED_JOB add SUB_SCOPE_ID_ NVARCHAR2(255);
-alter table ACT_RU_SUSPENDED_JOB add SCOPE_TYPE_ NVARCHAR2(255);
-alter table ACT_RU_SUSPENDED_JOB add SCOPE_DEFINITION_ID_ NVARCHAR2(255);
-
-alter table ACT_RU_DEADLETTER_JOB add SCOPE_ID_ NVARCHAR2(255);
-alter table ACT_RU_DEADLETTER_JOB add SUB_SCOPE_ID_ NVARCHAR2(255);
-alter table ACT_RU_DEADLETTER_JOB add SCOPE_TYPE_ NVARCHAR2(255);
-alter table ACT_RU_DEADLETTER_JOB add SCOPE_DEFINITION_ID_ NVARCHAR2(255);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-alter table ACT_RU_JOB add CUSTOM_VALUES_ID_ NVARCHAR2(64);
-alter table ACT_RU_TIMER_JOB add CUSTOM_VALUES_ID_ NVARCHAR2(64);
-alter table ACT_RU_SUSPENDED_JOB add CUSTOM_VALUES_ID_ NVARCHAR2(64);
-alter table ACT_RU_DEADLETTER_JOB add CUSTOM_VALUES_ID_ NVARCHAR2(64);
-alter table ACT_RU_HISTORY_JOB add CUSTOM_VALUES_ID_ NVARCHAR2(64);
-
-create index ACT_IDX_JOB_CUSTOM_VAL_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TJOB_CUSTOM_VAL_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SJOB_CUSTOM_VAL_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DJOB_CUSTOM_VAL_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.2.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6301.to.6310.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6301.to.6310.job.sql
deleted file mode 100644
index 17a36574fd6..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6301.to.6310.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_HISTORY_JOB add SCOPE_TYPE_ NVARCHAR2(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.3.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6500.to.6501.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6500.to.6501.job.sql
deleted file mode 100644
index ea2db4d722b..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6500.to.6501.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add ELEMENT_ID_ NVARCHAR2(255);
-alter table ACT_RU_JOB add ELEMENT_NAME_ NVARCHAR2(255);
-
-alter table ACT_RU_TIMER_JOB add ELEMENT_ID_ NVARCHAR2(255);
-alter table ACT_RU_TIMER_JOB add ELEMENT_NAME_ NVARCHAR2(255);
-
-alter table ACT_RU_SUSPENDED_JOB add ELEMENT_ID_ NVARCHAR2(255);
-alter table ACT_RU_SUSPENDED_JOB add ELEMENT_NAME_ NVARCHAR2(255);
-
-alter table ACT_RU_DEADLETTER_JOB add ELEMENT_ID_ NVARCHAR2(255);
-alter table ACT_RU_DEADLETTER_JOB add ELEMENT_NAME_ NVARCHAR2(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.1' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6511.to.6512.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6511.to.6512.job.sql
deleted file mode 100644
index 296ca446189..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6511.to.6512.job.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-alter table ACT_RU_JOB add CATEGORY_ NVARCHAR2(255);
-
-alter table ACT_RU_TIMER_JOB add CATEGORY_ NVARCHAR2(255);
-
-alter table ACT_RU_SUSPENDED_JOB add CATEGORY_ NVARCHAR2(255);
-
-alter table ACT_RU_DEADLETTER_JOB add CATEGORY_ NVARCHAR2(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.2' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6512.to.6513.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6512.to.6513.job.sql
deleted file mode 100644
index 145ed42d402..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6512.to.6513.job.sql
+++ /dev/null
@@ -1,48 +0,0 @@
-create table ACT_RU_EXTERNAL_JOB (
- ID_ NVARCHAR2(64) NOT NULL,
- REV_ INTEGER,
- CATEGORY_ NVARCHAR2(255),
- TYPE_ NVARCHAR2(255) NOT NULL,
- LOCK_EXP_TIME_ TIMESTAMP(6),
- LOCK_OWNER_ NVARCHAR2(255),
- EXCLUSIVE_ NUMBER(1,0) CHECK (EXCLUSIVE_ IN (1,0)),
- EXECUTION_ID_ NVARCHAR2(64),
- PROCESS_INSTANCE_ID_ NVARCHAR2(64),
- PROC_DEF_ID_ NVARCHAR2(64),
- ELEMENT_ID_ NVARCHAR2(255),
- ELEMENT_NAME_ NVARCHAR2(255),
- SCOPE_ID_ NVARCHAR2(255),
- SUB_SCOPE_ID_ NVARCHAR2(255),
- SCOPE_TYPE_ NVARCHAR2(255),
- SCOPE_DEFINITION_ID_ NVARCHAR2(255),
- RETRIES_ INTEGER,
- EXCEPTION_STACK_ID_ NVARCHAR2(64),
- EXCEPTION_MSG_ NVARCHAR2(2000),
- DUEDATE_ TIMESTAMP(6),
- REPEAT_ NVARCHAR2(255),
- HANDLER_TYPE_ NVARCHAR2(255),
- HANDLER_CFG_ NVARCHAR2(2000),
- CUSTOM_VALUES_ID_ NVARCHAR2(64),
- CREATE_TIME_ TIMESTAMP(6),
- TENANT_ID_ NVARCHAR2(255) DEFAULT '',
- primary key (ID_)
-);
-
-create index ACT_IDX_EJOB_EXCEPTION on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EJOB_CUSTOM_VAL_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EJOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EJOB_CUSTOM_VAL
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.3' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6513.to.6514.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6513.to.6514.job.sql
deleted file mode 100644
index 66024c304dd..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6513.to.6514.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add CORRELATION_ID_ NVARCHAR2(255);
-alter table ACT_RU_TIMER_JOB add CORRELATION_ID_ NVARCHAR2(255);
-alter table ACT_RU_SUSPENDED_JOB add CORRELATION_ID_ NVARCHAR2(255);
-alter table ACT_RU_DEADLETTER_JOB add CORRELATION_ID_ NVARCHAR2(255);
-alter table ACT_RU_EXTERNAL_JOB add CORRELATION_ID_ NVARCHAR2(255);
-
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-create index ACT_IDX_TJOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_SJOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-create index ACT_IDX_DJOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-create index ACT_IDX_EJOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.4' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6601.to.6610.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6601.to.6610.job.sql
deleted file mode 100644
index f84a527d4b3..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.oracle.upgradestep.6601.to.6610.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-create index ACT_IDX_TJOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.6.1.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6200.to.6210.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6200.to.6210.job.sql
deleted file mode 100644
index ad43d7b65bd..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6200.to.6210.job.sql
+++ /dev/null
@@ -1,68 +0,0 @@
-alter table ACT_RU_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SUB_SCOPE_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_TYPE_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column SCOPE_DEFINITION_ID_ varchar(255);
-
-create index ACT_IDX_JOB_SCOPE on ACT_RU_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SUB_SCOPE on ACT_RU_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_JOB_SCOPE_DEF on ACT_RU_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_TJOB_SCOPE on ACT_RU_TIMER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SUB_SCOPE on ACT_RU_TIMER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_TJOB_SCOPE_DEF on ACT_RU_TIMER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_SJOB_SCOPE on ACT_RU_SUSPENDED_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SUB_SCOPE on ACT_RU_SUSPENDED_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_SJOB_SCOPE_DEF on ACT_RU_SUSPENDED_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-create index ACT_IDX_DJOB_SCOPE on ACT_RU_DEADLETTER_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SUB_SCOPE on ACT_RU_DEADLETTER_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_DJOB_SCOPE_DEF on ACT_RU_DEADLETTER_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-alter table ACT_RU_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_TIMER_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_SUSPENDED_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_DEADLETTER_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-alter table ACT_RU_HISTORY_JOB add column CUSTOM_VALUES_ID_ varchar(64);
-
-create index ACT_IDX_JOB_CUSTOM_VALUES_ID on ACT_RU_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID on ACT_RU_TIMER_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID on ACT_RU_SUSPENDED_JOB(CUSTOM_VALUES_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID on ACT_RU_DEADLETTER_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_TIMER_JOB
- add constraint ACT_FK_TIMER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_SUSPENDED_JOB
- add constraint ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_DEADLETTER_JOB
- add constraint ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.2.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6301.to.6310.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6301.to.6310.job.sql
deleted file mode 100644
index 3f9341c4de6..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6301.to.6310.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table ACT_RU_HISTORY_JOB add column SCOPE_TYPE_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.3.1.0' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6500.to.6501.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6500.to.6501.job.sql
deleted file mode 100644
index abcdcd980f9..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6500.to.6501.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column ELEMENT_NAME_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column ELEMENT_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column ELEMENT_NAME_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.0.1' where NAME_ = 'job.schema.version';
\ No newline at end of file
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6511.to.6512.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6511.to.6512.job.sql
deleted file mode 100644
index 939cc483b88..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6511.to.6512.job.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-alter table ACT_RU_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_TIMER_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_SUSPENDED_JOB add column CATEGORY_ varchar(255);
-
-alter table ACT_RU_DEADLETTER_JOB add column CATEGORY_ varchar(255);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.2' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6512.to.6513.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6512.to.6513.job.sql
deleted file mode 100644
index 34df9073a80..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6512.to.6513.job.sql
+++ /dev/null
@@ -1,48 +0,0 @@
-create table ACT_RU_EXTERNAL_JOB (
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- ELEMENT_ID_ varchar(255),
- ELEMENT_NAME_ varchar(255),
- SCOPE_ID_ varchar(255),
- SUB_SCOPE_ID_ varchar(255),
- SCOPE_TYPE_ varchar(255),
- SCOPE_DEFINITION_ID_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- CUSTOM_VALUES_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- TENANT_ID_ varchar(255) default '',
- primary key (ID_)
-);
-
-create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID on ACT_RU_EXTERNAL_JOB(EXCEPTION_STACK_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID on ACT_RU_EXTERNAL_JOB(CUSTOM_VALUES_ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-alter table ACT_RU_EXTERNAL_JOB
- add constraint ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES
- foreign key (CUSTOM_VALUES_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_EJOB_SCOPE on ACT_RU_EXTERNAL_JOB(SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SUB_SCOPE on ACT_RU_EXTERNAL_JOB(SUB_SCOPE_ID_, SCOPE_TYPE_);
-create index ACT_IDX_EJOB_SCOPE_DEF on ACT_RU_EXTERNAL_JOB(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.3' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6513.to.6514.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6513.to.6514.job.sql
deleted file mode 100644
index 8386eeb18c5..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6513.to.6514.job.sql
+++ /dev/null
@@ -1,13 +0,0 @@
-alter table ACT_RU_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_TIMER_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_SUSPENDED_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_DEADLETTER_JOB add column CORRELATION_ID_ varchar(255);
-alter table ACT_RU_EXTERNAL_JOB add column CORRELATION_ID_ varchar(255);
-
-create index ACT_IDX_JOB_CORRELATION_ID on ACT_RU_JOB(CORRELATION_ID_);
-create index ACT_IDX_TIMER_JOB_CORRELATION_ID on ACT_RU_TIMER_JOB(CORRELATION_ID_);
-create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID on ACT_RU_SUSPENDED_JOB(CORRELATION_ID_);
-create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID on ACT_RU_DEADLETTER_JOB(CORRELATION_ID_);
-create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID on ACT_RU_EXTERNAL_JOB(CORRELATION_ID_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.5.1.4' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6601.to.6610.job.sql b/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6601.to.6610.job.sql
deleted file mode 100644
index 1bd5f30fd36..00000000000
--- a/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/upgrade/flowable.postgres.upgradestep.6601.to.6610.job.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-create index ACT_IDX_TIMER_JOB_DUEDATE on ACT_RU_TIMER_JOB(DUEDATE_);
-
-update ACT_GE_PROPERTY set VALUE_ = '6.6.1.0' where NAME_ = 'job.schema.version';
diff --git a/modules/flowable-osgi/src/test/java/org/flowable/osgi/blueprint/BlueprintBasicTest.java b/modules/flowable-osgi/src/test/java/org/flowable/osgi/blueprint/BlueprintBasicTest.java
index b0426fa37d4..f6024c83016 100755
--- a/modules/flowable-osgi/src/test/java/org/flowable/osgi/blueprint/BlueprintBasicTest.java
+++ b/modules/flowable-osgi/src/test/java/org/flowable/osgi/blueprint/BlueprintBasicTest.java
@@ -129,7 +129,6 @@ public Option[] createConfiguration() {
mavenBundle().groupId("com.h2database").artifactId("h2").versionAsInProject(),
mavenBundle().groupId("org.eclipse.angus").artifactId("angus-mail").versionAsInProject(),
mavenBundle().groupId("org.mybatis").artifactId("mybatis").versionAsInProject(),
- mavenBundle().groupId("org.liquibase").artifactId("liquibase-core").versionAsInProject(),
mavenBundle().groupId("org.slf4j").artifactId("slf4j-api").versionAsInProject(),
mavenBundle().groupId("org.slf4j").artifactId("slf4j-reload4j").versionAsInProject(),
mavenBundle().groupId("org.junit.jupiter").artifactId("junit-jupiter-api").versionAsInProject(),
diff --git a/modules/flowable-rest/src/test/java/org/flowable/rest/service/BaseSpringRestTestCase.java b/modules/flowable-rest/src/test/java/org/flowable/rest/service/BaseSpringRestTestCase.java
index 97923df7fe6..8b06545b84c 100644
--- a/modules/flowable-rest/src/test/java/org/flowable/rest/service/BaseSpringRestTestCase.java
+++ b/modules/flowable-rest/src/test/java/org/flowable/rest/service/BaseSpringRestTestCase.java
@@ -365,15 +365,7 @@ protected void assertAndEnsureCleanDb() throws Throwable {
processEngineConfiguration,
TABLENAMES_EXCLUDED_FROM_DB_CLEAN_CHECK,
exception == null,
- new Command() {
- @Override
- public Void execute(CommandContext commandContext) {
- SchemaManager schemaManager = CommandContextUtil.getProcessEngineConfiguration(commandContext).getSchemaManager();
- schemaManager.schemaDrop();
- schemaManager.schemaCreate();
- return null;
- }
- }
+ processEngineConfiguration.getSchemaManagementCmd()
);
}
diff --git a/modules/flowable-rest/src/test/java/org/flowable/rest/service/api/management/EnginePropertiesResourceTest.java b/modules/flowable-rest/src/test/java/org/flowable/rest/service/api/management/EnginePropertiesResourceTest.java
index 25b3669f449..bd0a3d67ce5 100644
--- a/modules/flowable-rest/src/test/java/org/flowable/rest/service/api/management/EnginePropertiesResourceTest.java
+++ b/modules/flowable-rest/src/test/java/org/flowable/rest/service/api/management/EnginePropertiesResourceTest.java
@@ -21,6 +21,7 @@
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.entity.StringEntity;
+import org.flowable.common.engine.impl.AbstractEngineConfiguration;
import org.flowable.common.engine.impl.interceptor.Command;
import org.flowable.common.engine.impl.interceptor.CommandContext;
import org.flowable.common.engine.impl.persistence.entity.PropertyEntity;
@@ -44,17 +45,15 @@ public class EnginePropertiesResourceTest extends BaseSpringRestTestCase {
@Before
public void createDatabase() throws Exception {
if (!databaseReset) {
- managementService.executeCommand(new Command
-
- org.liquibase
- liquibase-core
- 4.24.0
-
-
-
- javax.xml.bind
- jaxb-api
-
-
- com.opencsv
- opencsv
-
-
- org.yaml
- snakeyaml
-
-
- org.apache.commons
- *
-
-
-
org.hsqldb
hsqldb