create table ACT_GE_PROPERTY (
NAME_ NVARCHAR2(64),
VALUE_ NVARCHAR2(300),
REV_ INTEGER,
primary key (NAME_)
);
create table ACT_GE_BYTEARRAY (
ID_ NVARCHAR2(64),
REV_ INTEGER,
NAME_ NVARCHAR2(255),
DEPLOYMENT_ID_ NVARCHAR2(64),
BYTES_ BLOB,
GENERATED_ NUMBER(1,0) CHECK (GENERATED_ IN (1,0)),
primary key (ID_)
);
insert into ACT_GE_PROPERTY
values ('common.schema.version', '6.3.1.0', 1);
insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1);
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),
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_SCOPE_DEF on ACT_RU_IDENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
insert into ACT_GE_PROPERTY values ('identitylink.schema.version', '6.3.1.0', 1);
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),
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),
DUE_DATE_ TIMESTAMP(6),
CATEGORY_ NVARCHAR2(255),
SUSPENSION_STATE_ INTEGER,
TENANT_ID_ NVARCHAR2(255) DEFAULT '',
FORM_KEY_ NVARCHAR2(255),
CLAIM_TIME_ TIMESTAMP(6),
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_);
insert into ACT_GE_PROPERTY values ('task.schema.version', '6.3.1.0', 1);
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),
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_);
insert into ACT_GE_PROPERTY values ('variable.schema.version', '6.3.1.0', 1);
create table ACT_RU_JOB (
ID_ NVARCHAR2(64) NOT NULL,
REV_ INTEGER,
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),
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 table ACT_RU_TIMER_JOB (
ID_ NVARCHAR2(64) NOT NULL,
REV_ INTEGER,
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),
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 table ACT_RU_SUSPENDED_JOB (
ID_ NVARCHAR2(64) NOT NULL,
REV_ INTEGER,
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),
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 table ACT_RU_DEADLETTER_JOB (
ID_ NVARCHAR2(64) NOT NULL,
REV_ INTEGER,
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),
SCOPE_ID_ NVARCHAR2(255),
SUB_SCOPE_ID_ NVARCHAR2(255),
SCOPE_TYPE_ NVARCHAR2(255),
SCOPE_DEFINITION_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 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_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_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_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_);
alter table ACT_RU_JOB
add c