org.flowable.job.service.db.create.flowable.gbase8s.create.job.sql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of db-migration-flowable
Show all versions of db-migration-flowable
db-migration 使用 Liquibase 支持 Flowable 工作流。
create table ACT_RU_JOB (
ID_ VARCHAR(64) NOT NULL,
REV_ INTEGER,
CATEGORY_ VARCHAR(255),
TYPE_ VARCHAR(255) NOT NULL,
LOCK_EXP_TIME_ TIMESTAMP(6),
LOCK_OWNER_ VARCHAR(255),
EXCLUSIVE_ DECIMAL(1,0) 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(2000),
DUEDATE_ TIMESTAMP(6),
REPEAT_ VARCHAR(255),
HANDLER_TYPE_ VARCHAR(255),
HANDLER_CFG_ VARCHAR(2000),
CUSTOM_VALUES_ID_ VARCHAR(64),
CREATE_TIME_ TIMESTAMP(6),
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(6),
LOCK_OWNER_ VARCHAR(255),
EXCLUSIVE_ DECIMAL(1,0) 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(2000),
DUEDATE_ TIMESTAMP(6),
REPEAT_ VARCHAR(255),
HANDLER_TYPE_ VARCHAR(255),
HANDLER_CFG_ VARCHAR(2000),
CUSTOM_VALUES_ID_ VARCHAR(64),
CREATE_TIME_ TIMESTAMP(6),
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_ DECIMAL(1,0) 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(2000),
DUEDATE_ TIMESTAMP(6),
REPEAT_ VARCHAR(255),
HANDLER_TYPE_ VARCHAR(255),
HANDLER_CFG_ VARCHAR(2000),
CUSTOM_VALUES_ID_ VARCHAR(64),
CREATE_TIME_ TIMESTAMP(6),
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_ DECIMAL(1,0) 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(2000),
DUEDATE_ TIMESTAMP(6),
REPEAT_ VARCHAR(255),
HANDLER_TYPE_ VARCHAR(255),
HANDLER_CFG_ VARCHAR(2000),
CUSTOM_VALUES_ID_ VARCHAR(64),
CREATE_TIME_ TIMESTAMP(6),
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(6),
LOCK_OWNER_ VARCHAR(255),
RETRIES_ INTEGER,
EXCEPTION_STACK_ID_ VARCHAR(64),
EXCEPTION_MSG_ VARCHAR(2000),
HANDLER_TYPE_ VARCHAR(255),
HANDLER_CFG_ VARCHAR(2000),
CUSTOM_VALUES_ID_ VARCHAR(64),
ADV_HANDLER_CFG_ID_ VARCHAR(64),
CREATE_TIME_ TIMESTAMP(6),
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(6),
LOCK_OWNER_ VARCHAR(255),
EXCLUSIVE_ DECIMAL(1,0) 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(2000),
DUEDATE_ TIMESTAMP(6),
REPEAT_ VARCHAR(255),
HANDLER_TYPE_ VARCHAR(255),
HANDLER_CFG_ VARCHAR(2000),
CUSTOM_VALUES_ID_ VARCHAR(64),
CREATE_TIME_ TIMESTAMP(6),
TENANT_ID_ VARCHAR(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
foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_JOB
add constraint
foreign key (CUSTOM_VALUES_ID_)
references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_TIMER_JOB
add constraint
foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_TIMER_JOB
add constraint
foreign key (CUSTOM_VALUES_ID_)
references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_SUSPENDED_JOB
add constraint
foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_SUSPENDED_JOB
add constraint
foreign key (CUSTOM_VALUES_ID_)
references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_DEADLETTER_JOB
add constraint
foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_DEADLETTER_JOB
add constraint
foreign key (CUSTOM_VALUES_ID_)
references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_EXTERNAL_JOB
add constraint
foreign key (EXCEPTION_STACK_ID_)
references ACT_GE_BYTEARRAY (ID_);
alter table ACT_RU_EXTERNAL_JOB
add constraint
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.0.1.1', 1);