create table fad_oa.ACT_HI_ACTINST
(
    ID_                varchar(64)             not null
        primary key,
    REV_               int          default 1  null,
    PROC_DEF_ID_       varchar(64)             not null,
    PROC_INST_ID_      varchar(64)             not null,
    EXECUTION_ID_      varchar(64)             not null,
    ACT_ID_            varchar(255)            not null,
    TASK_ID_           varchar(64)             null,
    CALL_PROC_INST_ID_ varchar(64)             null,
    ACT_NAME_          varchar(255)            null,
    ACT_TYPE_          varchar(255)            not null,
    ASSIGNEE_          varchar(255)            null,
    START_TIME_        datetime(3)             not null,
    END_TIME_          datetime(3)             null,
    TRANSACTION_ORDER_ int                     null,
    DURATION_          bigint                  null,
    DELETE_REASON_     varchar(4000)           null,
    TENANT_ID_         varchar(255) default '' null
)
    collate = utf8mb3_bin;

create index ACT_IDX_HI_ACT_INST_END
    on fad_oa.ACT_HI_ACTINST (END_TIME_);

create index ACT_IDX_HI_ACT_INST_EXEC
    on fad_oa.ACT_HI_ACTINST (EXECUTION_ID_, ACT_ID_);

create index ACT_IDX_HI_ACT_INST_PROCINST
    on fad_oa.ACT_HI_ACTINST (PROC_INST_ID_, ACT_ID_);

create index ACT_IDX_HI_ACT_INST_START
    on fad_oa.ACT_HI_ACTINST (START_TIME_);

