diff --git a/examples/single-deployment-unit-example/src/main/resources/application.yml b/examples/single-deployment-unit-example/src/main/resources/application.yml
index 878c101ea..6d5f9d95e 100644
--- a/examples/single-deployment-unit-example/src/main/resources/application.yml
+++ b/examples/single-deployment-unit-example/src/main/resources/application.yml
@@ -124,6 +124,11 @@ miranum:
- "/actuator/**"
- "/engine-rest/deployment"
- "/rest/deployment"
+ - "/swagger-ui/index.html" # allow access to swagger
+ - "/swagger-ui*/*swagger-initializer.js" # allow access to swagger
+ - "/swagger-ui*/**" # allow access to swagger
+ - "/v3/api-docs/*" # allow access to swagger
+ - "/v3/api-docs" # allow access to swagger
logging.level:
io:
holunda:
diff --git a/platform/pom.xml b/platform/pom.xml
index a29f54121..be1f7d6e5 100644
--- a/platform/pom.xml
+++ b/platform/pom.xml
@@ -16,7 +16,6 @@
- services
engine
libs
diff --git a/platform/services/camunda7-engine-service/Dockerfile b/platform/services/camunda7-engine-service/Dockerfile
deleted file mode 100644
index 9472ddf58..000000000
--- a/platform/services/camunda7-engine-service/Dockerfile
+++ /dev/null
@@ -1,9 +0,0 @@
-FROM amazoncorretto:17-alpine
-
-EXPOSE 8080
-
-RUN mkdir /app
-
-COPY ./target/engine-tasklist-service-*.jar /app/spring-boot-application.jar
-
-CMD ["java","-jar","/app/spring-boot-application.jar"]
diff --git a/platform/services/camunda7-engine-service/README.md b/platform/services/camunda7-engine-service/README.md
deleted file mode 100644
index d08e5de4f..000000000
--- a/platform/services/camunda7-engine-service/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Single Node Engine Tasklist Service
-
-This is a single node engine tasklist service.
-
-## How to use it?
-
-Start the ``EngineTasklistApplication`` run configuration.
-For testing purposes, you can use the `simple-usertask.bpmn` process.
diff --git a/platform/services/camunda7-engine-service/pom.xml b/platform/services/camunda7-engine-service/pom.xml
deleted file mode 100644
index d73723308..000000000
--- a/platform/services/camunda7-engine-service/pom.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
- 4.0.0
- camunda7-engine-service
- camunda7-engine-service
-
-
- io.miranum.platform
- services
- 0.3.1-SNAPSHOT
-
-
-
-
-
- org.camunda.bpm.springboot
- camunda-bpm-spring-boot-starter
-
-
-
- org.camunda.bpm.springboot
- camunda-bpm-spring-boot-starter-rest
-
-
- io.holunda.data
- camunda-bpm-data
- 1.2.8
-
-
- org.camunda.bpm
- camunda-engine-plugin-spin
-
-
- org.camunda.spin
- camunda-spin-core
-
-
- org.camunda.spin
- camunda-spin-dataformat-json-jackson
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
- org.springframework.boot
- spring-boot-starter-data-jpa
-
-
-
-
- io.miranum.platform
- miranum-engine-core
- ${project.version}
-
-
- io.miranum.platform
- miranum-engine-task
- ${project.version}
-
-
-
-
-
- io.miranum.platform
- spring-security-starter
- ${project.version}
-
-
- io.miragon.miranum
- schema-registry
- ${miranum-connect.version}
-
-
-
-
-
- org.flywaydb
- flyway-core
-
-
- org.flywaydb
- flyway-sqlserver
-
-
-
-
-
-
-
- src/main/resources
- true
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
- repackage
-
-
-
-
-
- org.apache.maven.plugins
- maven-failsafe-plugin
-
-
-
-
-
-
diff --git a/platform/services/camunda7-engine-service/src/main/java/io/miranum/platform/engine/EngineTasklistApplication.java b/platform/services/camunda7-engine-service/src/main/java/io/miranum/platform/engine/EngineTasklistApplication.java
deleted file mode 100644
index 41d7d2373..000000000
--- a/platform/services/camunda7-engine-service/src/main/java/io/miranum/platform/engine/EngineTasklistApplication.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package io.miranum.platform.engine;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class EngineTasklistApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(EngineTasklistApplication.class, args);
- }
-}
diff --git a/platform/services/camunda7-engine-service/src/main/java/io/miranum/platform/engine/adapter/in/schemaregistry/SchemaDeploymentReceiver.java b/platform/services/camunda7-engine-service/src/main/java/io/miranum/platform/engine/adapter/in/schemaregistry/SchemaDeploymentReceiver.java
deleted file mode 100644
index f5a4cae93..000000000
--- a/platform/services/camunda7-engine-service/src/main/java/io/miranum/platform/engine/adapter/in/schemaregistry/SchemaDeploymentReceiver.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package io.miranum.platform.engine.adapter.in.schemaregistry;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import io.miragon.miranum.connect.json.registry.application.ports.in.SaveSchemaInCommand;
-import io.miragon.miranum.connect.json.registry.application.ports.in.SaveSchemaUseCase;
-import io.miragon.miranum.deploymentreceiver.application.DeploymentFailedException;
-import io.miragon.miranum.deploymentreceiver.application.ports.out.MiranumDeploymentReceiver;
-import io.miragon.miranum.deploymentreceiver.domain.Deployment;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Component;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Optional;
-
-@Component
-@RequiredArgsConstructor
-@Slf4j
-public class SchemaDeploymentReceiver implements MiranumDeploymentReceiver {
-
- private final SaveSchemaUseCase saveSchemaUseCase;
- private final ObjectMapper objectMapper = new ObjectMapper();
-
- @Override
- public void deploy(final Deployment deployment, final List tags) {
- try {
- final String namespace = deployment.getNamespace();
- final JsonNode jsonNode = this.objectMapper.readTree(deployment.getFile());
- final String schemaRef = Optional.of(jsonNode.get("key")).map(JsonNode::asText)
- .orElseThrow(() -> new DeploymentFailedException("No key found in schema " + jsonNode.get("key")));
-
- switch (deployment.getType().toLowerCase()) {
- case "form":
- final JsonNode schema = jsonNode.get("schema");
- this.saveSchemaUseCase.saveSchema(new SaveSchemaInCommand(namespace, schemaRef, tags, schema));
- break;
- case "config":
- this.saveSchemaUseCase.saveSchema(new SaveSchemaInCommand(namespace, schemaRef, tags, jsonNode));
- break;
- default:
- log.info("Ignoring deployment of type {}", deployment.getType().toLowerCase());
- }
- } catch (final IOException e) {
- log.error("Could not parse schema {}", deployment.getFilename(), e);
- throw new DeploymentFailedException("Could not parse schema " + deployment.getFilename());
- }
- }
-
-}
diff --git a/platform/services/camunda7-engine-service/src/main/java/io/miranum/platform/engine/adapter/out/NoToastPostgresSQLDialect.java b/platform/services/camunda7-engine-service/src/main/java/io/miranum/platform/engine/adapter/out/NoToastPostgresSQLDialect.java
deleted file mode 100644
index 5f2d381ef..000000000
--- a/platform/services/camunda7-engine-service/src/main/java/io/miranum/platform/engine/adapter/out/NoToastPostgresSQLDialect.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package io.miranum.platform.engine.adapter.out;
-
-import lombok.val;
-import org.hibernate.boot.model.TypeContributions;
-import org.hibernate.dialect.PostgreSQLDialect;
-import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo;
-import org.hibernate.service.ServiceRegistry;
-import org.hibernate.type.SqlTypes;
-import org.hibernate.type.descriptor.jdbc.BinaryJdbcType;
-import org.hibernate.type.descriptor.sql.internal.DdlTypeImpl;
-
-import java.sql.Types;
-
-/**
- * Custom dialect mapping SQL BLOB type to BYTEA postgresql type.
- */
-public class NoToastPostgresSQLDialect extends PostgreSQLDialect {
-
- public NoToastPostgresSQLDialect(DialectResolutionInfo info) {
- super(info);
- }
-
- @Override
- protected void registerColumnTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) {
- super.registerColumnTypes(typeContributions, serviceRegistry);
- val ddlTypeRegistry = typeContributions.getTypeConfiguration().getDdlTypeRegistry();
- ddlTypeRegistry.addDescriptor(new DdlTypeImpl(Types.BLOB, "bytea", this));
- }
-
- @Override
- public void contributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) {
- super.contributeTypes(typeContributions, serviceRegistry);
- val jdbcTypeRegistry = typeContributions.getTypeConfiguration().getJdbcTypeRegistry();
- jdbcTypeRegistry.addDescriptor(Types.BLOB, BinaryJdbcType.INSTANCE);
- }
-
- @Override
- protected String columnType(int sqlTypeCode) {
- return switch (sqlTypeCode) {
- case SqlTypes.BLOB -> "bytea";
- default -> super.columnType(sqlTypeCode);
- };
- }
-
- @Override
- protected String castType(int sqlTypeCode) {
- return switch (sqlTypeCode) {
- case SqlTypes.BLOB -> "bytea";
- default -> super.castType(sqlTypeCode);
- };
- }
-}
diff --git a/platform/services/camunda7-engine-service/src/main/java/io/miranum/platform/engine/adapter/out/auth/AppAuthenticationProviderImpl.java b/platform/services/camunda7-engine-service/src/main/java/io/miranum/platform/engine/adapter/out/auth/AppAuthenticationProviderImpl.java
deleted file mode 100644
index 3c945d871..000000000
--- a/platform/services/camunda7-engine-service/src/main/java/io/miranum/platform/engine/adapter/out/auth/AppAuthenticationProviderImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package io.miranum.platform.engine.adapter.out.auth;
-
-import io.miranum.platform.engine.api.AppAuthenticationProvider;
-import io.muenchendigital.digiwf.spring.security.authentication.UserAuthenticationProvider;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-@Component
-@RequiredArgsConstructor
-public class AppAuthenticationProviderImpl implements AppAuthenticationProvider {
-
- private final UserAuthenticationProvider userAuthenticationProvider;
-
- @Override
- public String getCurrentUserId() {
- return userAuthenticationProvider.getLoggedInUser();
- }
-
- @Override
- public List getCurrentUserGroups() {
- return userAuthenticationProvider.getLoggedInUserRoles();
- }
-}
diff --git a/platform/services/camunda7-engine-service/src/main/resources/application-sampledata.yml b/platform/services/camunda7-engine-service/src/main/resources/application-sampledata.yml
deleted file mode 100644
index 553eadaa2..000000000
--- a/platform/services/camunda7-engine-service/src/main/resources/application-sampledata.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-camunda:
- bpm:
- deployment-resource-pattern: "classpath*:**/*.bpmn"
- auto-deployment-enabled: true
diff --git a/platform/services/camunda7-engine-service/src/main/resources/application.yml b/platform/services/camunda7-engine-service/src/main/resources/application.yml
deleted file mode 100644
index cffbec388..000000000
--- a/platform/services/camunda7-engine-service/src/main/resources/application.yml
+++ /dev/null
@@ -1,140 +0,0 @@
-info:
- application:
- name: '@project.artifactId@'
- version: '@project.version@'
-
-camunda:
- bpm:
- authorization:
- enabled: false
- job-executor-acquire-by-priority: true
- generic-properties:
- properties:
- history-time-to-live: '185'
- history-cleanup-strategy: removalTimeBased
- history-cleanup-batch-window-start-time: '22:00'
- history-cleanup-batch-window-end-time: '06:00'
- history-removal-time-strategy: end
- history-cleanup-degree-of-parallelism: '4'
- enable-exceptions-after-unhandled-bpmn-error: true
- database:
- schema-update: false
- auto-deployment-enabled: false
-
-management:
- server:
- port: '${ENGINE_SERVER_PORT:8080}'
- endpoints:
- enabled-by-default: false
- web:
- exposure:
- include: 'health, info, prometheus'
- path-mapping:
- prometheus: metrics
- endpoint:
- health:
- enabled: true
- info:
- enabled: true
- prometheus:
- enabled: true
- health:
- ldap:
- enabled: false
- metrics:
- web:
- server:
- request:
- autotime:
- percentiles: '0.9,0.95,0.98,0.99,0.999,0.9999,0.99999,1'
- distribution:
- slo:
- http: 10,20,30,50,100,200,300,500,1000,2000,3000,5000,10000,15000,20000,25000,30000
-
-server:
- port: '${ENGINE_SERVER_PORT:8080}'
- error:
- include-exception: false
- include-stacktrace: never
- whitelabel:
- enabled: false
-
-spring:
- application:
- name: '@project.artifactId@'
- datasource:
- url: '${ENGINE_DATASOURCE_URL:jdbc:h2:file:~/backenddb;DB_CLOSE_ON_EXIT=FALSE}'
- username: '${ENGINE_DATASOURCE_USER:sa}'
- password: '${ENGINE_DATASOURCE_PASSWORD:}'
- driver-class-name: '${ENGINE_DATASOURCE_DRIVERCLASSNAME:org.h2.Driver}'
- jpa:
- database-platform: '${ENGINE_DATABASE_PLATFORM:org.hibernate.dialect.H2Dialect}'
- hibernate:
- ddl-auto: validate
- open-in-view: true
- flyway:
- enabled: true
- locations: "classpath:db/migration/{vendor}"
-
- security:
- oauth2:
- resourceserver:
- jwt:
- issuer-uri: ${SSO_ISSUER_URL}
- client:
- provider:
- keycloak:
- issuer-uri: ${SSO_ISSUER_URL}
- user-info-uri: ${SSO_BASE_URL}/realms/${SSO_REALM}/protocol/openid-connect/userinfo
- # jwk-set-uri: ${SSO_BASE_URL}/realms/${SSO_REALM}/protocol/openid-connect/certs
- user-name-attribute: user_name
- registration:
- keycloak:
- provider: keycloak
- client-id: ${SSO_ENGINE_CLIENT_ID}
- client-secret: ${SSO_ENGINE_CLIENT_SECRET}
- scope: email, profile, openid
-
-springdoc:
- packagesToScan: io.miranum.platform.engine
- pathsToMatch: /**
- swagger-ui:
- oauth:
- clientId: ${SSO_ENGINE_CLIENT_ID}
- clientSecret: ${SSO_ENGINE_CLIENT_SECRET}
- realm: ${SSO_REALM}
- appName: Engine
- csrf:
- enabled: false
- writer-with-default-pretty-printer: true
-
-#Polyflow
-polyflow:
- view:
- jpa:
- stored-items: TASK, DATA_ENTRY # currently only tasks and data entries, no process definition or process instances
- payload-attribute-level-limit: 1
- task-filters:
- include: unknown
-feign:
- client:
- config:
- engine-schema:
- url: ${ENGINE_SCHEMA_URL}
- task-schema:
- url: ${ENGINE_SCHEMA_URL}
-
-miranum:
- s3service:
- http-API: ${DOCUMENT_STORAGE_HOST}:${DOCUMENT_STORAGE_PORT}
- # override default security settings
- security:
- permittedUrls:
- - "/error"
- - "/actuator/**"
- - "/engine-rest/deployment"
- - "/rest/deployment"
-logging.level:
- io:
- holunda:
- polyflow: DEBUG
diff --git a/platform/services/camunda7-engine-service/src/main/resources/bpmn/request-process.bpmn b/platform/services/camunda7-engine-service/src/main/resources/bpmn/request-process.bpmn
deleted file mode 100644
index 6dee640cd..000000000
--- a/platform/services/camunda7-engine-service/src/main/resources/bpmn/request-process.bpmn
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-
-
- Flow_1qvk2rf
-
-
-
-
-
-
-
-
-
-
- Flow_1tizeo3
-
-
-
-
-
- decideform
-
-
- Flow_1qvk2rf
- Flow_16nnpnz
-
-
- Flow_16nnpnz
- Flow_0qc8lam
- Flow_0pbpkjy
-
-
- ${requestOK}
-
-
-
-
-
- Flow_0pbpkjy
-
-
-
-
-
- deliverform
-
-
- Flow_0qc8lam
- Flow_1tizeo3
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/platform/services/camunda7-engine-service/src/main/resources/db/migration/postgresql/V01__polyflow.sql b/platform/services/camunda7-engine-service/src/main/resources/db/migration/postgresql/V01__polyflow.sql
deleted file mode 100644
index 5176e325f..000000000
--- a/platform/services/camunda7-engine-service/src/main/resources/db/migration/postgresql/V01__polyflow.sql
+++ /dev/null
@@ -1,274 +0,0 @@
-create sequence hibernate_sequence start with 1 increment by 1;
-
-create table association_value_entry
-(
- id int8 not null,
- association_key varchar(255) not null,
- association_value varchar(255),
- saga_id varchar(255) not null,
- saga_type varchar(255),
- primary key (id)
-);
-
-create table saga_entry
-(
- saga_id varchar(255) not null,
- revision varchar(255),
- saga_type varchar(255),
- serialized_saga bytea,
- primary key (saga_id)
-);
-
-create table token_entry
-(
- processor_name varchar(255) not null,
- segment int4 not null,
- owner varchar(255),
- timestamp varchar(255) not null,
- token bytea,
- token_type varchar(255),
- primary key (processor_name, segment)
-);
-
-CREATE TABLE domain_event_entry
-(
- global_index BIGINT NOT NULL,
- event_identifier VARCHAR(255) NOT NULL,
- meta_data BYTEA,
- payload BYTEA NOT NULL,
- payload_revision VARCHAR(255),
- payload_type VARCHAR(255) NOT NULL,
- time_stamp VARCHAR(255) NOT NULL,
- aggregate_identifier VARCHAR(255) NOT NULL,
- sequence_number BIGINT NOT NULL,
- type VARCHAR(255),
- PRIMARY KEY (global_index)
-);
-
-CREATE TABLE snapshot_event_entry
-(
- aggregate_identifier VARCHAR(255) NOT NULL,
- sequence_number BIGINT NOT NULL,
- type VARCHAR(255) NOT NULL,
- event_identifier VARCHAR(255) NOT NULL,
- meta_data BYTEA,
- payload BYTEA NOT NULL,
- payload_revision VARCHAR(255),
- payload_type VARCHAR(255) NOT NULL,
- time_stamp VARCHAR(255) NOT NULL,
- PRIMARY KEY (aggregate_identifier, sequence_number, type)
-);
-
-ALTER TABLE snapshot_event_entry
- ADD CONSTRAINT UK_e1uucjseo68gopmnd0vgdl44h UNIQUE (event_identifier);
-
-ALTER TABLE domain_event_entry
- ADD CONSTRAINT UK_fwe6lsa8bfo6hyas6ud3m8c7x UNIQUE (event_identifier);
-
-create index IDX_association_value_entry_stakav on association_value_entry (saga_type, association_key, association_value);
-create index IDX_association_value_entry_sist on association_value_entry (saga_id, saga_type);
-
-CREATE TABLE plf_data_entry
-(
- entry_id VARCHAR(255) NOT NULL,
- entry_type VARCHAR(255) NOT NULL,
- application_name VARCHAR(255) NOT NULL,
- date_created TIMESTAMP NOT NULL,
- description VARCHAR(2048),
- form_key VARCHAR(255),
- date_last_modified TIMESTAMP NOT NULL,
- name VARCHAR(255) NOT NULL,
- payload OID,
- revision INT8,
- processing_type VARCHAR(255) NOT NULL,
- state VARCHAR(255) NOT NULL,
- type VARCHAR(255) NOT NULL,
- PRIMARY KEY (entry_id, entry_type)
-);
-
-CREATE TABLE plf_data_entry_authorizations
-(
- entry_id VARCHAR(255) NOT NULL,
- entry_type VARCHAR(255) NOT NULL,
- authorized_principal VARCHAR(255) NOT NULL,
- PRIMARY KEY (entry_id, entry_type, authorized_principal)
-);
-
-CREATE TABLE plf_data_entry_payload_attributes
-(
- entry_id VARCHAR(255) NOT NULL,
- entry_type VARCHAR(255) NOT NULL,
- path VARCHAR(255) NOT NULL,
- value VARCHAR(255) NOT NULL,
- PRIMARY KEY (entry_id, entry_type, path, value)
-);
-
-CREATE TABLE plf_data_entry_protocol
-(
- id VARCHAR(255) NOT NULL,
- log_details VARCHAR(255),
- log_message VARCHAR(255),
- processing_type VARCHAR(255) NOT NULL,
- state VARCHAR(255) NOT NULL,
- time TIMESTAMP NOT NULL,
- username VARCHAR(255),
- entry_id VARCHAR(255) NOT NULL,
- entry_type VARCHAR(255) NOT NULL,
- PRIMARY KEY (id)
-);
-
-CREATE TABLE plf_proc_def
-(
- proc_def_id VARCHAR(255) NOT NULL,
- application_name VARCHAR(255) NOT NULL,
- description VARCHAR(2048),
- name VARCHAR(255) NOT NULL,
- proc_def_key VARCHAR(255) NOT NULL,
- proc_def_version INT4 NOT NULL,
- start_form_key VARCHAR(255),
- startable_from_tasklist BOOLEAN,
- version_tag VARCHAR(255),
- PRIMARY KEY (proc_def_id)
-);
-
-CREATE TABLE plf_proc_def_authorizations
-(
- proc_def_id VARCHAR(255) NOT NULL,
- authorized_starter_principal VARCHAR(255) NOT NULL,
- PRIMARY KEY (proc_def_id, authorized_starter_principal)
-);
-
-CREATE TABLE plf_proc_instance
-(
- instance_id VARCHAR(255) NOT NULL,
- business_key VARCHAR(255),
- delete_reason VARCHAR(255),
- end_activity_id VARCHAR(255),
- application_name VARCHAR(255) NOT NULL,
- source_def_id VARCHAR(255) NOT NULL,
- source_def_key VARCHAR(255) NOT NULL,
- source_execution_id VARCHAR(255) NOT NULL,
- source_instance_id VARCHAR(255) NOT NULL,
- source_name VARCHAR(255) NOT NULL,
- source_type VARCHAR(255) NOT NULL,
- source_tenant_id VARCHAR(255),
- start_activity_id VARCHAR(255),
- start_user_id VARCHAR(255),
- run_state VARCHAR(255) NOT NULL,
- super_instance_id VARCHAR(255),
- PRIMARY KEY (instance_id)
-);
-
-CREATE TABLE plf_task
-(
- task_id VARCHAR(255) NOT NULL,
- assignee_id VARCHAR(255),
- business_key VARCHAR(255),
- date_created TIMESTAMP NOT NULL,
- description VARCHAR(2048),
- date_due TIMESTAMP,
- date_follow_up TIMESTAMP,
- form_key VARCHAR(255),
- name VARCHAR(255) NOT NULL,
- owner_id VARCHAR(255),
- payload OID,
- priority INT4,
- application_name VARCHAR(255) NOT NULL,
- source_def_id VARCHAR(255) NOT NULL,
- source_def_key VARCHAR(255) NOT NULL,
- source_execution_id VARCHAR(255) NOT NULL,
- source_instance_id VARCHAR(255) NOT NULL,
- source_name VARCHAR(255) NOT NULL,
- source_type VARCHAR(255) NOT NULL,
- source_tenant_id VARCHAR(255),
- task_def_key VARCHAR(255) NOT NULL,
- PRIMARY KEY (task_id)
-);
-
-CREATE TABLE plf_task_authorizations
-(
- task_id VARCHAR(255) NOT NULL,
- authorized_principal VARCHAR(255) NOT NULL,
- PRIMARY KEY (task_id, authorized_principal)
-);
-
-CREATE TABLE plf_task_correlations
-(
- task_id VARCHAR(255) NOT NULL,
- entry_id VARCHAR(255) NOT NULL,
- entry_type VARCHAR(255) NOT NULL,
- PRIMARY KEY (task_id, entry_id, entry_type)
-);
-
-CREATE TABLE plf_task_payload_attributes
-(
- task_id VARCHAR(255) NOT NULL,
- path VARCHAR(255) NOT NULL,
- value VARCHAR(255) NOT NULL,
- PRIMARY KEY (task_id, path, value)
-);
-
-ALTER TABLE plf_data_entry_authorizations
- ADD CONSTRAINT FK_authorizations_have_data_entry
- FOREIGN KEY (entry_id, entry_type)
- REFERENCES plf_data_entry;
-
-ALTER TABLE plf_data_entry_payload_attributes
- ADD CONSTRAINT FK_payload_attributes_have_data_entry
- FOREIGN KEY (entry_id, entry_type)
- REFERENCES plf_data_entry;
-
-ALTER TABLE plf_data_entry_protocol
- ADD CONSTRAINT FK_protocol_have_data_entry
- FOREIGN KEY (entry_id, entry_type)
- REFERENCES plf_data_entry;
-
-ALTER TABLE plf_proc_def_authorizations
- ADD CONSTRAINT FK_authorizations_have_proc_def
- FOREIGN KEY (proc_def_id)
- REFERENCES plf_proc_def;
-
-ALTER TABLE plf_task_authorizations
- ADD CONSTRAINT FK_authorizations_have_task
- FOREIGN KEY (task_id)
- REFERENCES plf_task;
-
-ALTER TABLE plf_task_correlations
- ADD CONSTRAINT FK_correlation_have_task
- FOREIGN KEY (task_id)
- REFERENCES plf_task;
-
-ALTER TABLE plf_task_payload_attributes
- ADD CONSTRAINT FK_payload_attributes_have_task
- FOREIGN KEY (task_id)
- REFERENCES plf_task;
-
-CREATE TABLE dead_letter_entry
-(
- dead_letter_id VARCHAR(255) NOT NULL,
- cause_message VARCHAR(255),
- cause_type VARCHAR(255),
- diagnostics BYTEA,
- enqueued_at TIMESTAMP NOT NULL,
- last_touched TIMESTAMP,
- aggregate_identifier VARCHAR(255),
- event_identifier VARCHAR(255) NOT NULL,
- message_type VARCHAR(255) NOT NULL,
- meta_data BYTEA,
- payload BYTEA NOT NULL,
- payload_revision VARCHAR(255),
- payload_type VARCHAR(255) NOT NULL,
- sequence_number INT8,
- time_stamp VARCHAR(255) NOT NULL,
- token BYTEA,
- token_type VARCHAR(255),
- type VARCHAR(255),
- processing_group VARCHAR(255) NOT NULL,
- processing_started TIMESTAMP,
- sequence_identifier VARCHAR(255) NOT NULL,
- sequence_index INT8 NOT NULL,
- PRIMARY KEY (dead_letter_id)
-);
-
-ALTER TABLE plf_data_entry
- ADD date_deleted timestamp;
diff --git a/platform/services/camunda7-engine-service/src/main/resources/db/migration/postgresql/V02__engine.sql b/platform/services/camunda7-engine-service/src/main/resources/db/migration/postgresql/V02__engine.sql
deleted file mode 100644
index 9e08c4060..000000000
--- a/platform/services/camunda7-engine-service/src/main/resources/db/migration/postgresql/V02__engine.sql
+++ /dev/null
@@ -1,1574 +0,0 @@
---
--- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
--- under one or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information regarding copyright
--- ownership. Camunda licenses this file to you under the Apache License,
--- Version 2.0; 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.
---
-
-create table ACT_GE_PROPERTY
-(
- NAME_ varchar(64),
- VALUE_ varchar(300),
- REV_ integer,
- primary key (NAME_)
-);
-
-insert into ACT_GE_PROPERTY
-values ('schema.version', 'fox', 1);
-
-insert into ACT_GE_PROPERTY
-values ('schema.history', 'create(fox)', 1);
-
-insert into ACT_GE_PROPERTY
-values ('next.dbid', '1', 1);
-
-insert into ACT_GE_PROPERTY
-values ('deployment.lock', '0', 1);
-
-insert into ACT_GE_PROPERTY
-values ('history.cleanup.job.lock', '0', 1);
-
-insert into ACT_GE_PROPERTY
-values ('startup.lock', '0', 1);
-
-insert into ACT_GE_PROPERTY
-values ('telemetry.lock', '0', 1);
-
-insert into ACT_GE_PROPERTY
-values ('installationId.lock', '0', 1);
-
-create table ACT_GE_BYTEARRAY
-(
- ID_ varchar(64),
- REV_ integer,
- NAME_ varchar(255),
- DEPLOYMENT_ID_ varchar(64),
- BYTES_ bytea,
- GENERATED_ boolean,
- TENANT_ID_ varchar(64),
- TYPE_ integer,
- CREATE_TIME_ timestamp,
- ROOT_PROC_INST_ID_ varchar(64),
- REMOVAL_TIME_ timestamp,
- primary key (ID_)
-);
-
-create table ACT_GE_SCHEMA_LOG
-(
- ID_ varchar(64),
- TIMESTAMP_ timestamp,
- VERSION_ varchar(255),
- primary key (ID_)
-);
-
-insert into ACT_GE_SCHEMA_LOG
-values ('0', CURRENT_TIMESTAMP, '7.20.0');
-
-create table ACT_RE_DEPLOYMENT
-(
- ID_ varchar(64),
- NAME_ varchar(255),
- DEPLOY_TIME_ timestamp,
- SOURCE_ varchar(255),
- TENANT_ID_ varchar(64),
- primary key (ID_)
-);
-
-create table ACT_RU_EXECUTION
-(
- ID_ varchar(64),
- REV_ integer,
- ROOT_PROC_INST_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- BUSINESS_KEY_ varchar(255),
- PARENT_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- SUPER_EXEC_ varchar(64),
- SUPER_CASE_EXEC_ varchar(64),
- CASE_INST_ID_ varchar(64),
- ACT_ID_ varchar(255),
- ACT_INST_ID_ varchar(64),
- IS_ACTIVE_ boolean,
- IS_CONCURRENT_ boolean,
- IS_SCOPE_ boolean,
- IS_EVENT_SCOPE_ boolean,
- SUSPENSION_STATE_ integer,
- CACHED_ENT_STATE_ integer,
- SEQUENCE_COUNTER_ bigint,
- TENANT_ID_ varchar(64),
- primary key (ID_)
-);
-
-create table ACT_RU_JOB
-(
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp,
- LOCK_OWNER_ varchar(255),
- EXCLUSIVE_ boolean,
- EXECUTION_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROCESS_DEF_ID_ varchar(64),
- PROCESS_DEF_KEY_ varchar(255),
- RETRIES_ integer,
- EXCEPTION_STACK_ID_ varchar(64),
- EXCEPTION_MSG_ varchar(4000),
- FAILED_ACT_ID_ varchar(255),
- DUEDATE_ timestamp,
- REPEAT_ varchar(255),
- REPEAT_OFFSET_ bigint DEFAULT 0,
- HANDLER_TYPE_ varchar(255),
- HANDLER_CFG_ varchar(4000),
- DEPLOYMENT_ID_ varchar(64),
- SUSPENSION_STATE_ integer NOT NULL DEFAULT 1,
- JOB_DEF_ID_ varchar(64),
- PRIORITY_ bigint NOT NULL DEFAULT 0,
- SEQUENCE_COUNTER_ bigint,
- TENANT_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- LAST_FAILURE_LOG_ID_ varchar(64),
- primary key (ID_)
-);
-
-create table ACT_RU_JOBDEF
-(
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- PROC_DEF_ID_ varchar(64),
- PROC_DEF_KEY_ varchar(255),
- ACT_ID_ varchar(255),
- JOB_TYPE_ varchar(255) NOT NULL,
- JOB_CONFIGURATION_ varchar(255),
- SUSPENSION_STATE_ integer,
- JOB_PRIORITY_ bigint,
- TENANT_ID_ varchar(64),
- DEPLOYMENT_ID_ varchar(64),
- primary key (ID_)
-);
-
-create table ACT_RE_PROCDEF
-(
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- NAME_ varchar(255),
- KEY_ varchar(255) NOT NULL,
- VERSION_ integer NOT NULL,
- DEPLOYMENT_ID_ varchar(64),
- RESOURCE_NAME_ varchar(4000),
- DGRM_RESOURCE_NAME_ varchar(4000),
- HAS_START_FORM_KEY_ boolean,
- SUSPENSION_STATE_ integer,
- TENANT_ID_ varchar(64),
- VERSION_TAG_ varchar(64),
- HISTORY_TTL_ integer,
- STARTABLE_ boolean NOT NULL default TRUE,
- primary key (ID_)
-);
-
-create table ACT_RE_CAMFORMDEF
-(
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- KEY_ varchar(255) NOT NULL,
- VERSION_ integer NOT NULL,
- DEPLOYMENT_ID_ varchar(64),
- RESOURCE_NAME_ varchar(4000),
- TENANT_ID_ varchar(64),
- primary key (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),
- CASE_EXECUTION_ID_ varchar(64),
- CASE_INST_ID_ varchar(64),
- CASE_DEF_ID_ varchar(64),
- 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,
- LAST_UPDATED_ timestamp,
- DUE_DATE_ timestamp,
- FOLLOW_UP_DATE_ timestamp,
- SUSPENSION_STATE_ integer,
- TENANT_ID_ varchar(64),
- primary key (ID_)
-);
-
-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_DEF_ID_ varchar(64),
- TENANT_ID_ varchar(64),
- primary key (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),
- PROC_DEF_ID_ varchar(64),
- CASE_EXECUTION_ID_ varchar(64),
- CASE_INST_ID_ varchar(64),
- TASK_ID_ varchar(64),
- BATCH_ID_ varchar(64),
- BYTEARRAY_ID_ varchar(64),
- DOUBLE_ double precision,
- LONG_ bigint,
- TEXT_ varchar(4000),
- TEXT2_ varchar(4000),
- VAR_SCOPE_ varchar(64),
- SEQUENCE_COUNTER_ bigint,
- IS_CONCURRENT_LOCAL_ boolean,
- TENANT_ID_ varchar(64),
- primary key (ID_)
-);
-
-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(255),
- CONFIGURATION_ varchar(255),
- CREATED_ timestamp not null,
- TENANT_ID_ varchar(64),
- primary key (ID_)
-);
-
-create table ACT_RU_INCIDENT
-(
- ID_ varchar(64) not null,
- REV_ integer not null,
- INCIDENT_TIMESTAMP_ timestamp not null,
- INCIDENT_MSG_ varchar(4000),
- INCIDENT_TYPE_ varchar(255) not null,
- EXECUTION_ID_ varchar(64),
- ACTIVITY_ID_ varchar(255),
- FAILED_ACTIVITY_ID_ varchar(255),
- PROC_INST_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- CAUSE_INCIDENT_ID_ varchar(64),
- ROOT_CAUSE_INCIDENT_ID_ varchar(64),
- CONFIGURATION_ varchar(255),
- TENANT_ID_ varchar(64),
- JOB_DEF_ID_ varchar(64),
- ANNOTATION_ varchar(4000),
- primary key (ID_)
-);
-
-create table ACT_RU_AUTHORIZATION
-(
- ID_ varchar(64) not null,
- REV_ integer not null,
- TYPE_ integer not null,
- GROUP_ID_ varchar(255),
- USER_ID_ varchar(255),
- RESOURCE_TYPE_ integer not null,
- RESOURCE_ID_ varchar(255),
- PERMS_ integer,
- REMOVAL_TIME_ timestamp,
- ROOT_PROC_INST_ID_ varchar(64),
- primary key (ID_)
-);
-
-create table ACT_RU_FILTER
-(
- ID_ varchar(64) not null,
- REV_ integer not null,
- RESOURCE_TYPE_ varchar(255) not null,
- NAME_ varchar(255) not null,
- OWNER_ varchar(255),
- QUERY_ TEXT not null,
- PROPERTIES_ TEXT,
- primary key (ID_)
-);
-
-create table ACT_RU_METER_LOG
-(
- ID_ varchar(64) not null,
- NAME_ varchar(64) not null,
- REPORTER_ varchar(255),
- VALUE_ bigint,
- TIMESTAMP_ timestamp,
- MILLISECONDS_ bigint DEFAULT 0,
- primary key (ID_)
-);
-
-create table ACT_RU_TASK_METER_LOG
-(
- ID_ varchar(64) not null,
- ASSIGNEE_HASH_ bigint,
- TIMESTAMP_ timestamp,
- primary key (ID_)
-);
-
-create table ACT_RU_EXT_TASK
-(
- ID_ varchar(64) not null,
- REV_ integer not null,
- WORKER_ID_ varchar(255),
- TOPIC_NAME_ varchar(255),
- RETRIES_ integer,
- ERROR_MSG_ varchar(4000),
- ERROR_DETAILS_ID_ varchar(64),
- LOCK_EXP_TIME_ timestamp,
- SUSPENSION_STATE_ integer,
- EXECUTION_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- PROC_DEF_KEY_ varchar(255),
- ACT_ID_ varchar(255),
- ACT_INST_ID_ varchar(64),
- TENANT_ID_ varchar(64),
- PRIORITY_ bigint NOT NULL DEFAULT 0,
- LAST_FAILURE_LOG_ID_ varchar(64),
- primary key (ID_)
-);
-
-create table ACT_RU_BATCH
-(
- ID_ varchar(64) not null,
- REV_ integer not null,
- TYPE_ varchar(255),
- TOTAL_JOBS_ integer,
- JOBS_CREATED_ integer,
- JOBS_PER_SEED_ integer,
- INVOCATIONS_PER_JOB_ integer,
- SEED_JOB_DEF_ID_ varchar(64),
- BATCH_JOB_DEF_ID_ varchar(64),
- MONITOR_JOB_DEF_ID_ varchar(64),
- SUSPENSION_STATE_ integer,
- CONFIGURATION_ varchar(255),
- TENANT_ID_ varchar(64),
- CREATE_USER_ID_ varchar(255),
- START_TIME_ timestamp,
- EXEC_START_TIME_ timestamp,
- primary key (ID_)
-);
-
-create index ACT_IDX_EXE_ROOT_PI on ACT_RU_EXECUTION (ROOT_PROC_INST_ID_);
-create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION (BUSINESS_KEY_);
-create index ACT_IDX_EXEC_TENANT_ID on ACT_RU_EXECUTION (TENANT_ID_);
-create index ACT_IDX_TASK_CREATE on ACT_RU_TASK (CREATE_TIME_);
-create index ACT_IDX_TASK_LAST_UPDATED on ACT_RU_TASK (LAST_UPDATED_);
-create index ACT_IDX_TASK_ASSIGNEE on ACT_RU_TASK (ASSIGNEE_);
-create index ACT_IDX_TASK_OWNER on ACT_RU_TASK (OWNER_);
-create index ACT_IDX_TASK_TENANT_ID on ACT_RU_TASK (TENANT_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_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR (CONFIGURATION_);
-create index ACT_IDX_EVENT_SUBSCR_TENANT_ID on ACT_RU_EVENT_SUBSCR (TENANT_ID_);
-
-create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE (TASK_ID_);
-create index ACT_IDX_VARIABLE_TENANT_ID on ACT_RU_VARIABLE (TENANT_ID_);
-create index ACT_IDX_VARIABLE_TASK_NAME_TYPE on ACT_RU_VARIABLE (TASK_ID_, NAME_, TYPE_);
-
-create index ACT_IDX_INC_CONFIGURATION on ACT_RU_INCIDENT (CONFIGURATION_);
-create index ACT_IDX_INC_TENANT_ID on ACT_RU_INCIDENT (TENANT_ID_);
--- CAM-5914
-create index ACT_IDX_JOB_EXECUTION_ID on ACT_RU_JOB (EXECUTION_ID_);
-create index ACT_IDX_JOB_HANDLER on ACT_RU_JOB (HANDLER_TYPE_, HANDLER_CFG_);
-create index ACT_IDX_JOB_PROCINST on ACT_RU_JOB (PROCESS_INSTANCE_ID_);
-create index ACT_IDX_JOB_TENANT_ID on ACT_RU_JOB (TENANT_ID_);
-create index ACT_IDX_JOBDEF_TENANT_ID on ACT_RU_JOBDEF (TENANT_ID_);
-
--- new metric milliseconds column
-CREATE INDEX ACT_IDX_METER_LOG_MS ON ACT_RU_METER_LOG (MILLISECONDS_);
-CREATE INDEX ACT_IDX_METER_LOG_NAME_MS ON ACT_RU_METER_LOG (NAME_, MILLISECONDS_);
-CREATE INDEX ACT_IDX_METER_LOG_REPORT ON ACT_RU_METER_LOG (NAME_, REPORTER_, MILLISECONDS_);
-
--- old metric timestamp column
-CREATE INDEX ACT_IDX_METER_LOG_TIME ON ACT_RU_METER_LOG (TIMESTAMP_);
-CREATE INDEX ACT_IDX_METER_LOG ON ACT_RU_METER_LOG (NAME_, TIMESTAMP_);
-
--- task metric timestamp column
-CREATE INDEX ACT_IDX_TASK_METER_LOG_TIME ON ACT_RU_TASK_METER_LOG (TIMESTAMP_);
-
-create index ACT_IDX_EXT_TASK_TOPIC on ACT_RU_EXT_TASK (TOPIC_NAME_);
-create index ACT_IDX_EXT_TASK_TENANT_ID on ACT_RU_EXT_TASK (TENANT_ID_);
-create index ACT_IDX_EXT_TASK_PRIORITY ON ACT_RU_EXT_TASK (PRIORITY_);
-create index ACT_IDX_EXT_TASK_ERR_DETAILS ON ACT_RU_EXT_TASK (ERROR_DETAILS_ID_);
-create index ACT_IDX_AUTH_GROUP_ID on ACT_RU_AUTHORIZATION (GROUP_ID_);
-create index ACT_IDX_JOB_JOB_DEF_ID on ACT_RU_JOB (JOB_DEF_ID_);
-
-create index ACT_IDX_BYTEAR_DEPL on ACT_GE_BYTEARRAY (DEPLOYMENT_ID_);
-alter table ACT_GE_BYTEARRAY
- add constraint ACT_FK_BYTEARR_DEPL
- foreign key (DEPLOYMENT_ID_)
- references ACT_RE_DEPLOYMENT (ID_);
-
-create index ACT_IDX_EXE_PROCINST on ACT_RU_EXECUTION (PROC_INST_ID_);
-alter table ACT_RU_EXECUTION
- add constraint ACT_FK_EXE_PROCINST
- foreign key (PROC_INST_ID_)
- references ACT_RU_EXECUTION (ID_);
-
-create index ACT_IDX_EXE_PARENT on ACT_RU_EXECUTION (PARENT_ID_);
-alter table ACT_RU_EXECUTION
- add constraint ACT_FK_EXE_PARENT
- foreign key (PARENT_ID_)
- references ACT_RU_EXECUTION (ID_);
-
-create index ACT_IDX_EXE_SUPER on ACT_RU_EXECUTION (SUPER_EXEC_);
-alter table ACT_RU_EXECUTION
- add constraint ACT_FK_EXE_SUPER
- foreign key (SUPER_EXEC_)
- references ACT_RU_EXECUTION (ID_);
-
-create index ACT_IDX_EXE_PROCDEF on ACT_RU_EXECUTION (PROC_DEF_ID_);
-alter table ACT_RU_EXECUTION
- add constraint ACT_FK_EXE_PROCDEF
- foreign key (PROC_DEF_ID_)
- references ACT_RE_PROCDEF (ID_);
-
-
-create index ACT_IDX_TSKASS_TASK on ACT_RU_IDENTITYLINK (TASK_ID_);
-alter table ACT_RU_IDENTITYLINK
- add constraint ACT_FK_TSKASS_TASK
- foreign key (TASK_ID_)
- references ACT_RU_TASK (ID_);
-
-create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK (PROC_DEF_ID_);
-alter table ACT_RU_IDENTITYLINK
- add constraint ACT_FK_ATHRZ_PROCEDEF
- foreign key (PROC_DEF_ID_)
- references ACT_RE_PROCDEF (ID_);
-
-create index ACT_IDX_TASK_EXEC on ACT_RU_TASK (EXECUTION_ID_);
-alter table ACT_RU_TASK
- add constraint ACT_FK_TASK_EXE
- foreign key (EXECUTION_ID_)
- references ACT_RU_EXECUTION (ID_);
-
-create index ACT_IDX_TASK_PROCINST on ACT_RU_TASK (PROC_INST_ID_);
-alter table ACT_RU_TASK
- add constraint ACT_FK_TASK_PROCINST
- foreign key (PROC_INST_ID_)
- references ACT_RU_EXECUTION (ID_);
-
-create index ACT_IDX_TASK_PROCDEF on ACT_RU_TASK (PROC_DEF_ID_);
-alter table ACT_RU_TASK
- add constraint ACT_FK_TASK_PROCDEF
- foreign key (PROC_DEF_ID_)
- references ACT_RE_PROCDEF (ID_);
-
-create index ACT_IDX_VAR_EXE on ACT_RU_VARIABLE (EXECUTION_ID_);
-alter table ACT_RU_VARIABLE
- add constraint ACT_FK_VAR_EXE
- foreign key (EXECUTION_ID_)
- references ACT_RU_EXECUTION (ID_);
-
-create index ACT_IDX_VAR_PROCINST on ACT_RU_VARIABLE (PROC_INST_ID_);
-alter table ACT_RU_VARIABLE
- add constraint ACT_FK_VAR_PROCINST
- foreign key (PROC_INST_ID_)
- references ACT_RU_EXECUTION (ID_);
-
-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 index ACT_IDX_JOB_EXCEPTION on ACT_RU_JOB (EXCEPTION_STACK_ID_);
-alter table ACT_RU_JOB
- add constraint ACT_FK_JOB_EXCEPTION
- foreign key (EXCEPTION_STACK_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_EVENT_SUBSCR on ACT_RU_EVENT_SUBSCR (EXECUTION_ID_);
-alter table ACT_RU_EVENT_SUBSCR
- add constraint ACT_FK_EVENT_EXEC
- foreign key (EXECUTION_ID_)
- references ACT_RU_EXECUTION (ID_);
-
-alter table ACT_RU_INCIDENT
- add constraint ACT_FK_INC_EXE
- foreign key (EXECUTION_ID_)
- references ACT_RU_EXECUTION (ID_);
-
-alter table ACT_RU_INCIDENT
- add constraint ACT_FK_INC_PROCINST
- foreign key (PROC_INST_ID_)
- references ACT_RU_EXECUTION (ID_);
-
-alter table ACT_RU_INCIDENT
- add constraint ACT_FK_INC_PROCDEF
- foreign key (PROC_DEF_ID_)
- references ACT_RE_PROCDEF (ID_);
-
-alter table ACT_RU_INCIDENT
- add constraint ACT_FK_INC_CAUSE
- foreign key (CAUSE_INCIDENT_ID_)
- references ACT_RU_INCIDENT (ID_);
-
-alter table ACT_RU_INCIDENT
- add constraint ACT_FK_INC_RCAUSE
- foreign key (ROOT_CAUSE_INCIDENT_ID_)
- references ACT_RU_INCIDENT (ID_);
-
-create index ACT_IDX_INC_JOB_DEF on ACT_RU_INCIDENT (JOB_DEF_ID_);
-alter table ACT_RU_INCIDENT
- add constraint ACT_FK_INC_JOB_DEF
- foreign key (JOB_DEF_ID_)
- references ACT_RU_JOBDEF (ID_);
-
-alter table ACT_RU_AUTHORIZATION
- add constraint ACT_UNIQ_AUTH_USER
- unique (TYPE_, USER_ID_, RESOURCE_TYPE_, RESOURCE_ID_);
-
-alter table ACT_RU_AUTHORIZATION
- add constraint ACT_UNIQ_AUTH_GROUP
- unique (TYPE_, GROUP_ID_, RESOURCE_TYPE_, RESOURCE_ID_);
-
-alter table ACT_RU_VARIABLE
- add constraint ACT_UNIQ_VARIABLE
- unique (VAR_SCOPE_, NAME_);
-
-alter table ACT_RU_EXT_TASK
- add constraint ACT_FK_EXT_TASK_EXE
- foreign key (EXECUTION_ID_)
- references ACT_RU_EXECUTION (ID_);
-
-create index ACT_IDX_BATCH_SEED_JOB_DEF ON ACT_RU_BATCH (SEED_JOB_DEF_ID_);
-alter table ACT_RU_BATCH
- add constraint ACT_FK_BATCH_SEED_JOB_DEF
- foreign key (SEED_JOB_DEF_ID_)
- references ACT_RU_JOBDEF (ID_);
-
-create index ACT_IDX_BATCH_MONITOR_JOB_DEF ON ACT_RU_BATCH (MONITOR_JOB_DEF_ID_);
-alter table ACT_RU_BATCH
- add constraint ACT_FK_BATCH_MONITOR_JOB_DEF
- foreign key (MONITOR_JOB_DEF_ID_)
- references ACT_RU_JOBDEF (ID_);
-
-create index ACT_IDX_BATCH_JOB_DEF ON ACT_RU_BATCH (BATCH_JOB_DEF_ID_);
-alter table ACT_RU_BATCH
- add constraint ACT_FK_BATCH_JOB_DEF
- foreign key (BATCH_JOB_DEF_ID_)
- references ACT_RU_JOBDEF (ID_);
-
-alter table ACT_RU_EXT_TASK
- add constraint ACT_FK_EXT_TASK_ERROR_DETAILS
- foreign key (ERROR_DETAILS_ID_)
- references ACT_GE_BYTEARRAY (ID_);
-
-create index ACT_IDX_BATCH_ID ON ACT_RU_VARIABLE (BATCH_ID_);
-alter table ACT_RU_VARIABLE
- add constraint ACT_FK_VAR_BATCH
- foreign key (BATCH_ID_)
- references ACT_RU_BATCH (ID_);
-
--- indexes for deadlock problems - https://app.camunda.com/jira/browse/CAM-2567 --
-create index ACT_IDX_INC_CAUSEINCID on ACT_RU_INCIDENT (CAUSE_INCIDENT_ID_);
-create index ACT_IDX_INC_EXID on ACT_RU_INCIDENT (EXECUTION_ID_);
-create index ACT_IDX_INC_PROCDEFID on ACT_RU_INCIDENT (PROC_DEF_ID_);
-create index ACT_IDX_INC_PROCINSTID on ACT_RU_INCIDENT (PROC_INST_ID_);
-create index ACT_IDX_INC_ROOTCAUSEINCID on ACT_RU_INCIDENT (ROOT_CAUSE_INCIDENT_ID_);
--- index for deadlock problem - https://app.camunda.com/jira/browse/CAM-4440 --
-create index ACT_IDX_AUTH_RESOURCE_ID on ACT_RU_AUTHORIZATION (RESOURCE_ID_);
--- index to prevent deadlock on fk constraint - https://app.camunda.com/jira/browse/CAM-5440 --
-create index ACT_IDX_EXT_TASK_EXEC on ACT_RU_EXT_TASK (EXECUTION_ID_);
-
--- indexes to improve deployment
-create index ACT_IDX_BYTEARRAY_ROOT_PI on ACT_GE_BYTEARRAY (ROOT_PROC_INST_ID_);
-create index ACT_IDX_BYTEARRAY_RM_TIME on ACT_GE_BYTEARRAY (REMOVAL_TIME_);
-create index ACT_IDX_BYTEARRAY_NAME on ACT_GE_BYTEARRAY (NAME_);
-create index ACT_IDX_DEPLOYMENT_NAME on ACT_RE_DEPLOYMENT (NAME_);
-create index ACT_IDX_DEPLOYMENT_TENANT_ID on ACT_RE_DEPLOYMENT (TENANT_ID_);
-create index ACT_IDX_JOBDEF_PROC_DEF_ID ON ACT_RU_JOBDEF (PROC_DEF_ID_);
-create index ACT_IDX_JOB_HANDLER_TYPE ON ACT_RU_JOB (HANDLER_TYPE_);
-create index ACT_IDX_EVENT_SUBSCR_EVT_NAME ON ACT_RU_EVENT_SUBSCR (EVENT_NAME_);
-create index ACT_IDX_PROCDEF_DEPLOYMENT_ID ON ACT_RE_PROCDEF (DEPLOYMENT_ID_);
-create index ACT_IDX_PROCDEF_TENANT_ID ON ACT_RE_PROCDEF (TENANT_ID_);
-create index ACT_IDX_PROCDEF_VER_TAG ON ACT_RE_PROCDEF (VERSION_TAG_);
-
--- indices for history cleanup: https://jira.camunda.com/browse/CAM-11616
-create index ACT_IDX_AUTH_ROOT_PI on ACT_RU_AUTHORIZATION (ROOT_PROC_INST_ID_);
-create index ACT_IDX_AUTH_RM_TIME on ACT_RU_AUTHORIZATION (REMOVAL_TIME_);
-
---
--- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
--- under one or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information regarding copyright
--- ownership. Camunda licenses this file to you under the Apache License,
--- Version 2.0; 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.
---
-
-create table ACT_HI_PROCINST
-(
- ID_ varchar(64) not null,
- PROC_INST_ID_ varchar(64) not null,
- BUSINESS_KEY_ varchar(255),
- PROC_DEF_KEY_ varchar(255),
- PROC_DEF_ID_ varchar(64) not null,
- START_TIME_ timestamp not null,
- END_TIME_ timestamp,
- REMOVAL_TIME_ timestamp,
- DURATION_ bigint,
- START_USER_ID_ varchar(255),
- START_ACT_ID_ varchar(255),
- END_ACT_ID_ varchar(255),
- SUPER_PROCESS_INSTANCE_ID_ varchar(64),
- ROOT_PROC_INST_ID_ varchar(64),
- SUPER_CASE_INSTANCE_ID_ varchar(64),
- CASE_INST_ID_ varchar(64),
- DELETE_REASON_ varchar(4000),
- TENANT_ID_ varchar(64),
- STATE_ varchar(255),
- primary key (ID_),
- unique (PROC_INST_ID_)
-);
-
-create table ACT_HI_ACTINST
-(
- ID_ varchar(64) not null,
- PARENT_ACT_INST_ID_ varchar(64),
- PROC_DEF_KEY_ varchar(255),
- PROC_DEF_ID_ varchar(64) not null,
- ROOT_PROC_INST_ID_ varchar(64),
- PROC_INST_ID_ varchar(64) not null,
- EXECUTION_ID_ varchar(64) not null,
- ACT_ID_ varchar(255) not null,
- TASK_ID_ varchar(64),
- CALL_PROC_INST_ID_ varchar(64),
- CALL_CASE_INST_ID_ varchar(64),
- ACT_NAME_ varchar(255),
- ACT_TYPE_ varchar(255) not null,
- ASSIGNEE_ varchar(255),
- START_TIME_ timestamp not null,
- END_TIME_ timestamp,
- DURATION_ bigint,
- ACT_INST_STATE_ integer,
- SEQUENCE_COUNTER_ bigint,
- TENANT_ID_ varchar(64),
- REMOVAL_TIME_ timestamp,
- primary key (ID_)
-);
-
-create table ACT_HI_TASKINST
-(
- ID_ varchar(64) not null,
- TASK_DEF_KEY_ varchar(255),
- PROC_DEF_KEY_ varchar(255),
- PROC_DEF_ID_ varchar(64),
- ROOT_PROC_INST_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- EXECUTION_ID_ varchar(64),
- CASE_DEF_KEY_ varchar(255),
- CASE_DEF_ID_ varchar(64),
- CASE_INST_ID_ varchar(64),
- CASE_EXECUTION_ID_ varchar(64),
- ACT_INST_ID_ varchar(64),
- NAME_ varchar(255),
- PARENT_TASK_ID_ varchar(64),
- DESCRIPTION_ varchar(4000),
- OWNER_ varchar(255),
- ASSIGNEE_ varchar(255),
- START_TIME_ timestamp not null,
- END_TIME_ timestamp,
- DURATION_ bigint,
- DELETE_REASON_ varchar(4000),
- PRIORITY_ integer,
- DUE_DATE_ timestamp,
- FOLLOW_UP_DATE_ timestamp,
- TENANT_ID_ varchar(64),
- REMOVAL_TIME_ timestamp,
- primary key (ID_)
-);
-
-create table ACT_HI_VARINST
-(
- ID_ varchar(64) not null,
- PROC_DEF_KEY_ varchar(255),
- PROC_DEF_ID_ varchar(64),
- ROOT_PROC_INST_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- EXECUTION_ID_ varchar(64),
- ACT_INST_ID_ varchar(64),
- CASE_DEF_KEY_ varchar(255),
- CASE_DEF_ID_ varchar(64),
- CASE_INST_ID_ varchar(64),
- CASE_EXECUTION_ID_ varchar(64),
- TASK_ID_ varchar(64),
- NAME_ varchar(255) not null,
- VAR_TYPE_ varchar(100),
- CREATE_TIME_ timestamp,
- REV_ integer,
- BYTEARRAY_ID_ varchar(64),
- DOUBLE_ double precision,
- LONG_ bigint,
- TEXT_ varchar(4000),
- TEXT2_ varchar(4000),
- TENANT_ID_ varchar(64),
- STATE_ varchar(20),
- REMOVAL_TIME_ timestamp,
- primary key (ID_)
-);
-
-create table ACT_HI_DETAIL
-(
- ID_ varchar(64) not null,
- TYPE_ varchar(255) not null,
- PROC_DEF_KEY_ varchar(255),
- PROC_DEF_ID_ varchar(64),
- ROOT_PROC_INST_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- EXECUTION_ID_ varchar(64),
- CASE_DEF_KEY_ varchar(255),
- CASE_DEF_ID_ varchar(64),
- CASE_INST_ID_ varchar(64),
- CASE_EXECUTION_ID_ varchar(64),
- TASK_ID_ varchar(64),
- ACT_INST_ID_ varchar(64),
- VAR_INST_ID_ varchar(64),
- NAME_ varchar(255) not null,
- VAR_TYPE_ varchar(64),
- REV_ integer,
- TIME_ timestamp not null,
- BYTEARRAY_ID_ varchar(64),
- DOUBLE_ double precision,
- LONG_ bigint,
- TEXT_ varchar(4000),
- TEXT2_ varchar(4000),
- SEQUENCE_COUNTER_ bigint,
- TENANT_ID_ varchar(64),
- OPERATION_ID_ varchar(64),
- REMOVAL_TIME_ timestamp,
- INITIAL_ boolean,
- primary key (ID_)
-);
-
-create table ACT_HI_IDENTITYLINK
-(
- ID_ varchar(64) not null,
- TIMESTAMP_ timestamp not null,
- TYPE_ varchar(255),
- USER_ID_ varchar(255),
- GROUP_ID_ varchar(255),
- TASK_ID_ varchar(64),
- ROOT_PROC_INST_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- OPERATION_TYPE_ varchar(64),
- ASSIGNER_ID_ varchar(64),
- PROC_DEF_KEY_ varchar(255),
- TENANT_ID_ varchar(64),
- REMOVAL_TIME_ timestamp,
- primary key (ID_)
-);
-
-create table ACT_HI_COMMENT
-(
- ID_ varchar(64) not null,
- TYPE_ varchar(255),
- TIME_ timestamp not null,
- USER_ID_ varchar(255),
- TASK_ID_ varchar(64),
- ROOT_PROC_INST_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- ACTION_ varchar(255),
- MESSAGE_ varchar(4000),
- FULL_MSG_ bytea,
- TENANT_ID_ varchar(64),
- REMOVAL_TIME_ timestamp,
- primary key (ID_)
-);
-
-create table ACT_HI_ATTACHMENT
-(
- ID_ varchar(64) not null,
- REV_ integer,
- USER_ID_ varchar(255),
- NAME_ varchar(255),
- DESCRIPTION_ varchar(4000),
- TYPE_ varchar(255),
- TASK_ID_ varchar(64),
- ROOT_PROC_INST_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- URL_ varchar(4000),
- CONTENT_ID_ varchar(64),
- TENANT_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- REMOVAL_TIME_ timestamp,
- primary key (ID_)
-);
-
-create table ACT_HI_OP_LOG
-(
- ID_ varchar(64) not null,
- DEPLOYMENT_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- PROC_DEF_KEY_ varchar(255),
- ROOT_PROC_INST_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- EXECUTION_ID_ varchar(64),
- CASE_DEF_ID_ varchar(64),
- CASE_INST_ID_ varchar(64),
- CASE_EXECUTION_ID_ varchar(64),
- TASK_ID_ varchar(64),
- JOB_ID_ varchar(64),
- JOB_DEF_ID_ varchar(64),
- BATCH_ID_ varchar(64),
- USER_ID_ varchar(255),
- TIMESTAMP_ timestamp not null,
- OPERATION_TYPE_ varchar(64),
- OPERATION_ID_ varchar(64),
- ENTITY_TYPE_ varchar(30),
- PROPERTY_ varchar(64),
- ORG_VALUE_ varchar(4000),
- NEW_VALUE_ varchar(4000),
- TENANT_ID_ varchar(64),
- REMOVAL_TIME_ timestamp,
- CATEGORY_ varchar(64),
- EXTERNAL_TASK_ID_ varchar(64),
- ANNOTATION_ varchar(4000),
- primary key (ID_)
-);
-
-create table ACT_HI_INCIDENT
-(
- ID_ varchar(64) not null,
- PROC_DEF_KEY_ varchar(255),
- PROC_DEF_ID_ varchar(64),
- ROOT_PROC_INST_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- EXECUTION_ID_ varchar(64),
- CREATE_TIME_ timestamp not null,
- END_TIME_ timestamp,
- INCIDENT_MSG_ varchar(4000),
- INCIDENT_TYPE_ varchar(255) not null,
- ACTIVITY_ID_ varchar(255),
- FAILED_ACTIVITY_ID_ varchar(255),
- CAUSE_INCIDENT_ID_ varchar(64),
- ROOT_CAUSE_INCIDENT_ID_ varchar(64),
- CONFIGURATION_ varchar(255),
- HISTORY_CONFIGURATION_ varchar(255),
- INCIDENT_STATE_ integer,
- TENANT_ID_ varchar(64),
- JOB_DEF_ID_ varchar(64),
- ANNOTATION_ varchar(4000),
- REMOVAL_TIME_ timestamp,
- primary key (ID_)
-);
-
-create table ACT_HI_JOB_LOG
-(
- ID_ varchar(64) not null,
- TIMESTAMP_ timestamp not null,
- JOB_ID_ varchar(64) not null,
- JOB_DUEDATE_ timestamp,
- JOB_RETRIES_ integer,
- JOB_PRIORITY_ bigint NOT NULL DEFAULT 0,
- JOB_EXCEPTION_MSG_ varchar(4000),
- JOB_EXCEPTION_STACK_ID_ varchar(64),
- JOB_STATE_ integer,
- JOB_DEF_ID_ varchar(64),
- JOB_DEF_TYPE_ varchar(255),
- JOB_DEF_CONFIGURATION_ varchar(255),
- ACT_ID_ varchar(255),
- FAILED_ACT_ID_ varchar(255),
- EXECUTION_ID_ varchar(64),
- ROOT_PROC_INST_ID_ varchar(64),
- PROCESS_INSTANCE_ID_ varchar(64),
- PROCESS_DEF_ID_ varchar(64),
- PROCESS_DEF_KEY_ varchar(255),
- DEPLOYMENT_ID_ varchar(64),
- SEQUENCE_COUNTER_ bigint,
- TENANT_ID_ varchar(64),
- HOSTNAME_ varchar(255),
- REMOVAL_TIME_ timestamp,
- primary key (ID_)
-);
-
-create table ACT_HI_BATCH
-(
- ID_ varchar(64) not null,
- TYPE_ varchar(255),
- TOTAL_JOBS_ integer,
- JOBS_PER_SEED_ integer,
- INVOCATIONS_PER_JOB_ integer,
- SEED_JOB_DEF_ID_ varchar(64),
- MONITOR_JOB_DEF_ID_ varchar(64),
- BATCH_JOB_DEF_ID_ varchar(64),
- TENANT_ID_ varchar(64),
- CREATE_USER_ID_ varchar(255),
- START_TIME_ timestamp not null,
- END_TIME_ timestamp,
- REMOVAL_TIME_ timestamp,
- EXEC_START_TIME_ timestamp,
- primary key (ID_)
-);
-
-create table ACT_HI_EXT_TASK_LOG
-(
- ID_ varchar(64) not null,
- TIMESTAMP_ timestamp not null,
- EXT_TASK_ID_ varchar(64) not null,
- RETRIES_ integer,
- TOPIC_NAME_ varchar(255),
- WORKER_ID_ varchar(255),
- PRIORITY_ bigint not null default 0,
- ERROR_MSG_ varchar(4000),
- ERROR_DETAILS_ID_ varchar(64),
- ACT_ID_ varchar(255),
- ACT_INST_ID_ varchar(64),
- EXECUTION_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- ROOT_PROC_INST_ID_ varchar(64),
- PROC_DEF_ID_ varchar(64),
- PROC_DEF_KEY_ varchar(255),
- TENANT_ID_ varchar(64),
- STATE_ integer,
- REMOVAL_TIME_ timestamp,
- primary key (ID_)
-);
-
-create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST (END_TIME_);
-create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST (BUSINESS_KEY_);
-create index ACT_IDX_HI_PRO_INST_TENANT_ID on ACT_HI_PROCINST (TENANT_ID_);
-create index ACT_IDX_HI_PRO_INST_PROC_DEF_KEY on ACT_HI_PROCINST (PROC_DEF_KEY_);
-create index ACT_IDX_HI_PRO_INST_PROC_TIME on ACT_HI_PROCINST (START_TIME_, END_TIME_);
-create index ACT_IDX_HI_PI_PDEFID_END_TIME on ACT_HI_PROCINST (PROC_DEF_ID_, END_TIME_);
-create index ACT_IDX_HI_PRO_INST_ROOT_PI on ACT_HI_PROCINST (ROOT_PROC_INST_ID_);
-create index ACT_IDX_HI_PRO_INST_RM_TIME on ACT_HI_PROCINST (REMOVAL_TIME_);
-
-create index ACT_IDX_HI_ACTINST_ROOT_PI on ACT_HI_ACTINST (ROOT_PROC_INST_ID_);
-create index ACT_IDX_HI_ACT_INST_START_END on ACT_HI_ACTINST (START_TIME_, END_TIME_);
-create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST (END_TIME_);
-create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST (PROC_INST_ID_, ACT_ID_);
-create index ACT_IDX_HI_ACT_INST_COMP on ACT_HI_ACTINST (EXECUTION_ID_, ACT_ID_, END_TIME_, ID_);
-create index ACT_IDX_HI_ACT_INST_STATS on ACT_HI_ACTINST (PROC_DEF_ID_, PROC_INST_ID_, ACT_ID_, END_TIME_, ACT_INST_STATE_);
-create index ACT_IDX_HI_ACT_INST_TENANT_ID on ACT_HI_ACTINST (TENANT_ID_);
-create index ACT_IDX_HI_ACT_INST_PROC_DEF_KEY on ACT_HI_ACTINST (PROC_DEF_KEY_);
-create index ACT_IDX_HI_AI_PDEFID_END_TIME on ACT_HI_ACTINST (PROC_DEF_ID_, END_TIME_);
-create index ACT_IDX_HI_ACT_INST_RM_TIME on ACT_HI_ACTINST (REMOVAL_TIME_);
-
-create index ACT_IDX_HI_TASKINST_ROOT_PI on ACT_HI_TASKINST (ROOT_PROC_INST_ID_);
-create index ACT_IDX_HI_TASK_INST_TENANT_ID on ACT_HI_TASKINST (TENANT_ID_);
-create index ACT_IDX_HI_TASK_INST_PROC_DEF_KEY on ACT_HI_TASKINST (PROC_DEF_KEY_);
-create index ACT_IDX_HI_TASKINST_PROCINST on ACT_HI_TASKINST (PROC_INST_ID_);
-create index ACT_IDX_HI_TASKINSTID_PROCINST on ACT_HI_TASKINST (ID_, PROC_INST_ID_);
-create index ACT_IDX_HI_TASK_INST_RM_TIME on ACT_HI_TASKINST (REMOVAL_TIME_);
-create index ACT_IDX_HI_TASK_INST_START on ACT_HI_TASKINST (START_TIME_);
-create index ACT_IDX_HI_TASK_INST_END on ACT_HI_TASKINST (END_TIME_);
-
-create index ACT_IDX_HI_DETAIL_ROOT_PI on ACT_HI_DETAIL (ROOT_PROC_INST_ID_);
-create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL (PROC_INST_ID_);
-create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL (ACT_INST_ID_);
-create index ACT_IDX_HI_DETAIL_CASE_INST on ACT_HI_DETAIL (CASE_INST_ID_);
-create index ACT_IDX_HI_DETAIL_CASE_EXEC on ACT_HI_DETAIL (CASE_EXECUTION_ID_);
-create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL (TIME_);
-create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL (NAME_);
-create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL (TASK_ID_);
-create index ACT_IDX_HI_DETAIL_TENANT_ID on ACT_HI_DETAIL (TENANT_ID_);
-create index ACT_IDX_HI_DETAIL_PROC_DEF_KEY on ACT_HI_DETAIL (PROC_DEF_KEY_);
-create index ACT_IDX_HI_DETAIL_BYTEAR on ACT_HI_DETAIL (BYTEARRAY_ID_);
-create index ACT_IDX_HI_DETAIL_RM_TIME on ACT_HI_DETAIL (REMOVAL_TIME_);
-create index ACT_IDX_HI_DETAIL_TASK_BYTEAR on ACT_HI_DETAIL (BYTEARRAY_ID_, TASK_ID_);
-create index ACT_IDX_HI_DETAIL_VAR_INST_ID on ACT_HI_DETAIL (VAR_INST_ID_);
-
-create index ACT_IDX_HI_IDENT_LNK_ROOT_PI on ACT_HI_IDENTITYLINK (ROOT_PROC_INST_ID_);
-create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK (USER_ID_);
-create index ACT_IDX_HI_IDENT_LNK_GROUP on ACT_HI_IDENTITYLINK (GROUP_ID_);
-create index ACT_IDX_HI_IDENT_LNK_TENANT_ID on ACT_HI_IDENTITYLINK (TENANT_ID_);
-create index ACT_IDX_HI_IDENT_LNK_PROC_DEF_KEY on ACT_HI_IDENTITYLINK (PROC_DEF_KEY_);
-create index ACT_IDX_HI_IDENT_LINK_TASK on ACT_HI_IDENTITYLINK (TASK_ID_);
-create index ACT_IDX_HI_IDENT_LINK_RM_TIME on ACT_HI_IDENTITYLINK (REMOVAL_TIME_);
-create index ACT_IDX_HI_IDENT_LNK_TIMESTAMP on ACT_HI_IDENTITYLINK (TIMESTAMP_);
-
-create index ACT_IDX_HI_VARINST_ROOT_PI on ACT_HI_VARINST (ROOT_PROC_INST_ID_);
-create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST (PROC_INST_ID_);
-create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST (NAME_, VAR_TYPE_);
-create index ACT_IDX_HI_CASEVAR_CASE_INST on ACT_HI_VARINST (CASE_INST_ID_);
-create index ACT_IDX_HI_VAR_INST_TENANT_ID on ACT_HI_VARINST (TENANT_ID_);
-create index ACT_IDX_HI_VAR_INST_PROC_DEF_KEY on ACT_HI_VARINST (PROC_DEF_KEY_);
-create index ACT_IDX_HI_VARINST_BYTEAR on ACT_HI_VARINST (BYTEARRAY_ID_);
-create index ACT_IDX_HI_VARINST_RM_TIME on ACT_HI_VARINST (REMOVAL_TIME_);
-create index ACT_IDX_HI_VAR_PI_NAME_TYPE on ACT_HI_VARINST (PROC_INST_ID_, NAME_, VAR_TYPE_);
-create index ACT_IDX_HI_VARINST_NAME on ACT_HI_VARINST (NAME_);
-create index ACT_IDX_HI_VARINST_ACT_INST_ID on ACT_HI_VARINST (ACT_INST_ID_);
-
-create index ACT_IDX_HI_INCIDENT_TENANT_ID on ACT_HI_INCIDENT (TENANT_ID_);
-create index ACT_IDX_HI_INCIDENT_PROC_DEF_KEY on ACT_HI_INCIDENT (PROC_DEF_KEY_);
-create index ACT_IDX_HI_INCIDENT_ROOT_PI on ACT_HI_INCIDENT (ROOT_PROC_INST_ID_);
-create index ACT_IDX_HI_INCIDENT_PROCINST on ACT_HI_INCIDENT (PROC_INST_ID_);
-create index ACT_IDX_HI_INCIDENT_RM_TIME on ACT_HI_INCIDENT (REMOVAL_TIME_);
-create index ACT_IDX_HI_INCIDENT_CREATE_TIME on ACT_HI_INCIDENT (CREATE_TIME_);
-create index ACT_IDX_HI_INCIDENT_END_TIME on ACT_HI_INCIDENT (END_TIME_);
-
-create index ACT_IDX_HI_JOB_LOG_ROOT_PI on ACT_HI_JOB_LOG (ROOT_PROC_INST_ID_);
-create index ACT_IDX_HI_JOB_LOG_PROCINST on ACT_HI_JOB_LOG (PROCESS_INSTANCE_ID_);
-create index ACT_IDX_HI_JOB_LOG_PROCDEF on ACT_HI_JOB_LOG (PROCESS_DEF_ID_);
-create index ACT_IDX_HI_JOB_LOG_TENANT_ID on ACT_HI_JOB_LOG (TENANT_ID_);
-create index ACT_IDX_HI_JOB_LOG_JOB_DEF_ID on ACT_HI_JOB_LOG (JOB_DEF_ID_);
-create index ACT_IDX_HI_JOB_LOG_PROC_DEF_KEY on ACT_HI_JOB_LOG (PROCESS_DEF_KEY_);
-create index ACT_IDX_HI_JOB_LOG_EX_STACK on ACT_HI_JOB_LOG (JOB_EXCEPTION_STACK_ID_);
-create index ACT_IDX_HI_JOB_LOG_RM_TIME on ACT_HI_JOB_LOG (REMOVAL_TIME_);
-create index ACT_IDX_HI_JOB_LOG_JOB_CONF on ACT_HI_JOB_LOG (JOB_DEF_CONFIGURATION_);
-
-create index ACT_HI_BAT_RM_TIME on ACT_HI_BATCH (REMOVAL_TIME_);
-
-create index ACT_HI_EXT_TASK_LOG_ROOT_PI on ACT_HI_EXT_TASK_LOG (ROOT_PROC_INST_ID_);
-create index ACT_HI_EXT_TASK_LOG_PROCINST on ACT_HI_EXT_TASK_LOG (PROC_INST_ID_);
-create index ACT_HI_EXT_TASK_LOG_PROCDEF on ACT_HI_EXT_TASK_LOG (PROC_DEF_ID_);
-create index ACT_HI_EXT_TASK_LOG_PROC_DEF_KEY on ACT_HI_EXT_TASK_LOG (PROC_DEF_KEY_);
-create index ACT_HI_EXT_TASK_LOG_TENANT_ID on ACT_HI_EXT_TASK_LOG (TENANT_ID_);
-create index ACT_IDX_HI_EXTTASKLOG_ERRORDET on ACT_HI_EXT_TASK_LOG (ERROR_DETAILS_ID_);
-create index ACT_HI_EXT_TASK_LOG_RM_TIME on ACT_HI_EXT_TASK_LOG (REMOVAL_TIME_);
-
-create index ACT_IDX_HI_OP_LOG_ROOT_PI on ACT_HI_OP_LOG (ROOT_PROC_INST_ID_);
-create index ACT_IDX_HI_OP_LOG_PROCINST on ACT_HI_OP_LOG (PROC_INST_ID_);
-create index ACT_IDX_HI_OP_LOG_PROCDEF on ACT_HI_OP_LOG (PROC_DEF_ID_);
-create index ACT_IDX_HI_OP_LOG_TASK on ACT_HI_OP_LOG (TASK_ID_);
-create index ACT_IDX_HI_OP_LOG_RM_TIME on ACT_HI_OP_LOG (REMOVAL_TIME_);
-create index ACT_IDX_HI_OP_LOG_TIMESTAMP on ACT_HI_OP_LOG (TIMESTAMP_);
-create index ACT_IDX_HI_OP_LOG_USER_ID on ACT_HI_OP_LOG (USER_ID_);
-create index ACT_IDX_HI_OP_LOG_OP_TYPE on ACT_HI_OP_LOG (OPERATION_TYPE_);
-create index ACT_IDX_HI_OP_LOG_ENTITY_TYPE on ACT_HI_OP_LOG (ENTITY_TYPE_);
-
-create index ACT_IDX_HI_ATTACHMENT_CONTENT on ACT_HI_ATTACHMENT (CONTENT_ID_);
-create index ACT_IDX_HI_ATTACHMENT_ROOT_PI on ACT_HI_ATTACHMENT (ROOT_PROC_INST_ID_);
-create index ACT_IDX_HI_ATTACHMENT_PROCINST on ACT_HI_ATTACHMENT (PROC_INST_ID_);
-create index ACT_IDX_HI_ATTACHMENT_TASK on ACT_HI_ATTACHMENT (TASK_ID_);
-create index ACT_IDX_HI_ATTACHMENT_RM_TIME on ACT_HI_ATTACHMENT (REMOVAL_TIME_);
-
-create index ACT_IDX_HI_COMMENT_TASK on ACT_HI_COMMENT (TASK_ID_);
-create index ACT_IDX_HI_COMMENT_ROOT_PI on ACT_HI_COMMENT (ROOT_PROC_INST_ID_);
-create index ACT_IDX_HI_COMMENT_PROCINST on ACT_HI_COMMENT (PROC_INST_ID_);
-create index ACT_IDX_HI_COMMENT_RM_TIME on ACT_HI_COMMENT (REMOVAL_TIME_);
-
---
--- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
--- under one or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information regarding copyright
--- ownership. Camunda licenses this file to you under the Apache License,
--- Version 2.0; 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.
---
-
-create table ACT_ID_GROUP
-(
- ID_ varchar(64),
- REV_ integer,
- NAME_ varchar(255),
- TYPE_ varchar(255),
- primary key (ID_)
-);
-
-create table ACT_ID_MEMBERSHIP
-(
- USER_ID_ varchar(64),
- GROUP_ID_ varchar(64),
- primary key (USER_ID_, GROUP_ID_)
-);
-
-create table ACT_ID_USER
-(
- ID_ varchar(64),
- REV_ integer,
- FIRST_ varchar(255),
- LAST_ varchar(255),
- EMAIL_ varchar(255),
- PWD_ varchar(255),
- SALT_ varchar(255),
- LOCK_EXP_TIME_ timestamp,
- ATTEMPTS_ integer,
- PICTURE_ID_ varchar(64),
- primary key (ID_)
-);
-
-create table ACT_ID_INFO
-(
- ID_ varchar(64),
- REV_ integer,
- USER_ID_ varchar(64),
- TYPE_ varchar(64),
- KEY_ varchar(255),
- VALUE_ varchar(255),
- PASSWORD_ bytea,
- PARENT_ID_ varchar(255),
- primary key (ID_)
-);
-
-create table ACT_ID_TENANT
-(
- ID_ varchar(64),
- REV_ integer,
- NAME_ varchar(255),
- primary key (ID_)
-);
-
-create table ACT_ID_TENANT_MEMBER
-(
- ID_ varchar(64) not null,
- TENANT_ID_ varchar(64) not null,
- USER_ID_ varchar(64),
- GROUP_ID_ varchar(64),
- primary key (ID_)
-);
-
-create index ACT_IDX_MEMB_GROUP on ACT_ID_MEMBERSHIP (GROUP_ID_);
-alter table ACT_ID_MEMBERSHIP
- add constraint ACT_FK_MEMB_GROUP
- foreign key (GROUP_ID_)
- references ACT_ID_GROUP (ID_);
-
-create index ACT_IDX_MEMB_USER on ACT_ID_MEMBERSHIP (USER_ID_);
-alter table ACT_ID_MEMBERSHIP
- add constraint ACT_FK_MEMB_USER
- foreign key (USER_ID_)
- references ACT_ID_USER (ID_);
-
-alter table ACT_ID_TENANT_MEMBER
- add constraint ACT_UNIQ_TENANT_MEMB_USER
- unique (TENANT_ID_, USER_ID_);
-
-alter table ACT_ID_TENANT_MEMBER
- add constraint ACT_UNIQ_TENANT_MEMB_GROUP
- unique (TENANT_ID_, GROUP_ID_);
-
-create index ACT_IDX_TENANT_MEMB on ACT_ID_TENANT_MEMBER (TENANT_ID_);
-alter table ACT_ID_TENANT_MEMBER
- add constraint ACT_FK_TENANT_MEMB
- foreign key (TENANT_ID_)
- references ACT_ID_TENANT (ID_);
-
-create index ACT_IDX_TENANT_MEMB_USER on ACT_ID_TENANT_MEMBER (USER_ID_);
-alter table ACT_ID_TENANT_MEMBER
- add constraint ACT_FK_TENANT_MEMB_USER
- foreign key (USER_ID_)
- references ACT_ID_USER (ID_);
-
-create index ACT_IDX_TENANT_MEMB_GROUP on ACT_ID_TENANT_MEMBER (GROUP_ID_);
-alter table ACT_ID_TENANT_MEMBER
- add constraint ACT_FK_TENANT_MEMB_GROUP
- foreign key (GROUP_ID_)
- references ACT_ID_GROUP (ID_);
-
---
--- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
--- under one or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information regarding copyright
--- ownership. Camunda licenses this file to you under the Apache License,
--- Version 2.0; 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.
---
-
--- create case definition table --
-
-create table ACT_RE_CASE_DEF
-(
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- NAME_ varchar(255),
- KEY_ varchar(255) NOT NULL,
- VERSION_ integer NOT NULL,
- DEPLOYMENT_ID_ varchar(64),
- RESOURCE_NAME_ varchar(4000),
- DGRM_RESOURCE_NAME_ varchar(4000),
- TENANT_ID_ varchar(64),
- HISTORY_TTL_ integer,
- primary key (ID_)
-);
-
--- create case execution table --
-
-create table ACT_RU_CASE_EXECUTION
-(
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CASE_INST_ID_ varchar(64),
- SUPER_CASE_EXEC_ varchar(64),
- SUPER_EXEC_ varchar(64),
- BUSINESS_KEY_ varchar(255),
- PARENT_ID_ varchar(64),
- CASE_DEF_ID_ varchar(64),
- ACT_ID_ varchar(255),
- PREV_STATE_ integer,
- CURRENT_STATE_ integer,
- REQUIRED_ boolean,
- TENANT_ID_ varchar(64),
- primary key (ID_)
-);
-
--- create case sentry part table --
-
-create table ACT_RU_CASE_SENTRY_PART
-(
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CASE_INST_ID_ varchar(64),
- CASE_EXEC_ID_ varchar(64),
- SENTRY_ID_ varchar(255),
- TYPE_ varchar(255),
- SOURCE_CASE_EXEC_ID_ varchar(64),
- STANDARD_EVENT_ varchar(255),
- SOURCE_ varchar(255),
- VARIABLE_EVENT_ varchar(255),
- VARIABLE_NAME_ varchar(255),
- SATISFIED_ boolean,
- TENANT_ID_ varchar(64),
- primary key (ID_)
-);
-
--- create index on business key --
-create index ACT_IDX_CASE_EXEC_BUSKEY on ACT_RU_CASE_EXECUTION (BUSINESS_KEY_);
-
--- create foreign key constraints on ACT_RU_CASE_EXECUTION --
-create index ACT_IDX_CASE_EXE_CASE_INST on ACT_RU_CASE_EXECUTION (CASE_INST_ID_);
-alter table ACT_RU_CASE_EXECUTION
- add constraint ACT_FK_CASE_EXE_CASE_INST
- foreign key (CASE_INST_ID_)
- references ACT_RU_CASE_EXECUTION (ID_);
-
-create index ACT_IDX_CASE_EXE_PARENT on ACT_RU_CASE_EXECUTION (PARENT_ID_);
-alter table ACT_RU_CASE_EXECUTION
- add constraint ACT_FK_CASE_EXE_PARENT
- foreign key (PARENT_ID_)
- references ACT_RU_CASE_EXECUTION (ID_);
-
-create index ACT_IDX_CASE_EXE_CASE_DEF on ACT_RU_CASE_EXECUTION (CASE_DEF_ID_);
-alter table ACT_RU_CASE_EXECUTION
- add constraint ACT_FK_CASE_EXE_CASE_DEF
- foreign key (CASE_DEF_ID_)
- references ACT_RE_CASE_DEF (ID_);
-
--- create foreign key constraints on ACT_RU_VARIABLE --
-create index ACT_IDX_VAR_CASE_EXE on ACT_RU_VARIABLE (CASE_EXECUTION_ID_);
-alter table ACT_RU_VARIABLE
- add constraint ACT_FK_VAR_CASE_EXE
- foreign key (CASE_EXECUTION_ID_)
- references ACT_RU_CASE_EXECUTION (ID_);
-
-create index ACT_IDX_VAR_CASE_INST_ID on ACT_RU_VARIABLE (CASE_INST_ID_);
-alter table ACT_RU_VARIABLE
- add constraint ACT_FK_VAR_CASE_INST
- foreign key (CASE_INST_ID_)
- references ACT_RU_CASE_EXECUTION (ID_);
-
--- create foreign key constraints on ACT_RU_TASK --
-create index ACT_IDX_TASK_CASE_EXEC on ACT_RU_TASK (CASE_EXECUTION_ID_);
-alter table ACT_RU_TASK
- add constraint ACT_FK_TASK_CASE_EXE
- foreign key (CASE_EXECUTION_ID_)
- references ACT_RU_CASE_EXECUTION (ID_);
-
-create index ACT_IDX_TASK_CASE_DEF_ID on ACT_RU_TASK (CASE_DEF_ID_);
-alter table ACT_RU_TASK
- add constraint ACT_FK_TASK_CASE_DEF
- foreign key (CASE_DEF_ID_)
- references ACT_RE_CASE_DEF (ID_);
-
--- create foreign key constraints on ACT_RU_CASE_SENTRY_PART --
-create index ACT_IDX_CASE_SENTRY_CASE_INST on ACT_RU_CASE_SENTRY_PART (CASE_INST_ID_);
-alter table ACT_RU_CASE_SENTRY_PART
- add constraint ACT_FK_CASE_SENTRY_CASE_INST
- foreign key (CASE_INST_ID_)
- references ACT_RU_CASE_EXECUTION (ID_);
-
-create index ACT_IDX_CASE_SENTRY_CASE_EXEC on ACT_RU_CASE_SENTRY_PART (CASE_EXEC_ID_);
-alter table ACT_RU_CASE_SENTRY_PART
- add constraint ACT_FK_CASE_SENTRY_CASE_EXEC
- foreign key (CASE_EXEC_ID_)
- references ACT_RU_CASE_EXECUTION (ID_);
-
-create index ACT_IDX_CASE_DEF_TENANT_ID on ACT_RE_CASE_DEF (TENANT_ID_);
-create index ACT_IDX_CASE_EXEC_TENANT_ID on ACT_RU_CASE_EXECUTION (TENANT_ID_);
-
---
--- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
--- under one or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information regarding copyright
--- ownership. Camunda licenses this file to you under the Apache License,
--- Version 2.0; 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.
---
-
-create table ACT_HI_CASEINST
-(
- ID_ varchar(64) not null,
- CASE_INST_ID_ varchar(64) not null,
- BUSINESS_KEY_ varchar(255),
- CASE_DEF_ID_ varchar(64) not null,
- CREATE_TIME_ timestamp not null,
- CLOSE_TIME_ timestamp,
- DURATION_ bigint,
- STATE_ integer,
- CREATE_USER_ID_ varchar(255),
- SUPER_CASE_INSTANCE_ID_ varchar(64),
- SUPER_PROCESS_INSTANCE_ID_ varchar(64),
- TENANT_ID_ varchar(64),
- primary key (ID_),
- unique (CASE_INST_ID_)
-);
-
-create table ACT_HI_CASEACTINST
-(
- ID_ varchar(64) not null,
- PARENT_ACT_INST_ID_ varchar(64),
- CASE_DEF_ID_ varchar(64) not null,
- CASE_INST_ID_ varchar(64) not null,
- CASE_ACT_ID_ varchar(255) not null,
- TASK_ID_ varchar(64),
- CALL_PROC_INST_ID_ varchar(64),
- CALL_CASE_INST_ID_ varchar(64),
- CASE_ACT_NAME_ varchar(255),
- CASE_ACT_TYPE_ varchar(255),
- CREATE_TIME_ timestamp not null,
- END_TIME_ timestamp,
- DURATION_ bigint,
- STATE_ integer,
- REQUIRED_ boolean,
- TENANT_ID_ varchar(64),
- primary key (ID_)
-);
-
-create index ACT_IDX_HI_CAS_I_CLOSE on ACT_HI_CASEINST (CLOSE_TIME_);
-create index ACT_IDX_HI_CAS_I_BUSKEY on ACT_HI_CASEINST (BUSINESS_KEY_);
-create index ACT_IDX_HI_CAS_I_TENANT_ID on ACT_HI_CASEINST (TENANT_ID_);
-create index ACT_IDX_HI_CAS_A_I_CREATE on ACT_HI_CASEACTINST (CREATE_TIME_);
-create index ACT_IDX_HI_CAS_A_I_END on ACT_HI_CASEACTINST (END_TIME_);
-create index ACT_IDX_HI_CAS_A_I_COMP on ACT_HI_CASEACTINST (CASE_ACT_ID_, END_TIME_, ID_);
-create index ACT_IDX_HI_CAS_A_I_TENANT_ID on ACT_HI_CASEACTINST (TENANT_ID_);
-
---
--- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
--- under one or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information regarding copyright
--- ownership. Camunda licenses this file to you under the Apache License,
--- Version 2.0; 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.
---
-
--- create decision definition table --
-create table ACT_RE_DECISION_DEF
-(
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- NAME_ varchar(255),
- KEY_ varchar(255) NOT NULL,
- VERSION_ integer NOT NULL,
- DEPLOYMENT_ID_ varchar(64),
- RESOURCE_NAME_ varchar(4000),
- DGRM_RESOURCE_NAME_ varchar(4000),
- DEC_REQ_ID_ varchar(64),
- DEC_REQ_KEY_ varchar(255),
- TENANT_ID_ varchar(64),
- HISTORY_TTL_ integer,
- VERSION_TAG_ varchar(64),
- primary key (ID_)
-);
-
--- create decision requirements definition table --
-create table ACT_RE_DECISION_REQ_DEF
-(
- ID_ varchar(64) NOT NULL,
- REV_ integer,
- CATEGORY_ varchar(255),
- NAME_ varchar(255),
- KEY_ varchar(255) NOT NULL,
- VERSION_ integer NOT NULL,
- DEPLOYMENT_ID_ varchar(64),
- RESOURCE_NAME_ varchar(4000),
- DGRM_RESOURCE_NAME_ varchar(4000),
- TENANT_ID_ varchar(64),
- primary key (ID_)
-);
-
-alter table ACT_RE_DECISION_DEF
- add constraint ACT_FK_DEC_REQ
- foreign key (DEC_REQ_ID_)
- references ACT_RE_DECISION_REQ_DEF (ID_);
-
-create index ACT_IDX_DEC_DEF_TENANT_ID on ACT_RE_DECISION_DEF (TENANT_ID_);
-create index ACT_IDX_DEC_DEF_REQ_ID on ACT_RE_DECISION_DEF (DEC_REQ_ID_);
-create index ACT_IDX_DEC_REQ_DEF_TENANT_ID on ACT_RE_DECISION_REQ_DEF (TENANT_ID_);
-
---
--- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
--- under one or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information regarding copyright
--- ownership. Camunda licenses this file to you under the Apache License,
--- Version 2.0; 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.
---
-
--- create history decision instance table --
-create table ACT_HI_DECINST
-(
- ID_ varchar(64) NOT NULL,
- DEC_DEF_ID_ varchar(64) NOT NULL,
- DEC_DEF_KEY_ varchar(255) NOT NULL,
- DEC_DEF_NAME_ varchar(255),
- PROC_DEF_KEY_ varchar(255),
- PROC_DEF_ID_ varchar(64),
- PROC_INST_ID_ varchar(64),
- CASE_DEF_KEY_ varchar(255),
- CASE_DEF_ID_ varchar(64),
- CASE_INST_ID_ varchar(64),
- ACT_INST_ID_ varchar(64),
- ACT_ID_ varchar(255),
- EVAL_TIME_ timestamp not null,
- REMOVAL_TIME_ timestamp,
- COLLECT_VALUE_ double precision,
- USER_ID_ varchar(255),
- ROOT_DEC_INST_ID_ varchar(64),
- ROOT_PROC_INST_ID_ varchar(64),
- DEC_REQ_ID_ varchar(64),
- DEC_REQ_KEY_ varchar(255),
- TENANT_ID_ varchar(64),
- primary key (ID_)
-);
-
--- create history decision input table --
-create table ACT_HI_DEC_IN
-(
- ID_ varchar(64) NOT NULL,
- DEC_INST_ID_ varchar(64) NOT NULL,
- CLAUSE_ID_ varchar(64),
- CLAUSE_NAME_ varchar(255),
- VAR_TYPE_ varchar(100),
- BYTEARRAY_ID_ varchar(64),
- DOUBLE_ double precision,
- LONG_ bigint,
- TEXT_ varchar(4000),
- TEXT2_ varchar(4000),
- TENANT_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- ROOT_PROC_INST_ID_ varchar(64),
- REMOVAL_TIME_ timestamp,
- primary key (ID_)
-);
-
--- create history decision output table --
-create table ACT_HI_DEC_OUT
-(
- ID_ varchar(64) NOT NULL,
- DEC_INST_ID_ varchar(64) NOT NULL,
- CLAUSE_ID_ varchar(64),
- CLAUSE_NAME_ varchar(255),
- RULE_ID_ varchar(64),
- RULE_ORDER_ integer,
- VAR_NAME_ varchar(255),
- VAR_TYPE_ varchar(100),
- BYTEARRAY_ID_ varchar(64),
- DOUBLE_ double precision,
- LONG_ bigint,
- TEXT_ varchar(4000),
- TEXT2_ varchar(4000),
- TENANT_ID_ varchar(64),
- CREATE_TIME_ timestamp,
- ROOT_PROC_INST_ID_ varchar(64),
- REMOVAL_TIME_ timestamp,
- primary key (ID_)
-);
-
-
-create index ACT_IDX_HI_DEC_INST_ID on ACT_HI_DECINST (DEC_DEF_ID_);
-create index ACT_IDX_HI_DEC_INST_KEY on ACT_HI_DECINST (DEC_DEF_KEY_);
-create index ACT_IDX_HI_DEC_INST_PI on ACT_HI_DECINST (PROC_INST_ID_);
-create index ACT_IDX_HI_DEC_INST_CI on ACT_HI_DECINST (CASE_INST_ID_);
-create index ACT_IDX_HI_DEC_INST_ACT on ACT_HI_DECINST (ACT_ID_);
-create index ACT_IDX_HI_DEC_INST_ACT_INST on ACT_HI_DECINST (ACT_INST_ID_);
-create index ACT_IDX_HI_DEC_INST_TIME on ACT_HI_DECINST (EVAL_TIME_);
-create index ACT_IDX_HI_DEC_INST_TENANT_ID on ACT_HI_DECINST (TENANT_ID_);
-create index ACT_IDX_HI_DEC_INST_ROOT_ID on ACT_HI_DECINST (ROOT_DEC_INST_ID_);
-create index ACT_IDX_HI_DEC_INST_REQ_ID on ACT_HI_DECINST (DEC_REQ_ID_);
-create index ACT_IDX_HI_DEC_INST_REQ_KEY on ACT_HI_DECINST (DEC_REQ_KEY_);
-create index ACT_IDX_HI_DEC_INST_ROOT_PI on ACT_HI_DECINST (ROOT_PROC_INST_ID_);
-create index ACT_IDX_HI_DEC_INST_RM_TIME on ACT_HI_DECINST (REMOVAL_TIME_);
-
-create index ACT_IDX_HI_DEC_IN_INST on ACT_HI_DEC_IN (DEC_INST_ID_);
-create index ACT_IDX_HI_DEC_IN_CLAUSE on ACT_HI_DEC_IN (DEC_INST_ID_, CLAUSE_ID_);
-create index ACT_IDX_HI_DEC_IN_ROOT_PI on ACT_HI_DEC_IN (ROOT_PROC_INST_ID_);
-create index ACT_IDX_HI_DEC_IN_RM_TIME on ACT_HI_DEC_IN (REMOVAL_TIME_);
-
-create index ACT_IDX_HI_DEC_OUT_INST on ACT_HI_DEC_OUT (DEC_INST_ID_);
-create index ACT_IDX_HI_DEC_OUT_RULE on ACT_HI_DEC_OUT (RULE_ORDER_, CLAUSE_ID_);
-create index ACT_IDX_HI_DEC_OUT_ROOT_PI on ACT_HI_DEC_OUT (ROOT_PROC_INST_ID_);
-create index ACT_IDX_HI_DEC_OUT_RM_TIME on ACT_HI_DEC_OUT (REMOVAL_TIME_);
diff --git a/platform/services/camunda7-engine-service/src/main/resources/db/migration/postgresql/V03__engine_backend.sql b/platform/services/camunda7-engine-service/src/main/resources/db/migration/postgresql/V03__engine_backend.sql
deleted file mode 100644
index 952eeb995..000000000
--- a/platform/services/camunda7-engine-service/src/main/resources/db/migration/postgresql/V03__engine_backend.sql
+++ /dev/null
@@ -1,43 +0,0 @@
-create table miranum_filter
-(
- id_ varchar(36) not null,
- filterstring_ varchar(255) not null,
- pageid_ varchar(255) not null,
- userid_ varchar(255) not null,
- primary key (id_)
-);
-
-
-create table miranum_process_instance_auth
-(
- id_ varchar(36) not null,
- processinstanceid_ varchar(255) not null,
- userid_ varchar(255) not null,
- primary key (id_)
-);
-
-create table miranum_process_instance
-(
- id_ varchar(36) not null,
- processdefinitionkey_ varchar(255) not null,
- processname_ varchar(255) not null,
- description_ varchar(255),
- endtime_ timestamp,
- removaltime_ timestamp,
- starttime_ timestamp,
- status_ varchar(255),
- statuskey_ varchar(255),
- primary key (id_)
-);
-
-create table miranum_start_context
-(
- id_ varchar(36) not null,
- definitionkey_ varchar(255) not null,
- filecontext_ varchar(255) not null,
- userid_ varchar(255) not null,
- primary key (id_)
-);
-
-create index IDX_DWF_FILTER_USERID on miranum_filter (userid_);
-create index IDX_DWF_PROCAUTH_USERID on miranum_process_instance_auth (userid_);
diff --git a/platform/services/camunda7-engine-service/src/main/resources/db/migration/postgresql/V04__schema_registry.sql b/platform/services/camunda7-engine-service/src/main/resources/db/migration/postgresql/V04__schema_registry.sql
deleted file mode 100644
index 3d5f7038d..000000000
--- a/platform/services/camunda7-engine-service/src/main/resources/db/migration/postgresql/V04__schema_registry.sql
+++ /dev/null
@@ -1,19 +0,0 @@
-create table miranum_schema_registry
-(
- id_ varchar(36) not null
- constraint miranum_schema_registry_pkey
- primary key,
- bundle_ varchar(255) not null,
- ref_ varchar(255) not null,
- tag_ varchar(255) not null,
- json_node_ text not null
-);
-
-alter table miranum_schema_registry
- owner to "${flyway:user}";
-
-create index if not exists miranum_schema_registry_bundle_ref_idx
- on miranum_schema_registry (bundle_, ref_);
-
-create index if not exists miranum_schema_registry_bundle_ref_tag_idx
- on miranum_schema_registry (bundle_, ref_, tag_);
diff --git a/platform/services/deployment-service/Dockerfile b/platform/services/deployment-service/Dockerfile
deleted file mode 100644
index a03dcfbc1..000000000
--- a/platform/services/deployment-service/Dockerfile
+++ /dev/null
@@ -1,9 +0,0 @@
-FROM amazoncorretto:17-alpine
-
-EXPOSE 8080
-
-RUN mkdir /app
-
-COPY ./target/*.jar /app/spring-boot-application.jar
-
-CMD ["java","-jar","/app/spring-boot-application.jar"]
diff --git a/platform/services/deployment-service/pom.xml b/platform/services/deployment-service/pom.xml
deleted file mode 100644
index 8dbe73c63..000000000
--- a/platform/services/deployment-service/pom.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
- 4.0.0
-
- io.miranum.platform
- services
- 0.3.1-SNAPSHOT
-
-
- de.muenchen.oss.digiwf
- deployment-service
-
-
- 0.3.1
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-dependencies
- 3.2.0
- pom
- import
-
-
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
-
- io.miragon.miranum
- miranum-deployment-server-rest-starter
- ${miranum-ide.version}
-
-
-
-
-
-
- src/main/resources
- true
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
- repackage
-
-
-
-
-
- ${project.artifactId}
-
-
-
diff --git a/platform/services/deployment-service/src/main/java/io/miranum/platform/deploymentservice/DeploymentServiceApplication.java b/platform/services/deployment-service/src/main/java/io/miranum/platform/deploymentservice/DeploymentServiceApplication.java
deleted file mode 100644
index 1dab683aa..000000000
--- a/platform/services/deployment-service/src/main/java/io/miranum/platform/deploymentservice/DeploymentServiceApplication.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package io.miranum.platform.deploymentservice;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-
-@SpringBootApplication
-public class DeploymentServiceApplication {
-
- public static void main(final String[] args) {
- SpringApplication.run(DeploymentServiceApplication.class, args);
- }
-
-}
diff --git a/platform/services/deployment-service/src/main/resources/application.yml b/platform/services/deployment-service/src/main/resources/application.yml
deleted file mode 100644
index 6bb3708fe..000000000
--- a/platform/services/deployment-service/src/main/resources/application.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-server:
- port: '${MIRANUM_DEPLOYMENT_SERVICE_PORT:8080}'
-
-io.miranum.deploymentserver.rest:
- enabled: true
- targets:
- dev:
- bpmn: '${MIRANUM_DEPLOYMENT_SERVER_BPMN_DEV_URL}:${MIRANUM_DEPLOYMENT_SERVER_BPMN_DEV_PORT}/rest/deployment'
- dmn: '${MIRANUM_DEPLOYMENT_SERVER_DMN_DEV_URL}:${MIRANUM_DEPLOYMENT_SERVER_DMN_DEV_PORT}/rest/deployment'
- form: '${MIRANUM_DEPLOYMENT_SERVER_FORM_DEV_URL}:${MIRANUM_DEPLOYMENT_SERVER_FORM_DEV_PORT}/rest/deployment'
- config: '${MIRANUM_DEPLOYMENT_SERVER_CONFIG_DEV_URL}:${MIRANUM_DEPLOYMENT_SERVER_CONFIG_DEV_PORT}/rest/deployment'
- test:
- bpmn: '${MIRANUM_DEPLOYMENT_SERVER_BPMN_TEST_URL}:${MIRANUM_DEPLOYMENT_SERVER_BPMN_TEST_PORT}/rest/deployment'
- dmn: '${MIRANUM_DEPLOYMENT_SERVER_DMN_TEST_URL}:${MIRANUM_DEPLOYMENT_SERVER_DMN_TEST_PORT}/rest/deployment'
- form: '${MIRANUM_DEPLOYMENT_SERVER_FORM_TEST_URL}:${MIRANUM_DEPLOYMENT_SERVER_FORM_TEST_PORT}/rest/deployment'
- config: '${MIRANUM_DEPLOYMENT_SERVER_CONFIG_TEST_URL}:${MIRANUM_DEPLOYMENT_SERVER_CONFIG_TEST_PORT}/rest/deployment'
- prod:
- bpmn: '${MIRANUM_DEPLOYMENT_SERVER_BPMN_PROD_URL}:${MIRANUM_DEPLOYMENT_SERVER_BPMN_PROD_PORT}/rest/deployment'
- dmn: '${MIRANUM_DEPLOYMENT_SERVER_DMN_PROD_URL}:${MIRANUM_DEPLOYMENT_SERVER_DMN_PROD_PORT}/rest/deployment'
- form: '${MIRANUM_DEPLOYMENT_SERVER_FORM_PROD_URL}:${MIRANUM_DEPLOYMENT_SERVER_FORM_PROD_PORT}/rest/deployment'
- config: '${MIRANUM_DEPLOYMENT_SERVER_CONFIG_PROD_URL}:${MIRANUM_DEPLOYMENT_SERVER_CONFIG_PROD_PORT}/rest/deployment'
diff --git a/platform/services/pom.xml b/platform/services/pom.xml
deleted file mode 100644
index bd6b65ed9..000000000
--- a/platform/services/pom.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
- 4.0.0
- services
- services
- pom
-
-
- io.miranum.platform
- miranum-platform
- 0.3.1-SNAPSHOT
-
-
-
- camunda7-engine-service
- deployment-service
-
-
-