From 7431ed9b887e2b00b41a972d0f34070a428981bb Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 7 Mar 2023 15:30:35 +0800 Subject: [PATCH] =?UTF-8?q?ddl=20=E8=AF=AD=E5=8F=A5=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kingbasesql/FLW_EV_DATABASECHANGELOGLOCK.sql | 7 + kingbasesql/deploy.sql | 56 ++ kingbasesql/flw_ev_databasechangelog.sql | 18 + kingbasesql/nd_wlfow_org_models.sql | 28 + kingbasesql/nd_wlfow_org_models_historys.sql | 28 + kingbasesql/wflow_cc_tasks.sql | 13 + kingbasesql/wflow_departments.sql | 27 + kingbasesql/wflow_model_groups.sql | 11 + kingbasesql/wflow_model_historys.sql | 20 + kingbasesql/wflow_model_perms.sql | 10 + kingbasesql/wflow_models.sql | 23 + kingbasesql/wflow_notifys.sql | 14 + kingbasesql/wflow_roles.sql | 12 + kingbasesql/wflow_user_agents.sql | 9 + kingbasesql/wflow_user_departments.sql | 20 + kingbasesql/wflow_user_roles.sql | 9 + kingbasesql/wflow_users.sql | 31 + kingbasesql/wflowother.sql | 910 +++++++++++++++++++++++++++ pgsql/FLW_EV_DATABASECHANGELOGLOCK.sql | 7 - pgsql/deploy.sql | 56 -- pgsql/flw_ev_databasechangelog.sql | 18 - pgsql/nd_wlfow_org_models.sql | 28 - pgsql/nd_wlfow_org_models_historys.sql | 28 - pgsql/wflow_cc_tasks.sql | 13 - pgsql/wflow_departments.sql | 27 - pgsql/wflow_model_groups.sql | 11 - pgsql/wflow_model_historys.sql | 20 - pgsql/wflow_model_perms.sql | 10 - pgsql/wflow_models.sql | 23 - pgsql/wflow_notifys.sql | 14 - pgsql/wflow_roles.sql | 12 - pgsql/wflow_user_agents.sql | 9 - pgsql/wflow_user_departments.sql | 20 - pgsql/wflow_user_roles.sql | 9 - pgsql/wflow_users.sql | 31 - pgsql/wflowother.sql | 910 --------------------------- 36 files changed, 1246 insertions(+), 1246 deletions(-) create mode 100644 kingbasesql/FLW_EV_DATABASECHANGELOGLOCK.sql create mode 100644 kingbasesql/deploy.sql create mode 100644 kingbasesql/flw_ev_databasechangelog.sql create mode 100644 kingbasesql/nd_wlfow_org_models.sql create mode 100644 kingbasesql/nd_wlfow_org_models_historys.sql create mode 100644 kingbasesql/wflow_cc_tasks.sql create mode 100644 kingbasesql/wflow_departments.sql create mode 100644 kingbasesql/wflow_model_groups.sql create mode 100644 kingbasesql/wflow_model_historys.sql create mode 100644 kingbasesql/wflow_model_perms.sql create mode 100644 kingbasesql/wflow_models.sql create mode 100644 kingbasesql/wflow_notifys.sql create mode 100644 kingbasesql/wflow_roles.sql create mode 100644 kingbasesql/wflow_user_agents.sql create mode 100644 kingbasesql/wflow_user_departments.sql create mode 100644 kingbasesql/wflow_user_roles.sql create mode 100644 kingbasesql/wflow_users.sql create mode 100644 kingbasesql/wflowother.sql delete mode 100644 pgsql/FLW_EV_DATABASECHANGELOGLOCK.sql delete mode 100644 pgsql/deploy.sql delete mode 100644 pgsql/flw_ev_databasechangelog.sql delete mode 100644 pgsql/nd_wlfow_org_models.sql delete mode 100644 pgsql/nd_wlfow_org_models_historys.sql delete mode 100644 pgsql/wflow_cc_tasks.sql delete mode 100644 pgsql/wflow_departments.sql delete mode 100644 pgsql/wflow_model_groups.sql delete mode 100644 pgsql/wflow_model_historys.sql delete mode 100644 pgsql/wflow_model_perms.sql delete mode 100644 pgsql/wflow_models.sql delete mode 100644 pgsql/wflow_notifys.sql delete mode 100644 pgsql/wflow_roles.sql delete mode 100644 pgsql/wflow_user_agents.sql delete mode 100644 pgsql/wflow_user_departments.sql delete mode 100644 pgsql/wflow_user_roles.sql delete mode 100644 pgsql/wflow_users.sql delete mode 100644 pgsql/wflowother.sql diff --git a/kingbasesql/FLW_EV_DATABASECHANGELOGLOCK.sql b/kingbasesql/FLW_EV_DATABASECHANGELOGLOCK.sql new file mode 100644 index 0000000..ad471a8 --- /dev/null +++ b/kingbasesql/FLW_EV_DATABASECHANGELOGLOCK.sql @@ -0,0 +1,7 @@ +CREATE TABLE PUBLIC.FLW_EV_DATABASECHANGELOGLOCK ( + ID int8 NOT NULL, + LOCKED bool NOT NULL, + LOCKGRANTED timestamp, + LOCKEDBY VARCHAR(255), + CONSTRAINT FLW_EV_DATABASECHANGELOGLOCK_PK PRIMARY KEY (ID) +); \ No newline at end of file diff --git a/kingbasesql/deploy.sql b/kingbasesql/deploy.sql new file mode 100644 index 0000000..5987b05 --- /dev/null +++ b/kingbasesql/deploy.sql @@ -0,0 +1,56 @@ +CREATE TABLE PUBLIC.FLW_EVENT_DEPLOYMENT ( + ID_ VARCHAR(255) NOT NULL, + NAME_ VARCHAR(255), + CATEGORY_ VARCHAR(255), + DEPLOY_TIME_ timestamp, + TENANT_ID_ VARCHAR(255), + PARENT_DEPLOYMENT_ID_ VARCHAR(255), + CONSTRAINT FLW_EVENT_DEPLOYMENT_PK PRIMARY KEY (ID_) +); + +create table PUBLIC.FLW_CHANNEL_DEFINITION +( + ID_ VARCHAR(255) not null + constraint "flw_channel_definition_pk" + primary key, + NAME_ VARCHAR(255), + VERSION_ INT4, + KEY_ VARCHAR(255), + CATEGORY_ VARCHAR(255), + DEPLOYMENT_ID_ VARCHAR(255), + CREATE_TIME_ TIMESTAMP, + TENANT_ID_ VARCHAR(255), + RESOURCE_NAME_ VARCHAR(255), + DESCRIPTION_ VARCHAR(255), + TYPE_ VARCHAR(255), + IMPLEMENTATION_ VARCHAR(255) +); +CREATE UNIQUE INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_,VERSION_,TENANT_ID_); + + +create table FLW_EVENT_DEFINITION +( + ID_ VARCHAR(255) not null + constraint "flw_event_definition_pk" + primary key, + NAME_ VARCHAR(255), + VERSION_ INT4, + KEY_ VARCHAR(255), + CATEGORY_ VARCHAR(255), + DEPLOYMENT_ID_ VARCHAR(255), + TENANT_ID_ VARCHAR(255), + RESOURCE_NAME_ VARCHAR(255), + DESCRIPTION_ VARCHAR(255) +); +CREATE UNIQUE INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_,VERSION_,TENANT_ID_); + + +create table FLW_EVENT_RESOURCE +( + ID_ VARCHAR(255) not null + constraint "flw_event_resource_pk" + primary key, + NAME_ VARCHAR(255), + DEPLOYMENT_ID_ VARCHAR(255), + RESOURCE_BYTES_ BLOB +); diff --git a/kingbasesql/flw_ev_databasechangelog.sql b/kingbasesql/flw_ev_databasechangelog.sql new file mode 100644 index 0000000..8cb91ff --- /dev/null +++ b/kingbasesql/flw_ev_databasechangelog.sql @@ -0,0 +1,18 @@ +-- PUBLIC."flw_ev_databasechangelog" definition + +CREATE TABLE PUBLIC."FLW_EV_DATABASECHANGELOG" ( + ID VARCHAR(255) NOT NULL, + AUTHOR VARCHAR(255) NOT NULL, + FILENAME VARCHAR(255) NOT NULL, + DATEEXECUTED timestamp, + ORDEREXECUTED int8, + EXECTYPE VARCHAR(10), + MD5SUM VARCHAR(35), + DESCRIPTION VARCHAR(255), + COMMENTS VARCHAR(255), + TAG VARCHAR(255), + LIQUIBASE VARCHAR(20), + CONTEXTS VARCHAR(255), + LABELS VARCHAR(255), + DEPLOYMENT_ID VARCHAR(10) +); \ No newline at end of file diff --git a/kingbasesql/nd_wlfow_org_models.sql b/kingbasesql/nd_wlfow_org_models.sql new file mode 100644 index 0000000..c44bae3 --- /dev/null +++ b/kingbasesql/nd_wlfow_org_models.sql @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS nd_wflow_org_models; +CREATE TABLE nd_wflow_org_models ( + process_def_id varchar(40), + process_def_name varchar(255), + deploy_id varchar(255), + version int4 NOT NULL DEFAULT 1, + org_code varchar(50), + org_name varchar(255), + settings text, + group_id int8, + form_items text, + process text, + remark varchar(125), + sort int4 not null default 0, + is_delete BOOL not null default false, + is_stop BOOL not null default false, + created timestamp, + updated timestamp, + type varchar(125), + CONSTRAINT "nd_wflow_org_models_pri" PRIMARY KEY ("process_def_id") +); + +comment on column nd_wflow_org_models.process_def_id is '流程配置id'; +comment on column nd_wflow_org_models.process_def_name is '流程配置名字'; +comment on column nd_wflow_org_models.version is '版本号'; +comment on column nd_wflow_org_models.process is '流程内容'; +comment on column nd_wflow_org_models.remark is '备注'; +comment on column nd_wflow_org_models.type is '类型 DEFAULT默认 SEAL盖章 OTHER其它'; diff --git a/kingbasesql/nd_wlfow_org_models_historys.sql b/kingbasesql/nd_wlfow_org_models_historys.sql new file mode 100644 index 0000000..d70ee4d --- /dev/null +++ b/kingbasesql/nd_wlfow_org_models_historys.sql @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS nd_wflow_org_model_historys; +CREATE TABLE nd_wflow_org_model_historys ( + id bigserial, + process_def_id varchar(40), + process_def_name varchar(255), + deploy_id varchar(255), + version int4 NOT NULL DEFAULT 1, + org_code varchar(50), + org_name varchar(255), + settings text, + group_id int8, + form_items text, + process text, + remark varchar(125), + sort int4 not null default 0, + is_delete BOOL not null default false, + is_stop BOOL not null default false, + created timestamp, + updated timestamp, + type varchar(125), + CONSTRAINT "nd_wflow_org_model_historys_pri" PRIMARY KEY ("id") +); +comment on column nd_wflow_org_models.process_def_id is '流程配置id'; +comment on column nd_wflow_org_models.process_def_name is '流程配置名字'; +comment on column nd_wflow_org_models.version is '版本号'; +comment on column nd_wflow_org_models.process is '流程内容'; +comment on column nd_wflow_org_models.remark is '备注'; +comment on column nd_wflow_org_models.type is '类型 DEFAULT默认 SEAL盖章 OTHER其它'; diff --git a/kingbasesql/wflow_cc_tasks.sql b/kingbasesql/wflow_cc_tasks.sql new file mode 100644 index 0000000..4dd24c0 --- /dev/null +++ b/kingbasesql/wflow_cc_tasks.sql @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS wflow_cc_tasks; +CREATE TABLE wflow_cc_tasks ( + id bigserial NOT NULL, + instance_id varchar(40) NOT NULL, + user_id varchar(30) NOT NULL, + node_id varchar(40) NOT NULL, + node_name varchar(50) NOT NULL, + create_time timestamp NOT NULL, + CONSTRAINT "wflow_cc_tasks_pri" PRIMARY KEY ("id") +) +CREATE INDEX instance_idx ON wflow_cc_tasks(instance_id, user_id); +comment on TABLE wflow_cc_tasks IS '抄送任务表'; +comment on column wflow_cc_tasks.id IS '主键id'; \ No newline at end of file diff --git a/kingbasesql/wflow_departments.sql b/kingbasesql/wflow_departments.sql new file mode 100644 index 0000000..8d84893 --- /dev/null +++ b/kingbasesql/wflow_departments.sql @@ -0,0 +1,27 @@ +DROP TABLE IF EXISTS wflow_departments; +CREATE TABLE wflow_departments ( + id bigserial NOT NULL, + dept_name varchar(255), + leader varchar(255), + parent_id int8, + created timestamp, + updated timestamp, + CONSTRAINT "wflow_departments_pri" PRIMARY KEY ("id") +) +CREATE INDEX parent_idx ON wflow_departments(parent_id); +CREATE INDEX leader_idx ON wflow_departments(leader); +comment ON TABLE wflow_departments IS '部门表'; +comment ON column wflow_departments.id IS '主键'; +comment ON column wflow_departments.dept_name IS '部门名'; +comment ON column wflow_departments.leader IS '部门主管'; +comment ON column wflow_departments.parent_id IS '父部门id'; +-- ---------------------------- +-- Records of wflow_departments +-- ---------------------------- +INSERT INTO wflow_departments VALUES (35453, '业务部', '3286432', 4319868, '2020-09-16 13:30:37', '2022-09-25 17:49:29'); +INSERT INTO wflow_departments VALUES (231535, '生产管理部', NULL, 1486186, '2020-09-16 13:30:39', '2020-09-16 13:30:42'); +INSERT INTO wflow_departments VALUES (264868, '行政人事部', NULL, 1486186, '2020-09-16 13:30:42', '2020-09-16 13:30:44'); +INSERT INTO wflow_departments VALUES (689698, '客服部', '489564', 4319868, '2020-09-16 13:30:34', '2022-09-04 18:26:20'); +INSERT INTO wflow_departments VALUES (1486186, 'xx科技有限公司', '381496', 0, '2020-09-16 13:26:25', '2022-09-04 18:25:12'); +INSERT INTO wflow_departments VALUES (4319868, '销售服务部', '927438', 1486186, '2020-09-16 13:30:44', '2022-09-04 18:26:07'); +INSERT INTO wflow_departments VALUES (6179678, '研发部', '6418616', 1486186, '2020-09-16 13:26:56', '2022-09-04 18:25:49'); \ No newline at end of file diff --git a/kingbasesql/wflow_model_groups.sql b/kingbasesql/wflow_model_groups.sql new file mode 100644 index 0000000..3a04893 --- /dev/null +++ b/kingbasesql/wflow_model_groups.sql @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS wflow_model_groups; +CREATE TABLE wflow_model_groups ( + group_id bigserial NOT NULL, + group_name varchar(50), + sort int2 NOT NULL, + updated timestamp, + CONSTRAINT wflow_model_groups_pri PRIMARY key ("group_id") +); +comment ON TABLE wflow_model_groups IS '流程分组表'; +comment ON COLUMN wflow_model_groups.group_name IS '分组名'; +comment ON COLUMN wflow_model_groups.sort IS '排序'; \ No newline at end of file diff --git a/kingbasesql/wflow_model_historys.sql b/kingbasesql/wflow_model_historys.sql new file mode 100644 index 0000000..02cc687 --- /dev/null +++ b/kingbasesql/wflow_model_historys.sql @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS wflow_model_historys; +CREATE TABLE wflow_model_historys ( + id bigserial NOT NULL, + process_def_id varchar(40), + form_id varchar(40) NOT NULL, + form_name varchar(40) NOT NULL, + version int4 NOT NULL DEFAULT 0, + logo json NOT NULL, + settings json NOT NULL, + group_id int8 NOT NULL, + form_items json NOT NULL, + process json NOT NULL, + remark varchar(255), + created timestamp NULL DEFAULT NULL, + region_code varchar(50), + process_type int4, + node_map text, + CONSTRAINT "wflow_model_historys_pri" PRIMARY KEY ("id") +) +CREATE UNIQUE INDEX form_id_uk ON wflow_model_historys(form_id,version); \ No newline at end of file diff --git a/kingbasesql/wflow_model_perms.sql b/kingbasesql/wflow_model_perms.sql new file mode 100644 index 0000000..3d12a1c --- /dev/null +++ b/kingbasesql/wflow_model_perms.sql @@ -0,0 +1,10 @@ +DROP TABLE IF EXISTS wflow_model_perms; +CREATE TABLE wflow_model_perms ( + id varchar(40) NOT NULL, + form_id varchar(40), + perm_type varchar(5), + org_id int8 NOT NULL, + create_time timestamp, + CONSTRAINT "wflow_model_perms_pri" PRIMARY KEY ("id") +) +CREATE INDEX form_idx ON wflow_model_perms(form_id, perm_type); \ No newline at end of file diff --git a/kingbasesql/wflow_models.sql b/kingbasesql/wflow_models.sql new file mode 100644 index 0000000..d98ffa3 --- /dev/null +++ b/kingbasesql/wflow_models.sql @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS wflow_models; +CREATE TABLE wflow_models ( + form_id varchar(40), + process_def_id varchar(40), + deploy_id varchar(40), + version int4 NOT NULL DEFAULT 1, + form_name varchar(50), + logo text, + settings text, + group_id int8, + form_items text NOT NULL, + process text NOT NULL, + remark varchar(125), + sort int4 NOT NULL, + is_delete BOOL, + is_stop BOOL, + created timestamp, + updated timestamp, + region_code varchar(50), + process_type int4, + node_map text, + CONSTRAINT "wflow_models_pri" PRIMARY KEY ("form_id") +) \ No newline at end of file diff --git a/kingbasesql/wflow_notifys.sql b/kingbasesql/wflow_notifys.sql new file mode 100644 index 0000000..74c791c --- /dev/null +++ b/kingbasesql/wflow_notifys.sql @@ -0,0 +1,14 @@ +DROP TABLE IF EXISTS wflow_notifys; +CREATE TABLE wflow_notifys ( + id varchar(40) NOT NULL, + title varchar(255) NOT NULL, + user_id varchar(50) NOT NULL, + type varchar(10), + instance_id varchar(40), + content varchar(255) NOT NULL, + readed BOOL, + link varchar(255), + create_time timestamp, + CONSTRAINT "wflow_notifys_pri" PRIMARY KEY ("id") +) +CREATE INDEX user_idx ON wflow_notifys(user_id); \ No newline at end of file diff --git a/kingbasesql/wflow_roles.sql b/kingbasesql/wflow_roles.sql new file mode 100644 index 0000000..230292b --- /dev/null +++ b/kingbasesql/wflow_roles.sql @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS wflow_roles; +CREATE TABLE wflow_roles ( + role_id varchar(20) NOT NULL, + role_name varchar(50) NOT NULL, + created timestamp, + CONSTRAINT "wflow_roles_pri" PRIMARY KEY ("role_id") +) + + +INSERT INTO wflow_roles VALUES ('BOOS', '董事长', '2022-09-04 18:22:18'); +INSERT INTO wflow_roles VALUES ('HR', '人事', '2022-09-04 18:22:47'); +INSERT INTO wflow_roles VALUES ('WFLOW_APPROVAL_ADMIN', '审批管理员', '2022-09-04 18:14:16'); \ No newline at end of file diff --git a/kingbasesql/wflow_user_agents.sql b/kingbasesql/wflow_user_agents.sql new file mode 100644 index 0000000..955015d --- /dev/null +++ b/kingbasesql/wflow_user_agents.sql @@ -0,0 +1,9 @@ +DROP TABLE IF EXISTS wflow_user_agents; +CREATE TABLE wflow_user_agents ( + user_id varchar(30) NOT NULL, + agent_user_id varchar(30) NOT NULL, + start_time timestamp NOT NULL, + end_time timestamp NULL DEFAULT NULL, + create_time timestamp NULL DEFAULT NULL, + CONSTRAINT "wflow_user_agents_pri" PRIMARY KEY ("user_id") +) \ No newline at end of file diff --git a/kingbasesql/wflow_user_departments.sql b/kingbasesql/wflow_user_departments.sql new file mode 100644 index 0000000..888970b --- /dev/null +++ b/kingbasesql/wflow_user_departments.sql @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS wflow_user_departments; +CREATE TABLE wflow_user_departments ( + id bigserial, + user_id varchar(20) NOT NULL, + dept_id varchar(20) NOT NULL, + created timestamp, + CONSTRAINT "wflow_user_departments_pri" PRIMARY KEY ("id") +) +CREATE UNIQUE INDEX user_uk ON wflow_user_departments(user_id,dept_id); + +INSERT INTO wflow_user_departments VALUES (1, '381496', '1486186', '2022-07-05 17:42:17'); +INSERT INTO wflow_user_departments VALUES (2, '489564', '689698', '2022-07-05 17:42:34'); +INSERT INTO wflow_user_departments VALUES (3, '568898', '4319868', '2022-07-05 17:42:52'); +INSERT INTO wflow_user_departments VALUES (4, '6418616', '6179678', '2022-07-05 17:43:09'); +INSERT INTO wflow_user_departments VALUES (5, '61769798', '231535', '2022-07-05 17:43:24'); +INSERT INTO wflow_user_departments VALUES (6, '327382', '6179678', '2022-09-04 18:17:55'); +INSERT INTO wflow_user_departments VALUES (7, '8902743', '689698', '2022-09-04 18:19:12'); +INSERT INTO wflow_user_departments VALUES (8, '927438', '4319868', '2022-09-04 18:21:08'); +INSERT INTO wflow_user_departments VALUES (9, '3286432', '35453', '2022-09-25 17:49:19'); +INSERT INTO wflow_user_departments VALUES (10, '3243678', '35453', '2022-09-25 17:50:58'); \ No newline at end of file diff --git a/kingbasesql/wflow_user_roles.sql b/kingbasesql/wflow_user_roles.sql new file mode 100644 index 0000000..dfb7267 --- /dev/null +++ b/kingbasesql/wflow_user_roles.sql @@ -0,0 +1,9 @@ +DROP TABLE IF EXISTS wflow_user_roles; +CREATE TABLE wflow_user_roles ( + id bigserial, + user_id varchar(30), + role_id varchar(20), + created timestamp, + CONSTRAINT "wflow_user_roles_pri" PRIMARY KEY ("id") +) +CREATE UNIQUE INDEX user_role_uk ON wflow_user_roles(user_id,role_id); \ No newline at end of file diff --git a/kingbasesql/wflow_users.sql b/kingbasesql/wflow_users.sql new file mode 100644 index 0000000..580ab1f --- /dev/null +++ b/kingbasesql/wflow_users.sql @@ -0,0 +1,31 @@ +DROP TABLE IF EXISTS wflow_users; +CREATE TABLE wflow_users ( + user_id int8 NOT NULL, + user_name varchar(50) NOT NULL, + pingyin varchar(50), + py varchar(5), + alisa varchar(50), + avatar varchar(1024), + sex BOOL, + entry_date date, + leave_date date, + created timestamp, + updated timestamp, + CONSTRAINT "wflow_users_pri" PRIMARY KEY ("user_id") +) +CREATE INDEX user_id_idx ON wflow_users(user_id); +CREATE INDEX leave_date_idex ON wflow_users(leave_date); + +-- ---------------------------- +-- Records of wflow_users +-- ---------------------------- +INSERT INTO wflow_users VALUES (327382, '李富贵', 'lifugui', 'lfg', NULL, 'https://dd-static.jd.com/ddimg/jfs/t1/188230/26/28979/10654/633026fdEf64e5e84/fc5c07ab3d5eac19.png', b'1', '2022-09-23', NULL, '2022-09-04 18:14:53', '2022-09-25 18:01:41'); +INSERT INTO wflow_users VALUES (381496, '旅人', 'lvren', 'lr', 'lr', 'https://pic.rmb.bdstatic.com/bjh/203726324a891b1946ba223209cb3fee.png', b'1', '2020-09-16', NULL, '2020-09-16 13:33:41', '2022-08-14 11:27:49'); +INSERT INTO wflow_users VALUES (489564, '李秋香', 'liqiuxiang', 'lqx', 'lqx', NULL, b'1', '2020-09-16', NULL, '2020-09-16 13:35:40', '2022-06-27 16:48:25'); +INSERT INTO wflow_users VALUES (568898, '王翠花', 'wangcuihua', 'wch', 'wch', 'https://dd-static.jd.com/ddimg/jfs/t1/204270/25/26917/8646/63302601E2794a142/5b75f81e6d0c4856.png', b'1', '2020-09-16', NULL, '2020-09-16 13:35:01', '2022-09-25 17:57:29'); +INSERT INTO wflow_users VALUES (927438, '隔壁老王', 'gebilaowang', 'gblw', NULL, 'https://dd-static.jd.com/ddimg/jfs/t1/21515/30/18678/11719/633025abEe734404d/c2950fef75e96028.png', b'1', NULL, NULL, '2022-09-04 18:16:51', '2022-09-25 17:56:04'); +INSERT INTO wflow_users VALUES (3243678, '狗剩', 'gousheng', 'gs', NULL, 'https://dd-static.jd.com/ddimg/jfs/t1/177987/31/29200/17909/63302676E5c00167f/13c59e53269e9f67.png', b'1', NULL, NULL, '2022-09-25 17:50:15', '2022-09-25 17:59:25'); +INSERT INTO wflow_users VALUES (3286432, '铁蛋', 'tiedan', 'td', NULL, 'https://dd-static.jd.com/ddimg/jfs/t1/203154/8/26845/14302/633026b7Ea9b381f7/7e7c5d96fcda0d39.png', b'1', NULL, NULL, '2022-09-25 17:48:39', '2022-09-25 18:00:28'); +INSERT INTO wflow_users VALUES (6418616, '张三', 'zhangsan', 'zs', 'zs', NULL, b'1', '2020-09-16', NULL, '2020-09-16 13:32:25', '2022-06-27 16:48:32'); +INSERT INTO wflow_users VALUES (8902743, '张秋梅', 'zhengqiumei', 'zqm', NULL, NULL, b'1', NULL, NULL, '2022-09-04 18:16:12', '2022-09-04 18:16:13'); +INSERT INTO wflow_users VALUES (61769798, '李四', 'lisi', 'ls', 'ls', NULL, b'1', '2019-09-16', NULL, '2020-09-16 13:33:00', '2022-06-27 16:48:34'); diff --git a/kingbasesql/wflowother.sql b/kingbasesql/wflowother.sql new file mode 100644 index 0000000..5371598 --- /dev/null +++ b/kingbasesql/wflowother.sql @@ -0,0 +1,910 @@ +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), + + PROC_INST_ID_ VARCHAR(64), + + ACTION_ VARCHAR(255), + + MESSAGE_ VARCHAR(2000), + + FULL_MSG_ BLOB, + + constraint ACT_HI_COMMENT_PKEY primary KEY(ID_) +); + +create table ACT_HI_DETAIL +( + ID_ VARCHAR(64) not NULL, + TYPE_ VARCHAR(255) not null, + PROC_INST_ID_ VARCHAR(64), + EXECUTION_ID_ VARCHAR(64), + TASK_ID_ VARCHAR(64), + ACT_INST_ID_ VARCHAR(64), + NAME_ VARCHAR(255) not null, + VAR_TYPE_ VARCHAR(64), + REV_ INT4, + TIME_ TIMESTAMP not null, + BYTEARRAY_ID_ VARCHAR(64), + DOUBLE_ NUMERIC(30,10), + LONG_ NUMERIC(19), + TEXT_ VARCHAR(2000), + TEXT2_ VARCHAR(2000), + constraint ACT_HI_DETAIL_PKEY primary KEY(ID_) +); +create index ACT_IDX_HI_DETAIL_ACT_INST + on ACT_HI_DETAIL (ACT_INST_ID_); +create index ACT_IDX_HI_DETAIL_NAME + on ACT_HI_DETAIL (NAME_); +create index ACT_IDX_HI_DETAIL_PROC_INST + on ACT_HI_DETAIL (PROC_INST_ID_); +create index ACT_IDX_HI_DETAIL_TASK_ID + on ACT_HI_DETAIL (TASK_ID_); +create index ACT_IDX_HI_DETAIL_TIME + on ACT_HI_DETAIL (TIME_); + +create table ACT_HI_ENTITYLINK +( + ID_ VARCHAR(64) not null, + LINK_TYPE_ VARCHAR(255), + CREATE_TIME_ TIMESTAMP, + SCOPE_ID_ VARCHAR(255), + SUB_SCOPE_ID_ VARCHAR(255), + SCOPE_TYPE_ VARCHAR(255), + SCOPE_DEFINITION_ID_ VARCHAR(255), + PARENT_ELEMENT_ID_ VARCHAR(255), + REF_SCOPE_ID_ VARCHAR(255), + REF_SCOPE_TYPE_ VARCHAR(255), + REF_SCOPE_DEFINITION_ID_ VARCHAR(255), + ROOT_SCOPE_ID_ VARCHAR(255), + ROOT_SCOPE_TYPE_ VARCHAR(255), + HIERARCHY_TYPE_ VARCHAR(255), + constraint ACT_HI_ENTITYLINK_PKEY primary key(ID_) +); + +create index ACT_IDX_HI_ENT_LNK_REF_SCOPE + on ACT_HI_ENTITYLINK (REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_); +create index ACT_IDX_HI_ENT_LNK_ROOT_SCOPE + on ACT_HI_ENTITYLINK (ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_); +create index ACT_IDX_HI_ENT_LNK_SCOPE + on ACT_HI_ENTITYLINK (SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_); +create index ACT_IDX_HI_ENT_LNK_SCOPE_DEF + on ACT_HI_ENTITYLINK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_); + + +create table ACT_HI_IDENTITYLINK( + ID_ VARCHAR(64) not NULL, + GROUP_ID_ VARCHAR(255), + TYPE_ VARCHAR(255), + USER_ID_ VARCHAR(255), + TASK_ID_ VARCHAR(64), + CREATE_TIME_ TIMESTAMP , + PROC_INST_ID_ VARCHAR(64), + SCOPE_ID_ VARCHAR(255), + SUB_SCOPE_ID_ VARCHAR(255), + SCOPE_TYPE_ VARCHAR(255), + SCOPE_DEFINITION_ID_ VARCHAR(255), + constraint ACT_HI_IDENTITYLINK_PKEY primary KEY(ID_) +); + +create index ACT_IDX_HI_IDENT_LNK_PROCINST + on ACT_HI_IDENTITYLINK (PROC_INST_ID_); +create index ACT_IDX_HI_IDENT_LNK_SCOPE + on ACT_HI_IDENTITYLINK (SCOPE_ID_, SCOPE_TYPE_); +create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF + on ACT_HI_IDENTITYLINK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_); +create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE + on ACT_HI_IDENTITYLINK (SUB_SCOPE_ID_, SCOPE_TYPE_); +create index ACT_IDX_HI_IDENT_LNK_TASK + on ACT_HI_IDENTITYLINK (TASK_ID_); +create index ACT_IDX_HI_IDENT_LNK_USER + on ACT_HI_IDENTITYLINK (USER_ID_); + +create table ACT_HI_PROCINST +( + ID_ VARCHAR(64) not NULL, + REV_ INT4 default 1, + PROC_INST_ID_ VARCHAR(64) not NULL, + BUSINESS_KEY_ VARCHAR(255), + PROC_DEF_ID_ VARCHAR(64) not null, + START_TIME_ TIMESTAMP not null, + END_TIME_ TIMESTAMP, + DURATION_ NUMERIC(12,2), + START_USER_ID_ VARCHAR(255), + START_ACT_ID_ VARCHAR(255), + END_ACT_ID_ VARCHAR(255), + SUPER_PROCESS_INSTANCE_ID_ VARCHAR(64), + DELETE_REASON_ text, + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', + NAME_ VARCHAR(255), + CALLBACK_ID_ VARCHAR(255), + CALLBACK_TYPE_ VARCHAR(255), + REFERENCE_ID_ VARCHAR(255), + REFERENCE_TYPE_ VARCHAR(255), + PROPAGATED_STAGE_INST_ID_ VARCHAR(255), + BUSINESS_STATUS_ VARCHAR(255), + constraint ACT_HI_PROCINST_PKEY primary KEY(ID_) +); +CREATE UNIQUE INDEX ACT_HI_PROCINST_PROC_INST_ID_UK ON ACT_HI_PROCINST(PROC_INST_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 table ACT_HI_TASKINST +( + ID_ VARCHAR(64) not NULL, + REV_ INT4 default 1, + PROC_DEF_ID_ VARCHAR(64), + TASK_DEF_ID_ VARCHAR(64), + TASK_DEF_KEY_ VARCHAR(255), + PROC_INST_ID_ VARCHAR(64), + EXECUTION_ID_ VARCHAR(64), + SCOPE_ID_ VARCHAR(255), + SUB_SCOPE_ID_ VARCHAR(255), + SCOPE_TYPE_ VARCHAR(255), + SCOPE_DEFINITION_ID_ VARCHAR(255), + PROPAGATED_STAGE_INST_ID_ VARCHAR(255), + PARENT_TASK_ID_ VARCHAR(64), + NAME_ VARCHAR(255), + DESCRIPTION_ VARCHAR(2000), + OWNER_ VARCHAR(255), + ASSIGNEE_ VARCHAR(255), + START_TIME_ TIMESTAMP not null, + CLAIM_TIME_ TIMESTAMP, + END_TIME_ TIMESTAMP, + DURATION_ NUMERIC(19), + DELETE_REASON_ VARCHAR(2000), + PRIORITY_ INT4, + DUE_DATE_ TIMESTAMP, + FORM_KEY_ VARCHAR(255), + CATEGORY_ VARCHAR(255), + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', + LAST_UPDATED_TIME_ TIMESTAMP, + constraint ACT_HI_TASKINST_PKEY primary KEY(ID_) +); + + +create index ACT_IDX_HI_TASK_INST_PROCINST + on ACT_HI_TASKINST (PROC_INST_ID_); +create index ACT_IDX_HI_TASK_SCOPE + on ACT_HI_TASKINST (SCOPE_ID_, SCOPE_TYPE_); +create index ACT_IDX_HI_TASK_SCOPE_DEF + on ACT_HI_TASKINST (SCOPE_DEFINITION_ID_, SCOPE_TYPE_); +create index ACT_IDX_HI_TASK_SUB_SCOPE + on ACT_HI_TASKINST (SUB_SCOPE_ID_, SCOPE_TYPE_); + +create table ACT_HI_TSK_LOG ( + ID_ NUMERIC(19) not NULL, + TYPE_ VARCHAR(64), + TASK_ID_ VARCHAR(64) not null, + TIME_STAMP_ TIMESTAMP not null, + USER_ID_ VARCHAR(255), + DATA_ VARCHAR(2000), + EXECUTION_ID_ VARCHAR(64), + PROC_INST_ID_ VARCHAR(64), + PROC_DEF_ID_ VARCHAR(64), + SCOPE_ID_ VARCHAR(255), + SCOPE_DEFINITION_ID_ VARCHAR(255), + SUB_SCOPE_ID_ VARCHAR(255), + SCOPE_TYPE_ VARCHAR(255), + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', + constraint ACT_HI_TSK_LOG_PKEY primary KEY(ID_) +); + +create table ACT_HI_VARINST +( + ID_ VARCHAR(64) not NULL, + REV_ INT4 default 1, + PROC_INST_ID_ VARCHAR(64), + EXECUTION_ID_ VARCHAR(64), + TASK_ID_ VARCHAR(64), + NAME_ VARCHAR(255) not null, + VAR_TYPE_ VARCHAR(100), + SCOPE_ID_ VARCHAR(255), + SUB_SCOPE_ID_ VARCHAR(255), + SCOPE_TYPE_ VARCHAR(255), + BYTEARRAY_ID_ VARCHAR(64), + DOUBLE_ NUMERIC(12,2), + LONG_ NUMERIC(12,2), + TEXT_ text, + TEXT2_ text, + CREATE_TIME_ TIMESTAMP, + LAST_UPDATED_TIME_ TIMESTAMP, + constraint ACT_HI_VARINST_PKEY primary KEY(ID_) +); + +create index ACT_IDX_HI_PROCVAR_EX + on ACT_HI_VARINST (EXECUTION_ID_); +create index ACT_IDX_HI_PROCVAR_NAME_TYPE + on ACT_HI_VARINST (NAME_, VAR_TYPE_); +create index ACT_IDX_HI_PROCVAR_PROC_INST + on ACT_HI_VARINST (PROC_INST_ID_); +create index ACT_IDX_HI_PROCVAR_TASK_ID + on ACT_HI_VARINST (TASK_ID_); +create index ACT_IDX_HI_VAR_SCOPE_ID_TYPE + on ACT_HI_VARINST (SCOPE_ID_, SCOPE_TYPE_); +create index ACT_IDX_HI_VAR_SUB_ID_TYPE + on ACT_HI_VARINST (SUB_SCOPE_ID_, SCOPE_TYPE_); + +create table ACT_PROCDEF_INFO ( + ID_ VARCHAR(64) not NULL, + PROC_DEF_ID_ VARCHAR(64) not null, + REV_ INT4, + INFO_JSON_ID_ VARCHAR(64), + constraint ACT_PROCDEF_INFO_PKEY + primary KEY(ID_) +); + +create index ACT_IDX_PROCDEF_INFO_JSON + on ACT_PROCDEF_INFO (INFO_JSON_ID_); +create index ACT_IDX_PROCDEF_INFO_PROC + on ACT_PROCDEF_INFO (PROC_DEF_ID_); + +create table ACT_RE_DEPLOYMENT +( + ID_ VARCHAR(64) not NULL, + NAME_ VARCHAR(255), + CATEGORY_ VARCHAR(255), + KEY_ VARCHAR(255), + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', + DEPLOY_TIME_ TIMESTAMP , + DERIVED_FROM_ VARCHAR(64), + DERIVED_FROM_ROOT_ VARCHAR(64), + PARENT_DEPLOYMENT_ID_ VARCHAR(255), + ENGINE_VERSION_ VARCHAR(255), + constraint ACT_RE_DEPLOYMENT_PKEY + primary KEY(ID_) +); + +create table ACT_RE_MODEL +( + ID_ VARCHAR(64) not NULL, + REV_ INT4, + NAME_ VARCHAR(255), + KEY_ VARCHAR(255), + CATEGORY_ VARCHAR(255), + CREATE_TIME_ TIMESTAMP, + LAST_UPDATE_TIME_ TIMESTAMP, + VERSION_ INT4, + META_INFO_ VARCHAR(2000), + DEPLOYMENT_ID_ VARCHAR(64), + EDITOR_SOURCE_VALUE_ID_ VARCHAR(64), + EDITOR_SOURCE_EXTRA_VALUE_ID_ VARCHAR(64), + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', + constraint ACT_RE_MODEL_PKEY + primary key(ID_) +); + +create index ACT_IDX_MODEL_DEPLOYMENT + on ACT_RE_MODEL (DEPLOYMENT_ID_); +create index ACT_IDX_MODEL_SOURCE + on ACT_RE_MODEL (EDITOR_SOURCE_VALUE_ID_); +create index ACT_IDX_MODEL_SOURCE_EXTRA + on ACT_RE_MODEL (EDITOR_SOURCE_EXTRA_VALUE_ID_); + +create table ACT_RE_PROCDEF +( + ID_ VARCHAR(64) not NULL, + REV_ INT4, + CATEGORY_ VARCHAR(255), + NAME_ VARCHAR(255), + KEY_ VARCHAR(255) not null, + VERSION_ INT4 not null, + DEPLOYMENT_ID_ VARCHAR(64), + RESOURCE_NAME_ VARCHAR(2000), + DGRM_RESOURCE_NAME_ VARCHAR(4000), + DESCRIPTION_ VARCHAR(2000), + HAS_START_FORM_KEY_ NUMERIC(1), + HAS_GRAPHICAL_NOTATION_ NUMERIC(1), + SUSPENSION_STATE_ INT4, + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', + DERIVED_FROM_ VARCHAR(64), + DERIVED_FROM_ROOT_ VARCHAR(64), + DERIVED_VERSION_ INT4 default 0 not null, + ENGINE_VERSION_ VARCHAR(255), + constraint ACT_RE_PROCDEF_PKEY primary key(ID_) +); +create unique index ACT_UNIQ_PROCDEF_UK on ACT_RE_PROCDEF(KEY_, VERSION_, DERIVED_VERSION_, TENANT_ID_); + +create table ACT_RU_ACTINST +( + ID_ VARCHAR(64) not NULL, + REV_ INT4 default 1, + 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), + CALL_PROC_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_ NUMERIC(12,2), + TRANSACTION_ORDER_ INT4, + DELETE_REASON_ VARCHAR(2000), + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', + constraint ACT_RU_ACTINST_PKEY primary key(ID_) +); + +create index ACT_IDX_RU_ACTI_END + on ACT_RU_ACTINST (END_TIME_); +create index ACT_IDX_RU_ACTI_EXEC + on ACT_RU_ACTINST (EXECUTION_ID_); +create index ACT_IDX_RU_ACTI_EXEC_ACT + on ACT_RU_ACTINST (EXECUTION_ID_, ACT_ID_); +create index ACT_IDX_RU_ACTI_PROC + on ACT_RU_ACTINST (PROC_INST_ID_); +create index ACT_IDX_RU_ACTI_PROC_ACT + on ACT_RU_ACTINST (PROC_INST_ID_, ACT_ID_); +create index ACT_IDX_RU_ACTI_START + on ACT_RU_ACTINST (START_TIME_); +create index ACT_IDX_RU_ACTI_TASK + on ACT_RU_ACTINST (TASK_ID_); + +create table ACT_RU_DEADLETTER_JOB +( + ID_ VARCHAR(64) not NULL, + REV_ INT4, + CATEGORY_ VARCHAR(255), + TYPE_ VARCHAR(255) not null, + EXCLUSIVE_ BOOL, + EXECUTION_ID_ VARCHAR(64), + PROCESS_INSTANCE_ID_ VARCHAR(64), + PROC_DEF_ID_ VARCHAR(64), + ELEMENT_ID_ VARCHAR(255), + ELEMENT_NAME_ VARCHAR(255), + SCOPE_ID_ VARCHAR(255), + SUB_SCOPE_ID_ VARCHAR(255), + SCOPE_TYPE_ VARCHAR(255), + SCOPE_DEFINITION_ID_ VARCHAR(255), + CORRELATION_ID_ VARCHAR(255), + EXCEPTION_STACK_ID_ VARCHAR(64), + EXCEPTION_MSG_ VARCHAR(4000), + DUEDATE_ TIMESTAMP, + REPEAT_ VARCHAR(255), + HANDLER_TYPE_ VARCHAR(255), + HANDLER_CFG_ text, + CUSTOM_VALUES_ID_ VARCHAR(12), + CREATE_TIME_ TIMESTAMP, + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', + constraint ACT_RU_DEADLETTER_JOB_PKEY primary KEY(ID_) +); + +create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID + on ACT_RU_DEADLETTER_JOB (CORRELATION_ID_); +create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID + on ACT_RU_DEADLETTER_JOB (CUSTOM_VALUES_ID_); +create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID + on ACT_RU_DEADLETTER_JOB (EXCEPTION_STACK_ID_); +create index ACT_IDX_DJOB_EXECUTION_ID + on ACT_RU_DEADLETTER_JOB (EXECUTION_ID_); +create index ACT_IDX_DJOB_PROC_DEF_ID + on ACT_RU_DEADLETTER_JOB (PROC_DEF_ID_); +create index ACT_IDX_DJOB_PROC_INST_ID + on ACT_RU_DEADLETTER_JOB (PROCESS_INSTANCE_ID_); +create index ACT_IDX_DJOB_SCOPE + on ACT_RU_DEADLETTER_JOB (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_DJOB_SUB_SCOPE + on ACT_RU_DEADLETTER_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_); + +create table ACT_RU_ENTITYLINK +( + ID_ VARCHAR(64) not null, + REV_ INT4, + CREATE_TIME_ TIMESTAMP, + LINK_TYPE_ VARCHAR(255), + SCOPE_ID_ VARCHAR(255), + SUB_SCOPE_ID_ VARCHAR(255), + SCOPE_TYPE_ VARCHAR(255), + SCOPE_DEFINITION_ID_ VARCHAR(255), + PARENT_ELEMENT_ID_ VARCHAR(255), + REF_SCOPE_ID_ VARCHAR(255), + REF_SCOPE_TYPE_ VARCHAR(255), + REF_SCOPE_DEFINITION_ID_ VARCHAR(255), + ROOT_SCOPE_ID_ VARCHAR(255), + ROOT_SCOPE_TYPE_ VARCHAR(255), + HIERARCHY_TYPE_ VARCHAR(255) +); +create index ACT_IDX_ENT_LNK_REF_SCOPE + on ACT_RU_ENTITYLINK (REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_); +create index ACT_IDX_ENT_LNK_ROOT_SCOPE + on ACT_RU_ENTITYLINK (ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_); +create index ACT_IDX_ENT_LNK_SCOPE + on ACT_RU_ENTITYLINK (SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_); +create index ACT_IDX_ENT_LNK_SCOPE_DEF + on ACT_RU_ENTITYLINK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_); + +-- auto-generated definition +create table ACT_RU_EVENT_SUBSCR +( + ID_ VARCHAR(64) not null + constraint ACT_RU_EVENT_SUBSCR_PKEY + primary key, + REV_ INT4, + EVENT_TYPE_ VARCHAR(255) not null, + EVENT_NAME_ VARCHAR(255), + EXECUTION_ID_ VARCHAR(64), + PROC_INST_ID_ VARCHAR(64), + ACTIVITY_ID_ VARCHAR(64), + CONFIGURATION_ VARCHAR(255), + CREATED_ TIMESTAMP, + PROC_DEF_ID_ VARCHAR(64), + SUB_SCOPE_ID_ VARCHAR(64), + SCOPE_ID_ VARCHAR(64), + SCOPE_DEFINITION_ID_ VARCHAR(64), + SCOPE_TYPE_ VARCHAR(64), + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING' +); + +create index ACT_IDX_EVENT_SUBSCR_CONFIG_ + on ACT_RU_EVENT_SUBSCR (CONFIGURATION_); + +-- auto-generated definition +create table ACT_RU_EXECUTION +( + ID_ VARCHAR(64) not null + constraint ACT_RU_EXECUTION_PKEY + primary key, + REV_ INT4, + PROC_INST_ID_ VARCHAR(64), + BUSINESS_KEY_ VARCHAR(255), + PARENT_ID_ VARCHAR(64), + PROC_DEF_ID_ VARCHAR(64), + SUPER_EXEC_ VARCHAR(64), + ROOT_PROC_INST_ID_ VARCHAR(64), + ACT_ID_ VARCHAR(255), + IS_ACTIVE_ NUMERIC(1), + IS_CONCURRENT_ NUMERIC(1), + IS_SCOPE_ NUMERIC(1), + IS_EVENT_SCOPE_ NUMERIC(1), + IS_MI_ROOT_ NUMERIC(1), + SUSPENSION_STATE_ INT4, + CACHED_ENT_STATE_ INT4, + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', + NAME_ VARCHAR(255), + START_ACT_ID_ VARCHAR(255), + START_TIME_ TIMESTAMP, + START_USER_ID_ VARCHAR(255), + LOCK_TIME_ TIMESTAMP, + LOCK_OWNER_ VARCHAR(255), + IS_COUNT_ENABLED_ NUMERIC(12,2), + EVT_SUBSCR_COUNT_ INT4, + TASK_COUNT_ INT4, + JOB_COUNT_ INT4, + TIMER_JOB_COUNT_ INT4, + SUSP_JOB_COUNT_ INT4, + DEADLETTER_JOB_COUNT_ INT4, + EXTERNAL_WORKER_JOB_COUNT_ INT4, + VAR_COUNT_ INT4, + ID_LINK_COUNT_ INT4, + CALLBACK_ID_ VARCHAR(255), + CALLBACK_TYPE_ VARCHAR(255), + REFERENCE_ID_ VARCHAR(255), + REFERENCE_TYPE_ VARCHAR(255), + PROPAGATED_STAGE_INST_ID_ VARCHAR(255), + BUSINESS_STATUS_ VARCHAR(255) +); + +create index ACT_IDX_EXEC_BUSKEY + on ACT_RU_EXECUTION (BUSINESS_KEY_); + +create index ACT_IDX_EXEC_REF_ID_ + on ACT_RU_EXECUTION (REFERENCE_ID_); + +create index ACT_IDX_EXEC_ROOT + on ACT_RU_EXECUTION (ROOT_PROC_INST_ID_); + +create index ACT_IDX_EXE_PARENT + on ACT_RU_EXECUTION (PARENT_ID_); + +create index ACT_IDX_EXE_PROCDEF + on ACT_RU_EXECUTION (PROC_DEF_ID_); + +create index ACT_IDX_EXE_PROCINST + on ACT_RU_EXECUTION (PROC_INST_ID_); + +create index ACT_IDX_EXE_SUPER + on ACT_RU_EXECUTION (SUPER_EXEC_); + +create table ACT_RU_EXTERNAL_JOB +( + ID_ VARCHAR(64) not null + constraint ACT_RU_EXTERNAL_JOB_PKEY + primary key, + REV_ INT4, + CATEGORY_ VARCHAR(255), + TYPE_ VARCHAR(255) not null, + LOCK_EXP_TIME_ TIMESTAMP, + LOCK_OWNER_ VARCHAR(255), + EXCLUSIVE_ BOOL, + 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_ INT4, + EXCEPTION_STACK_ID_ VARCHAR(64), + EXCEPTION_MSG_ text, + DUEDATE_ TIMESTAMP, + REPEAT_ VARCHAR(255), + HANDLER_TYPE_ VARCHAR(255), + HANDLER_CFG_ text, + CUSTOM_VALUES_ID_ VARCHAR(64), + CREATE_TIME_ TIMESTAMP, + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING' +); + +create index ACT_IDX_EJOB_SCOPE + on ACT_RU_EXTERNAL_JOB (SCOPE_ID_, SCOPE_TYPE_); + +create index ACT_IDX_EJOB_SCOPE_DEF + on ACT_RU_EXTERNAL_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_); + +create index ACT_IDX_EJOB_SUB_SCOPE + on ACT_RU_EXTERNAL_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_); + +create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID + on ACT_RU_EXTERNAL_JOB (CORRELATION_ID_); + +create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID + on ACT_RU_EXTERNAL_JOB (CUSTOM_VALUES_ID_); + +create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID + on ACT_RU_EXTERNAL_JOB (EXCEPTION_STACK_ID_); + +create table ACT_RU_HISTORY_JOB +( + ID_ VARCHAR(64) not null + constraint ACT_RU_HISTORY_JOB_PKEY + primary key, + REV_ INT4, + LOCK_EXP_TIME_ TIMESTAMP, + LOCK_OWNER_ VARCHAR(255), + RETRIES_ INT4, + EXCEPTION_STACK_ID_ VARCHAR(64), + EXCEPTION_MSG_ VARCHAR(4000), + HANDLER_TYPE_ VARCHAR(255), + HANDLER_CFG_ VARCHAR(4000), + CUSTOM_VALUES_ID_ VARCHAR(64), + ADV_HANDLER_CFG_ID_ VARCHAR(64), + CREATE_TIME_ TIMESTAMP, + SCOPE_TYPE_ VARCHAR(255), + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING' +); + +create table ACT_RU_IDENTITYLINK +( + ID_ VARCHAR(64) not null + constraint ACT_RU_IDENTITYLINK_PKEY + primary key, + REV_ INT4, + GROUP_ID_ VARCHAR(255), + TYPE_ VARCHAR(255), + USER_ID_ VARCHAR(255), + TASK_ID_ VARCHAR(64), + PROC_INST_ID_ VARCHAR(64), + PROC_DEF_ID_ VARCHAR(64), + SCOPE_ID_ VARCHAR(255), + SUB_SCOPE_ID_ VARCHAR(255), + SCOPE_TYPE_ VARCHAR(255), + SCOPE_DEFINITION_ID_ VARCHAR(255) +); + +create index ACT_IDX_ATHRZ_PROCEDEF + on ACT_RU_IDENTITYLINK (PROC_DEF_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_); + +create index ACT_IDX_IDENT_LNK_SUB_SCOPE + on ACT_RU_IDENTITYLINK (SUB_SCOPE_ID_, SCOPE_TYPE_); + +create index ACT_IDX_IDENT_LNK_USER + on ACT_RU_IDENTITYLINK (USER_ID_); + +create index ACT_IDX_IDL_PROCINST + on ACT_RU_IDENTITYLINK (PROC_INST_ID_); + +create index ACT_IDX_TSKASS_TASK + on ACT_RU_IDENTITYLINK (TASK_ID_); + +create table ACT_RU_JOB +( + ID_ VARCHAR(64) not null + constraint ACT_RU_JOB_PKEY + primary key, + REV_ INT4, + CATEGORY_ VARCHAR(255), + TYPE_ VARCHAR(255) not null, + LOCK_EXP_TIME_ TIMESTAMP, + LOCK_OWNER_ VARCHAR(255), + EXCLUSIVE_ BOOL, + 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_ INT4, + EXCEPTION_STACK_ID_ VARCHAR(64), + EXCEPTION_MSG_ text, + DUEDATE_ TIMESTAMP, + REPEAT_ VARCHAR(255), + HANDLER_TYPE_ VARCHAR(255), + HANDLER_CFG_ VARCHAR(4000), + CUSTOM_VALUES_ID_ VARCHAR(64), + CREATE_TIME_ TIMESTAMP, + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING' +); + +create index ACT_IDX_JOB_CORRELATION_ID + on ACT_RU_JOB (CORRELATION_ID_); + +create index ACT_IDX_JOB_CUSTOM_VALUES_ID + on ACT_RU_JOB (CUSTOM_VALUES_ID_); + +create index ACT_IDX_JOB_EXCEPTION_STACK_ID + on ACT_RU_JOB (EXCEPTION_STACK_ID_); + +create index ACT_IDX_JOB_EXECUTION_ID + on ACT_RU_JOB (EXECUTION_ID_); + +create index ACT_IDX_JOB_PROC_DEF_ID + on ACT_RU_JOB (PROC_DEF_ID_); + +create index ACT_IDX_JOB_PROC_INST_ID + on ACT_RU_JOB (PROCESS_INSTANCE_ID_); + +create index ACT_IDX_JOB_SCOPE + on ACT_RU_JOB (SCOPE_ID_, SCOPE_TYPE_); + +create index ACT_IDX_JOB_SCOPE_DEF + on ACT_RU_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_); + +create index ACT_IDX_JOB_SUB_SCOPE + on ACT_RU_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_); + +create table ACT_RU_SUSPENDED_JOB +( + ID_ VARCHAR(64) not null + constraint ACT_RU_SUSPENDED_JOB_PKEY + primary key, + REV_ INT4, + CATEGORY_ VARCHAR(255), + TYPE_ VARCHAR(255) not null, + EXCLUSIVE_ BOOL, + 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_ INT4, + EXCEPTION_STACK_ID_ VARCHAR(64), + EXCEPTION_MSG_ VARCHAR(4000), + DUEDATE_ TIMESTAMP, + REPEAT_ VARCHAR(255), + HANDLER_TYPE_ VARCHAR(255), + HANDLER_CFG_ VARCHAR(4000), + CUSTOM_VALUES_ID_ VARCHAR(64), + CREATE_TIME_ TIMESTAMP, + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING' +); + +create index ACT_IDX_SJOB_EXECUTION_ID + on ACT_RU_SUSPENDED_JOB (EXECUTION_ID_); + +create index ACT_IDX_SJOB_PROC_DEF_ID + on ACT_RU_SUSPENDED_JOB (PROC_DEF_ID_); + +create index ACT_IDX_SJOB_PROC_INST_ID + on ACT_RU_SUSPENDED_JOB (PROCESS_INSTANCE_ID_); + +create index ACT_IDX_SJOB_SCOPE + on ACT_RU_SUSPENDED_JOB (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_SJOB_SUB_SCOPE + on ACT_RU_SUSPENDED_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_); + +create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID + on ACT_RU_SUSPENDED_JOB (CORRELATION_ID_); + +create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID + on ACT_RU_SUSPENDED_JOB (CUSTOM_VALUES_ID_); + +create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID + on ACT_RU_SUSPENDED_JOB (EXCEPTION_STACK_ID_); + +create table ACT_RU_TASK +( + ID_ VARCHAR(64) not null + constraint ACT_RU_TASK_PKEY + primary key, + REV_ INT4, + EXECUTION_ID_ VARCHAR(64), + PROC_INST_ID_ VARCHAR(64), + PROC_DEF_ID_ VARCHAR(64), + TASK_DEF_ID_ VARCHAR(64), + SCOPE_ID_ VARCHAR(255), + SUB_SCOPE_ID_ VARCHAR(255), + SCOPE_TYPE_ VARCHAR(255), + SCOPE_DEFINITION_ID_ VARCHAR(255), + PROPAGATED_STAGE_INST_ID_ VARCHAR(255), + NAME_ VARCHAR(255), + PARENT_TASK_ID_ VARCHAR(64), + DESCRIPTION_ VARCHAR(2000), + TASK_DEF_KEY_ VARCHAR(255), + OWNER_ VARCHAR(255), + ASSIGNEE_ VARCHAR(255), + DELEGATION_ VARCHAR(64), + PRIORITY_ INT4, + CREATE_TIME_ TIMESTAMP , + DUE_DATE_ TIMESTAMP, + CATEGORY_ VARCHAR(255), + SUSPENSION_STATE_ INT4, + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', + FORM_KEY_ VARCHAR(255), + CLAIM_TIME_ TIMESTAMP, + IS_COUNT_ENABLED_ NUMERIC(12,2), + VAR_COUNT_ INT4, + ID_LINK_COUNT_ INT4, + SUB_TASK_COUNT_ INT4 +); + +create index ACT_IDX_TASK_CREATE + on ACT_RU_TASK (CREATE_TIME_); + +create index ACT_IDX_TASK_EXEC + on ACT_RU_TASK (EXECUTION_ID_); + +create index ACT_IDX_TASK_PROCDEF + on ACT_RU_TASK (PROC_DEF_ID_); + +create index ACT_IDX_TASK_PROCINST + on ACT_RU_TASK (PROC_INST_ID_); + +create index ACT_IDX_TASK_SCOPE + on ACT_RU_TASK (SCOPE_ID_, SCOPE_TYPE_); + +create index ACT_IDX_TASK_SCOPE_DEF + on ACT_RU_TASK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_); + +create index ACT_IDX_TASK_SUB_SCOPE + on ACT_RU_TASK (SUB_SCOPE_ID_, SCOPE_TYPE_); + +create table ACT_RU_TIMER_JOB +( + ID_ VARCHAR(64) not null + constraint ACT_RU_TIMER_JOB_PKEY + primary key, + REV_ INT4, + CATEGORY_ VARCHAR(255), + TYPE_ VARCHAR(255) not null, + LOCK_EXP_TIME_ TIMESTAMP, + LOCK_OWNER_ VARCHAR(255), + EXCLUSIVE_ BOOL, + 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_ INT4, + EXCEPTION_STACK_ID_ VARCHAR(64), + EXCEPTION_MSG_ VARCHAR(4000), + DUEDATE_ TIMESTAMP, + REPEAT_ VARCHAR(255), + HANDLER_TYPE_ VARCHAR(255), + HANDLER_CFG_ VARCHAR(4000), + CUSTOM_VALUES_ID_ VARCHAR(64), + CREATE_TIME_ TIMESTAMP, + TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING' +); + +create index ACT_IDX_TIMER_JOB_CORRELATION_ID + on ACT_RU_TIMER_JOB (CORRELATION_ID_); + +create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID + on ACT_RU_TIMER_JOB (CUSTOM_VALUES_ID_); + +create index ACT_IDX_TIMER_JOB_DUEDATE + on ACT_RU_TIMER_JOB (DUEDATE_); + +create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID + on ACT_RU_TIMER_JOB (EXCEPTION_STACK_ID_); + +create index ACT_IDX_TJOB_EXECUTION_ID + on ACT_RU_TIMER_JOB (EXECUTION_ID_); + +create index ACT_IDX_TJOB_PROC_DEF_ID + on ACT_RU_TIMER_JOB (PROC_DEF_ID_); + +create index ACT_IDX_TJOB_PROC_INST_ID + on ACT_RU_TIMER_JOB (PROCESS_INSTANCE_ID_); + +create index ACT_IDX_TJOB_SCOPE + on ACT_RU_TIMER_JOB (SCOPE_ID_, SCOPE_TYPE_); + +create index ACT_IDX_TJOB_SCOPE_DEF + on ACT_RU_TIMER_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_); + +create index ACT_IDX_TJOB_SUB_SCOPE + on ACT_RU_TIMER_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_); + +create table ACT_RU_VARIABLE +( + ID_ VARCHAR(64) not null + constraint ACT_RU_VARIABLE_PKEY + primary key, + REV_ INT4, + TYPE_ VARCHAR(255) not null, + NAME_ VARCHAR(255) not null, + EXECUTION_ID_ VARCHAR(64), + PROC_INST_ID_ VARCHAR(64), + TASK_ID_ VARCHAR(64), + SCOPE_ID_ VARCHAR(255), + SUB_SCOPE_ID_ VARCHAR(255), + SCOPE_TYPE_ VARCHAR(255), + BYTEARRAY_ID_ VARCHAR(64), + DOUBLE_ NUMERIC(12,2), + LONG_ NUMERIC(12,2), + TEXT_ VARCHAR(2000), + TEXT2_ VARCHAR(2000) +); + +create index ACT_IDX_RU_VAR_SCOPE_ID_TYPE + on ACT_RU_VARIABLE (SCOPE_ID_, SCOPE_TYPE_); + +create index ACT_IDX_RU_VAR_SUB_ID_TYPE + on ACT_RU_VARIABLE (SUB_SCOPE_ID_, SCOPE_TYPE_); + +create index ACT_IDX_VARIABLE_TASK_ID + on ACT_RU_VARIABLE (TASK_ID_); + +create index ACT_IDX_VAR_BYTEARRAY + on ACT_RU_VARIABLE (BYTEARRAY_ID_); + +create index ACT_IDX_VAR_EXE + on ACT_RU_VARIABLE (EXECUTION_ID_); + +create index ACT_IDX_VAR_PROCINST + on ACT_RU_VARIABLE (PROC_INST_ID_); + diff --git a/pgsql/FLW_EV_DATABASECHANGELOGLOCK.sql b/pgsql/FLW_EV_DATABASECHANGELOGLOCK.sql deleted file mode 100644 index ad471a8..0000000 --- a/pgsql/FLW_EV_DATABASECHANGELOGLOCK.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE PUBLIC.FLW_EV_DATABASECHANGELOGLOCK ( - ID int8 NOT NULL, - LOCKED bool NOT NULL, - LOCKGRANTED timestamp, - LOCKEDBY VARCHAR(255), - CONSTRAINT FLW_EV_DATABASECHANGELOGLOCK_PK PRIMARY KEY (ID) -); \ No newline at end of file diff --git a/pgsql/deploy.sql b/pgsql/deploy.sql deleted file mode 100644 index 5987b05..0000000 --- a/pgsql/deploy.sql +++ /dev/null @@ -1,56 +0,0 @@ -CREATE TABLE PUBLIC.FLW_EVENT_DEPLOYMENT ( - ID_ VARCHAR(255) NOT NULL, - NAME_ VARCHAR(255), - CATEGORY_ VARCHAR(255), - DEPLOY_TIME_ timestamp, - TENANT_ID_ VARCHAR(255), - PARENT_DEPLOYMENT_ID_ VARCHAR(255), - CONSTRAINT FLW_EVENT_DEPLOYMENT_PK PRIMARY KEY (ID_) -); - -create table PUBLIC.FLW_CHANNEL_DEFINITION -( - ID_ VARCHAR(255) not null - constraint "flw_channel_definition_pk" - primary key, - NAME_ VARCHAR(255), - VERSION_ INT4, - KEY_ VARCHAR(255), - CATEGORY_ VARCHAR(255), - DEPLOYMENT_ID_ VARCHAR(255), - CREATE_TIME_ TIMESTAMP, - TENANT_ID_ VARCHAR(255), - RESOURCE_NAME_ VARCHAR(255), - DESCRIPTION_ VARCHAR(255), - TYPE_ VARCHAR(255), - IMPLEMENTATION_ VARCHAR(255) -); -CREATE UNIQUE INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_,VERSION_,TENANT_ID_); - - -create table FLW_EVENT_DEFINITION -( - ID_ VARCHAR(255) not null - constraint "flw_event_definition_pk" - primary key, - NAME_ VARCHAR(255), - VERSION_ INT4, - KEY_ VARCHAR(255), - CATEGORY_ VARCHAR(255), - DEPLOYMENT_ID_ VARCHAR(255), - TENANT_ID_ VARCHAR(255), - RESOURCE_NAME_ VARCHAR(255), - DESCRIPTION_ VARCHAR(255) -); -CREATE UNIQUE INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_,VERSION_,TENANT_ID_); - - -create table FLW_EVENT_RESOURCE -( - ID_ VARCHAR(255) not null - constraint "flw_event_resource_pk" - primary key, - NAME_ VARCHAR(255), - DEPLOYMENT_ID_ VARCHAR(255), - RESOURCE_BYTES_ BLOB -); diff --git a/pgsql/flw_ev_databasechangelog.sql b/pgsql/flw_ev_databasechangelog.sql deleted file mode 100644 index 8cb91ff..0000000 --- a/pgsql/flw_ev_databasechangelog.sql +++ /dev/null @@ -1,18 +0,0 @@ --- PUBLIC."flw_ev_databasechangelog" definition - -CREATE TABLE PUBLIC."FLW_EV_DATABASECHANGELOG" ( - ID VARCHAR(255) NOT NULL, - AUTHOR VARCHAR(255) NOT NULL, - FILENAME VARCHAR(255) NOT NULL, - DATEEXECUTED timestamp, - ORDEREXECUTED int8, - EXECTYPE VARCHAR(10), - MD5SUM VARCHAR(35), - DESCRIPTION VARCHAR(255), - COMMENTS VARCHAR(255), - TAG VARCHAR(255), - LIQUIBASE VARCHAR(20), - CONTEXTS VARCHAR(255), - LABELS VARCHAR(255), - DEPLOYMENT_ID VARCHAR(10) -); \ No newline at end of file diff --git a/pgsql/nd_wlfow_org_models.sql b/pgsql/nd_wlfow_org_models.sql deleted file mode 100644 index c44bae3..0000000 --- a/pgsql/nd_wlfow_org_models.sql +++ /dev/null @@ -1,28 +0,0 @@ -DROP TABLE IF EXISTS nd_wflow_org_models; -CREATE TABLE nd_wflow_org_models ( - process_def_id varchar(40), - process_def_name varchar(255), - deploy_id varchar(255), - version int4 NOT NULL DEFAULT 1, - org_code varchar(50), - org_name varchar(255), - settings text, - group_id int8, - form_items text, - process text, - remark varchar(125), - sort int4 not null default 0, - is_delete BOOL not null default false, - is_stop BOOL not null default false, - created timestamp, - updated timestamp, - type varchar(125), - CONSTRAINT "nd_wflow_org_models_pri" PRIMARY KEY ("process_def_id") -); - -comment on column nd_wflow_org_models.process_def_id is '流程配置id'; -comment on column nd_wflow_org_models.process_def_name is '流程配置名字'; -comment on column nd_wflow_org_models.version is '版本号'; -comment on column nd_wflow_org_models.process is '流程内容'; -comment on column nd_wflow_org_models.remark is '备注'; -comment on column nd_wflow_org_models.type is '类型 DEFAULT默认 SEAL盖章 OTHER其它'; diff --git a/pgsql/nd_wlfow_org_models_historys.sql b/pgsql/nd_wlfow_org_models_historys.sql deleted file mode 100644 index d70ee4d..0000000 --- a/pgsql/nd_wlfow_org_models_historys.sql +++ /dev/null @@ -1,28 +0,0 @@ -DROP TABLE IF EXISTS nd_wflow_org_model_historys; -CREATE TABLE nd_wflow_org_model_historys ( - id bigserial, - process_def_id varchar(40), - process_def_name varchar(255), - deploy_id varchar(255), - version int4 NOT NULL DEFAULT 1, - org_code varchar(50), - org_name varchar(255), - settings text, - group_id int8, - form_items text, - process text, - remark varchar(125), - sort int4 not null default 0, - is_delete BOOL not null default false, - is_stop BOOL not null default false, - created timestamp, - updated timestamp, - type varchar(125), - CONSTRAINT "nd_wflow_org_model_historys_pri" PRIMARY KEY ("id") -); -comment on column nd_wflow_org_models.process_def_id is '流程配置id'; -comment on column nd_wflow_org_models.process_def_name is '流程配置名字'; -comment on column nd_wflow_org_models.version is '版本号'; -comment on column nd_wflow_org_models.process is '流程内容'; -comment on column nd_wflow_org_models.remark is '备注'; -comment on column nd_wflow_org_models.type is '类型 DEFAULT默认 SEAL盖章 OTHER其它'; diff --git a/pgsql/wflow_cc_tasks.sql b/pgsql/wflow_cc_tasks.sql deleted file mode 100644 index 4dd24c0..0000000 --- a/pgsql/wflow_cc_tasks.sql +++ /dev/null @@ -1,13 +0,0 @@ -DROP TABLE IF EXISTS wflow_cc_tasks; -CREATE TABLE wflow_cc_tasks ( - id bigserial NOT NULL, - instance_id varchar(40) NOT NULL, - user_id varchar(30) NOT NULL, - node_id varchar(40) NOT NULL, - node_name varchar(50) NOT NULL, - create_time timestamp NOT NULL, - CONSTRAINT "wflow_cc_tasks_pri" PRIMARY KEY ("id") -) -CREATE INDEX instance_idx ON wflow_cc_tasks(instance_id, user_id); -comment on TABLE wflow_cc_tasks IS '抄送任务表'; -comment on column wflow_cc_tasks.id IS '主键id'; \ No newline at end of file diff --git a/pgsql/wflow_departments.sql b/pgsql/wflow_departments.sql deleted file mode 100644 index 8d84893..0000000 --- a/pgsql/wflow_departments.sql +++ /dev/null @@ -1,27 +0,0 @@ -DROP TABLE IF EXISTS wflow_departments; -CREATE TABLE wflow_departments ( - id bigserial NOT NULL, - dept_name varchar(255), - leader varchar(255), - parent_id int8, - created timestamp, - updated timestamp, - CONSTRAINT "wflow_departments_pri" PRIMARY KEY ("id") -) -CREATE INDEX parent_idx ON wflow_departments(parent_id); -CREATE INDEX leader_idx ON wflow_departments(leader); -comment ON TABLE wflow_departments IS '部门表'; -comment ON column wflow_departments.id IS '主键'; -comment ON column wflow_departments.dept_name IS '部门名'; -comment ON column wflow_departments.leader IS '部门主管'; -comment ON column wflow_departments.parent_id IS '父部门id'; --- ---------------------------- --- Records of wflow_departments --- ---------------------------- -INSERT INTO wflow_departments VALUES (35453, '业务部', '3286432', 4319868, '2020-09-16 13:30:37', '2022-09-25 17:49:29'); -INSERT INTO wflow_departments VALUES (231535, '生产管理部', NULL, 1486186, '2020-09-16 13:30:39', '2020-09-16 13:30:42'); -INSERT INTO wflow_departments VALUES (264868, '行政人事部', NULL, 1486186, '2020-09-16 13:30:42', '2020-09-16 13:30:44'); -INSERT INTO wflow_departments VALUES (689698, '客服部', '489564', 4319868, '2020-09-16 13:30:34', '2022-09-04 18:26:20'); -INSERT INTO wflow_departments VALUES (1486186, 'xx科技有限公司', '381496', 0, '2020-09-16 13:26:25', '2022-09-04 18:25:12'); -INSERT INTO wflow_departments VALUES (4319868, '销售服务部', '927438', 1486186, '2020-09-16 13:30:44', '2022-09-04 18:26:07'); -INSERT INTO wflow_departments VALUES (6179678, '研发部', '6418616', 1486186, '2020-09-16 13:26:56', '2022-09-04 18:25:49'); \ No newline at end of file diff --git a/pgsql/wflow_model_groups.sql b/pgsql/wflow_model_groups.sql deleted file mode 100644 index 3a04893..0000000 --- a/pgsql/wflow_model_groups.sql +++ /dev/null @@ -1,11 +0,0 @@ -DROP TABLE IF EXISTS wflow_model_groups; -CREATE TABLE wflow_model_groups ( - group_id bigserial NOT NULL, - group_name varchar(50), - sort int2 NOT NULL, - updated timestamp, - CONSTRAINT wflow_model_groups_pri PRIMARY key ("group_id") -); -comment ON TABLE wflow_model_groups IS '流程分组表'; -comment ON COLUMN wflow_model_groups.group_name IS '分组名'; -comment ON COLUMN wflow_model_groups.sort IS '排序'; \ No newline at end of file diff --git a/pgsql/wflow_model_historys.sql b/pgsql/wflow_model_historys.sql deleted file mode 100644 index 02cc687..0000000 --- a/pgsql/wflow_model_historys.sql +++ /dev/null @@ -1,20 +0,0 @@ -DROP TABLE IF EXISTS wflow_model_historys; -CREATE TABLE wflow_model_historys ( - id bigserial NOT NULL, - process_def_id varchar(40), - form_id varchar(40) NOT NULL, - form_name varchar(40) NOT NULL, - version int4 NOT NULL DEFAULT 0, - logo json NOT NULL, - settings json NOT NULL, - group_id int8 NOT NULL, - form_items json NOT NULL, - process json NOT NULL, - remark varchar(255), - created timestamp NULL DEFAULT NULL, - region_code varchar(50), - process_type int4, - node_map text, - CONSTRAINT "wflow_model_historys_pri" PRIMARY KEY ("id") -) -CREATE UNIQUE INDEX form_id_uk ON wflow_model_historys(form_id,version); \ No newline at end of file diff --git a/pgsql/wflow_model_perms.sql b/pgsql/wflow_model_perms.sql deleted file mode 100644 index 3d12a1c..0000000 --- a/pgsql/wflow_model_perms.sql +++ /dev/null @@ -1,10 +0,0 @@ -DROP TABLE IF EXISTS wflow_model_perms; -CREATE TABLE wflow_model_perms ( - id varchar(40) NOT NULL, - form_id varchar(40), - perm_type varchar(5), - org_id int8 NOT NULL, - create_time timestamp, - CONSTRAINT "wflow_model_perms_pri" PRIMARY KEY ("id") -) -CREATE INDEX form_idx ON wflow_model_perms(form_id, perm_type); \ No newline at end of file diff --git a/pgsql/wflow_models.sql b/pgsql/wflow_models.sql deleted file mode 100644 index d98ffa3..0000000 --- a/pgsql/wflow_models.sql +++ /dev/null @@ -1,23 +0,0 @@ -DROP TABLE IF EXISTS wflow_models; -CREATE TABLE wflow_models ( - form_id varchar(40), - process_def_id varchar(40), - deploy_id varchar(40), - version int4 NOT NULL DEFAULT 1, - form_name varchar(50), - logo text, - settings text, - group_id int8, - form_items text NOT NULL, - process text NOT NULL, - remark varchar(125), - sort int4 NOT NULL, - is_delete BOOL, - is_stop BOOL, - created timestamp, - updated timestamp, - region_code varchar(50), - process_type int4, - node_map text, - CONSTRAINT "wflow_models_pri" PRIMARY KEY ("form_id") -) \ No newline at end of file diff --git a/pgsql/wflow_notifys.sql b/pgsql/wflow_notifys.sql deleted file mode 100644 index 74c791c..0000000 --- a/pgsql/wflow_notifys.sql +++ /dev/null @@ -1,14 +0,0 @@ -DROP TABLE IF EXISTS wflow_notifys; -CREATE TABLE wflow_notifys ( - id varchar(40) NOT NULL, - title varchar(255) NOT NULL, - user_id varchar(50) NOT NULL, - type varchar(10), - instance_id varchar(40), - content varchar(255) NOT NULL, - readed BOOL, - link varchar(255), - create_time timestamp, - CONSTRAINT "wflow_notifys_pri" PRIMARY KEY ("id") -) -CREATE INDEX user_idx ON wflow_notifys(user_id); \ No newline at end of file diff --git a/pgsql/wflow_roles.sql b/pgsql/wflow_roles.sql deleted file mode 100644 index 230292b..0000000 --- a/pgsql/wflow_roles.sql +++ /dev/null @@ -1,12 +0,0 @@ -DROP TABLE IF EXISTS wflow_roles; -CREATE TABLE wflow_roles ( - role_id varchar(20) NOT NULL, - role_name varchar(50) NOT NULL, - created timestamp, - CONSTRAINT "wflow_roles_pri" PRIMARY KEY ("role_id") -) - - -INSERT INTO wflow_roles VALUES ('BOOS', '董事长', '2022-09-04 18:22:18'); -INSERT INTO wflow_roles VALUES ('HR', '人事', '2022-09-04 18:22:47'); -INSERT INTO wflow_roles VALUES ('WFLOW_APPROVAL_ADMIN', '审批管理员', '2022-09-04 18:14:16'); \ No newline at end of file diff --git a/pgsql/wflow_user_agents.sql b/pgsql/wflow_user_agents.sql deleted file mode 100644 index 955015d..0000000 --- a/pgsql/wflow_user_agents.sql +++ /dev/null @@ -1,9 +0,0 @@ -DROP TABLE IF EXISTS wflow_user_agents; -CREATE TABLE wflow_user_agents ( - user_id varchar(30) NOT NULL, - agent_user_id varchar(30) NOT NULL, - start_time timestamp NOT NULL, - end_time timestamp NULL DEFAULT NULL, - create_time timestamp NULL DEFAULT NULL, - CONSTRAINT "wflow_user_agents_pri" PRIMARY KEY ("user_id") -) \ No newline at end of file diff --git a/pgsql/wflow_user_departments.sql b/pgsql/wflow_user_departments.sql deleted file mode 100644 index 888970b..0000000 --- a/pgsql/wflow_user_departments.sql +++ /dev/null @@ -1,20 +0,0 @@ -DROP TABLE IF EXISTS wflow_user_departments; -CREATE TABLE wflow_user_departments ( - id bigserial, - user_id varchar(20) NOT NULL, - dept_id varchar(20) NOT NULL, - created timestamp, - CONSTRAINT "wflow_user_departments_pri" PRIMARY KEY ("id") -) -CREATE UNIQUE INDEX user_uk ON wflow_user_departments(user_id,dept_id); - -INSERT INTO wflow_user_departments VALUES (1, '381496', '1486186', '2022-07-05 17:42:17'); -INSERT INTO wflow_user_departments VALUES (2, '489564', '689698', '2022-07-05 17:42:34'); -INSERT INTO wflow_user_departments VALUES (3, '568898', '4319868', '2022-07-05 17:42:52'); -INSERT INTO wflow_user_departments VALUES (4, '6418616', '6179678', '2022-07-05 17:43:09'); -INSERT INTO wflow_user_departments VALUES (5, '61769798', '231535', '2022-07-05 17:43:24'); -INSERT INTO wflow_user_departments VALUES (6, '327382', '6179678', '2022-09-04 18:17:55'); -INSERT INTO wflow_user_departments VALUES (7, '8902743', '689698', '2022-09-04 18:19:12'); -INSERT INTO wflow_user_departments VALUES (8, '927438', '4319868', '2022-09-04 18:21:08'); -INSERT INTO wflow_user_departments VALUES (9, '3286432', '35453', '2022-09-25 17:49:19'); -INSERT INTO wflow_user_departments VALUES (10, '3243678', '35453', '2022-09-25 17:50:58'); \ No newline at end of file diff --git a/pgsql/wflow_user_roles.sql b/pgsql/wflow_user_roles.sql deleted file mode 100644 index dfb7267..0000000 --- a/pgsql/wflow_user_roles.sql +++ /dev/null @@ -1,9 +0,0 @@ -DROP TABLE IF EXISTS wflow_user_roles; -CREATE TABLE wflow_user_roles ( - id bigserial, - user_id varchar(30), - role_id varchar(20), - created timestamp, - CONSTRAINT "wflow_user_roles_pri" PRIMARY KEY ("id") -) -CREATE UNIQUE INDEX user_role_uk ON wflow_user_roles(user_id,role_id); \ No newline at end of file diff --git a/pgsql/wflow_users.sql b/pgsql/wflow_users.sql deleted file mode 100644 index 580ab1f..0000000 --- a/pgsql/wflow_users.sql +++ /dev/null @@ -1,31 +0,0 @@ -DROP TABLE IF EXISTS wflow_users; -CREATE TABLE wflow_users ( - user_id int8 NOT NULL, - user_name varchar(50) NOT NULL, - pingyin varchar(50), - py varchar(5), - alisa varchar(50), - avatar varchar(1024), - sex BOOL, - entry_date date, - leave_date date, - created timestamp, - updated timestamp, - CONSTRAINT "wflow_users_pri" PRIMARY KEY ("user_id") -) -CREATE INDEX user_id_idx ON wflow_users(user_id); -CREATE INDEX leave_date_idex ON wflow_users(leave_date); - --- ---------------------------- --- Records of wflow_users --- ---------------------------- -INSERT INTO wflow_users VALUES (327382, '李富贵', 'lifugui', 'lfg', NULL, 'https://dd-static.jd.com/ddimg/jfs/t1/188230/26/28979/10654/633026fdEf64e5e84/fc5c07ab3d5eac19.png', b'1', '2022-09-23', NULL, '2022-09-04 18:14:53', '2022-09-25 18:01:41'); -INSERT INTO wflow_users VALUES (381496, '旅人', 'lvren', 'lr', 'lr', 'https://pic.rmb.bdstatic.com/bjh/203726324a891b1946ba223209cb3fee.png', b'1', '2020-09-16', NULL, '2020-09-16 13:33:41', '2022-08-14 11:27:49'); -INSERT INTO wflow_users VALUES (489564, '李秋香', 'liqiuxiang', 'lqx', 'lqx', NULL, b'1', '2020-09-16', NULL, '2020-09-16 13:35:40', '2022-06-27 16:48:25'); -INSERT INTO wflow_users VALUES (568898, '王翠花', 'wangcuihua', 'wch', 'wch', 'https://dd-static.jd.com/ddimg/jfs/t1/204270/25/26917/8646/63302601E2794a142/5b75f81e6d0c4856.png', b'1', '2020-09-16', NULL, '2020-09-16 13:35:01', '2022-09-25 17:57:29'); -INSERT INTO wflow_users VALUES (927438, '隔壁老王', 'gebilaowang', 'gblw', NULL, 'https://dd-static.jd.com/ddimg/jfs/t1/21515/30/18678/11719/633025abEe734404d/c2950fef75e96028.png', b'1', NULL, NULL, '2022-09-04 18:16:51', '2022-09-25 17:56:04'); -INSERT INTO wflow_users VALUES (3243678, '狗剩', 'gousheng', 'gs', NULL, 'https://dd-static.jd.com/ddimg/jfs/t1/177987/31/29200/17909/63302676E5c00167f/13c59e53269e9f67.png', b'1', NULL, NULL, '2022-09-25 17:50:15', '2022-09-25 17:59:25'); -INSERT INTO wflow_users VALUES (3286432, '铁蛋', 'tiedan', 'td', NULL, 'https://dd-static.jd.com/ddimg/jfs/t1/203154/8/26845/14302/633026b7Ea9b381f7/7e7c5d96fcda0d39.png', b'1', NULL, NULL, '2022-09-25 17:48:39', '2022-09-25 18:00:28'); -INSERT INTO wflow_users VALUES (6418616, '张三', 'zhangsan', 'zs', 'zs', NULL, b'1', '2020-09-16', NULL, '2020-09-16 13:32:25', '2022-06-27 16:48:32'); -INSERT INTO wflow_users VALUES (8902743, '张秋梅', 'zhengqiumei', 'zqm', NULL, NULL, b'1', NULL, NULL, '2022-09-04 18:16:12', '2022-09-04 18:16:13'); -INSERT INTO wflow_users VALUES (61769798, '李四', 'lisi', 'ls', 'ls', NULL, b'1', '2019-09-16', NULL, '2020-09-16 13:33:00', '2022-06-27 16:48:34'); diff --git a/pgsql/wflowother.sql b/pgsql/wflowother.sql deleted file mode 100644 index 5371598..0000000 --- a/pgsql/wflowother.sql +++ /dev/null @@ -1,910 +0,0 @@ -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), - - PROC_INST_ID_ VARCHAR(64), - - ACTION_ VARCHAR(255), - - MESSAGE_ VARCHAR(2000), - - FULL_MSG_ BLOB, - - constraint ACT_HI_COMMENT_PKEY primary KEY(ID_) -); - -create table ACT_HI_DETAIL -( - ID_ VARCHAR(64) not NULL, - TYPE_ VARCHAR(255) not null, - PROC_INST_ID_ VARCHAR(64), - EXECUTION_ID_ VARCHAR(64), - TASK_ID_ VARCHAR(64), - ACT_INST_ID_ VARCHAR(64), - NAME_ VARCHAR(255) not null, - VAR_TYPE_ VARCHAR(64), - REV_ INT4, - TIME_ TIMESTAMP not null, - BYTEARRAY_ID_ VARCHAR(64), - DOUBLE_ NUMERIC(30,10), - LONG_ NUMERIC(19), - TEXT_ VARCHAR(2000), - TEXT2_ VARCHAR(2000), - constraint ACT_HI_DETAIL_PKEY primary KEY(ID_) -); -create index ACT_IDX_HI_DETAIL_ACT_INST - on ACT_HI_DETAIL (ACT_INST_ID_); -create index ACT_IDX_HI_DETAIL_NAME - on ACT_HI_DETAIL (NAME_); -create index ACT_IDX_HI_DETAIL_PROC_INST - on ACT_HI_DETAIL (PROC_INST_ID_); -create index ACT_IDX_HI_DETAIL_TASK_ID - on ACT_HI_DETAIL (TASK_ID_); -create index ACT_IDX_HI_DETAIL_TIME - on ACT_HI_DETAIL (TIME_); - -create table ACT_HI_ENTITYLINK -( - ID_ VARCHAR(64) not null, - LINK_TYPE_ VARCHAR(255), - CREATE_TIME_ TIMESTAMP, - SCOPE_ID_ VARCHAR(255), - SUB_SCOPE_ID_ VARCHAR(255), - SCOPE_TYPE_ VARCHAR(255), - SCOPE_DEFINITION_ID_ VARCHAR(255), - PARENT_ELEMENT_ID_ VARCHAR(255), - REF_SCOPE_ID_ VARCHAR(255), - REF_SCOPE_TYPE_ VARCHAR(255), - REF_SCOPE_DEFINITION_ID_ VARCHAR(255), - ROOT_SCOPE_ID_ VARCHAR(255), - ROOT_SCOPE_TYPE_ VARCHAR(255), - HIERARCHY_TYPE_ VARCHAR(255), - constraint ACT_HI_ENTITYLINK_PKEY primary key(ID_) -); - -create index ACT_IDX_HI_ENT_LNK_REF_SCOPE - on ACT_HI_ENTITYLINK (REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_); -create index ACT_IDX_HI_ENT_LNK_ROOT_SCOPE - on ACT_HI_ENTITYLINK (ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_); -create index ACT_IDX_HI_ENT_LNK_SCOPE - on ACT_HI_ENTITYLINK (SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_); -create index ACT_IDX_HI_ENT_LNK_SCOPE_DEF - on ACT_HI_ENTITYLINK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_); - - -create table ACT_HI_IDENTITYLINK( - ID_ VARCHAR(64) not NULL, - GROUP_ID_ VARCHAR(255), - TYPE_ VARCHAR(255), - USER_ID_ VARCHAR(255), - TASK_ID_ VARCHAR(64), - CREATE_TIME_ TIMESTAMP , - PROC_INST_ID_ VARCHAR(64), - SCOPE_ID_ VARCHAR(255), - SUB_SCOPE_ID_ VARCHAR(255), - SCOPE_TYPE_ VARCHAR(255), - SCOPE_DEFINITION_ID_ VARCHAR(255), - constraint ACT_HI_IDENTITYLINK_PKEY primary KEY(ID_) -); - -create index ACT_IDX_HI_IDENT_LNK_PROCINST - on ACT_HI_IDENTITYLINK (PROC_INST_ID_); -create index ACT_IDX_HI_IDENT_LNK_SCOPE - on ACT_HI_IDENTITYLINK (SCOPE_ID_, SCOPE_TYPE_); -create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF - on ACT_HI_IDENTITYLINK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_); -create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE - on ACT_HI_IDENTITYLINK (SUB_SCOPE_ID_, SCOPE_TYPE_); -create index ACT_IDX_HI_IDENT_LNK_TASK - on ACT_HI_IDENTITYLINK (TASK_ID_); -create index ACT_IDX_HI_IDENT_LNK_USER - on ACT_HI_IDENTITYLINK (USER_ID_); - -create table ACT_HI_PROCINST -( - ID_ VARCHAR(64) not NULL, - REV_ INT4 default 1, - PROC_INST_ID_ VARCHAR(64) not NULL, - BUSINESS_KEY_ VARCHAR(255), - PROC_DEF_ID_ VARCHAR(64) not null, - START_TIME_ TIMESTAMP not null, - END_TIME_ TIMESTAMP, - DURATION_ NUMERIC(12,2), - START_USER_ID_ VARCHAR(255), - START_ACT_ID_ VARCHAR(255), - END_ACT_ID_ VARCHAR(255), - SUPER_PROCESS_INSTANCE_ID_ VARCHAR(64), - DELETE_REASON_ text, - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', - NAME_ VARCHAR(255), - CALLBACK_ID_ VARCHAR(255), - CALLBACK_TYPE_ VARCHAR(255), - REFERENCE_ID_ VARCHAR(255), - REFERENCE_TYPE_ VARCHAR(255), - PROPAGATED_STAGE_INST_ID_ VARCHAR(255), - BUSINESS_STATUS_ VARCHAR(255), - constraint ACT_HI_PROCINST_PKEY primary KEY(ID_) -); -CREATE UNIQUE INDEX ACT_HI_PROCINST_PROC_INST_ID_UK ON ACT_HI_PROCINST(PROC_INST_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 table ACT_HI_TASKINST -( - ID_ VARCHAR(64) not NULL, - REV_ INT4 default 1, - PROC_DEF_ID_ VARCHAR(64), - TASK_DEF_ID_ VARCHAR(64), - TASK_DEF_KEY_ VARCHAR(255), - PROC_INST_ID_ VARCHAR(64), - EXECUTION_ID_ VARCHAR(64), - SCOPE_ID_ VARCHAR(255), - SUB_SCOPE_ID_ VARCHAR(255), - SCOPE_TYPE_ VARCHAR(255), - SCOPE_DEFINITION_ID_ VARCHAR(255), - PROPAGATED_STAGE_INST_ID_ VARCHAR(255), - PARENT_TASK_ID_ VARCHAR(64), - NAME_ VARCHAR(255), - DESCRIPTION_ VARCHAR(2000), - OWNER_ VARCHAR(255), - ASSIGNEE_ VARCHAR(255), - START_TIME_ TIMESTAMP not null, - CLAIM_TIME_ TIMESTAMP, - END_TIME_ TIMESTAMP, - DURATION_ NUMERIC(19), - DELETE_REASON_ VARCHAR(2000), - PRIORITY_ INT4, - DUE_DATE_ TIMESTAMP, - FORM_KEY_ VARCHAR(255), - CATEGORY_ VARCHAR(255), - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', - LAST_UPDATED_TIME_ TIMESTAMP, - constraint ACT_HI_TASKINST_PKEY primary KEY(ID_) -); - - -create index ACT_IDX_HI_TASK_INST_PROCINST - on ACT_HI_TASKINST (PROC_INST_ID_); -create index ACT_IDX_HI_TASK_SCOPE - on ACT_HI_TASKINST (SCOPE_ID_, SCOPE_TYPE_); -create index ACT_IDX_HI_TASK_SCOPE_DEF - on ACT_HI_TASKINST (SCOPE_DEFINITION_ID_, SCOPE_TYPE_); -create index ACT_IDX_HI_TASK_SUB_SCOPE - on ACT_HI_TASKINST (SUB_SCOPE_ID_, SCOPE_TYPE_); - -create table ACT_HI_TSK_LOG ( - ID_ NUMERIC(19) not NULL, - TYPE_ VARCHAR(64), - TASK_ID_ VARCHAR(64) not null, - TIME_STAMP_ TIMESTAMP not null, - USER_ID_ VARCHAR(255), - DATA_ VARCHAR(2000), - EXECUTION_ID_ VARCHAR(64), - PROC_INST_ID_ VARCHAR(64), - PROC_DEF_ID_ VARCHAR(64), - SCOPE_ID_ VARCHAR(255), - SCOPE_DEFINITION_ID_ VARCHAR(255), - SUB_SCOPE_ID_ VARCHAR(255), - SCOPE_TYPE_ VARCHAR(255), - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', - constraint ACT_HI_TSK_LOG_PKEY primary KEY(ID_) -); - -create table ACT_HI_VARINST -( - ID_ VARCHAR(64) not NULL, - REV_ INT4 default 1, - PROC_INST_ID_ VARCHAR(64), - EXECUTION_ID_ VARCHAR(64), - TASK_ID_ VARCHAR(64), - NAME_ VARCHAR(255) not null, - VAR_TYPE_ VARCHAR(100), - SCOPE_ID_ VARCHAR(255), - SUB_SCOPE_ID_ VARCHAR(255), - SCOPE_TYPE_ VARCHAR(255), - BYTEARRAY_ID_ VARCHAR(64), - DOUBLE_ NUMERIC(12,2), - LONG_ NUMERIC(12,2), - TEXT_ text, - TEXT2_ text, - CREATE_TIME_ TIMESTAMP, - LAST_UPDATED_TIME_ TIMESTAMP, - constraint ACT_HI_VARINST_PKEY primary KEY(ID_) -); - -create index ACT_IDX_HI_PROCVAR_EX - on ACT_HI_VARINST (EXECUTION_ID_); -create index ACT_IDX_HI_PROCVAR_NAME_TYPE - on ACT_HI_VARINST (NAME_, VAR_TYPE_); -create index ACT_IDX_HI_PROCVAR_PROC_INST - on ACT_HI_VARINST (PROC_INST_ID_); -create index ACT_IDX_HI_PROCVAR_TASK_ID - on ACT_HI_VARINST (TASK_ID_); -create index ACT_IDX_HI_VAR_SCOPE_ID_TYPE - on ACT_HI_VARINST (SCOPE_ID_, SCOPE_TYPE_); -create index ACT_IDX_HI_VAR_SUB_ID_TYPE - on ACT_HI_VARINST (SUB_SCOPE_ID_, SCOPE_TYPE_); - -create table ACT_PROCDEF_INFO ( - ID_ VARCHAR(64) not NULL, - PROC_DEF_ID_ VARCHAR(64) not null, - REV_ INT4, - INFO_JSON_ID_ VARCHAR(64), - constraint ACT_PROCDEF_INFO_PKEY - primary KEY(ID_) -); - -create index ACT_IDX_PROCDEF_INFO_JSON - on ACT_PROCDEF_INFO (INFO_JSON_ID_); -create index ACT_IDX_PROCDEF_INFO_PROC - on ACT_PROCDEF_INFO (PROC_DEF_ID_); - -create table ACT_RE_DEPLOYMENT -( - ID_ VARCHAR(64) not NULL, - NAME_ VARCHAR(255), - CATEGORY_ VARCHAR(255), - KEY_ VARCHAR(255), - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', - DEPLOY_TIME_ TIMESTAMP , - DERIVED_FROM_ VARCHAR(64), - DERIVED_FROM_ROOT_ VARCHAR(64), - PARENT_DEPLOYMENT_ID_ VARCHAR(255), - ENGINE_VERSION_ VARCHAR(255), - constraint ACT_RE_DEPLOYMENT_PKEY - primary KEY(ID_) -); - -create table ACT_RE_MODEL -( - ID_ VARCHAR(64) not NULL, - REV_ INT4, - NAME_ VARCHAR(255), - KEY_ VARCHAR(255), - CATEGORY_ VARCHAR(255), - CREATE_TIME_ TIMESTAMP, - LAST_UPDATE_TIME_ TIMESTAMP, - VERSION_ INT4, - META_INFO_ VARCHAR(2000), - DEPLOYMENT_ID_ VARCHAR(64), - EDITOR_SOURCE_VALUE_ID_ VARCHAR(64), - EDITOR_SOURCE_EXTRA_VALUE_ID_ VARCHAR(64), - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', - constraint ACT_RE_MODEL_PKEY - primary key(ID_) -); - -create index ACT_IDX_MODEL_DEPLOYMENT - on ACT_RE_MODEL (DEPLOYMENT_ID_); -create index ACT_IDX_MODEL_SOURCE - on ACT_RE_MODEL (EDITOR_SOURCE_VALUE_ID_); -create index ACT_IDX_MODEL_SOURCE_EXTRA - on ACT_RE_MODEL (EDITOR_SOURCE_EXTRA_VALUE_ID_); - -create table ACT_RE_PROCDEF -( - ID_ VARCHAR(64) not NULL, - REV_ INT4, - CATEGORY_ VARCHAR(255), - NAME_ VARCHAR(255), - KEY_ VARCHAR(255) not null, - VERSION_ INT4 not null, - DEPLOYMENT_ID_ VARCHAR(64), - RESOURCE_NAME_ VARCHAR(2000), - DGRM_RESOURCE_NAME_ VARCHAR(4000), - DESCRIPTION_ VARCHAR(2000), - HAS_START_FORM_KEY_ NUMERIC(1), - HAS_GRAPHICAL_NOTATION_ NUMERIC(1), - SUSPENSION_STATE_ INT4, - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', - DERIVED_FROM_ VARCHAR(64), - DERIVED_FROM_ROOT_ VARCHAR(64), - DERIVED_VERSION_ INT4 default 0 not null, - ENGINE_VERSION_ VARCHAR(255), - constraint ACT_RE_PROCDEF_PKEY primary key(ID_) -); -create unique index ACT_UNIQ_PROCDEF_UK on ACT_RE_PROCDEF(KEY_, VERSION_, DERIVED_VERSION_, TENANT_ID_); - -create table ACT_RU_ACTINST -( - ID_ VARCHAR(64) not NULL, - REV_ INT4 default 1, - 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), - CALL_PROC_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_ NUMERIC(12,2), - TRANSACTION_ORDER_ INT4, - DELETE_REASON_ VARCHAR(2000), - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', - constraint ACT_RU_ACTINST_PKEY primary key(ID_) -); - -create index ACT_IDX_RU_ACTI_END - on ACT_RU_ACTINST (END_TIME_); -create index ACT_IDX_RU_ACTI_EXEC - on ACT_RU_ACTINST (EXECUTION_ID_); -create index ACT_IDX_RU_ACTI_EXEC_ACT - on ACT_RU_ACTINST (EXECUTION_ID_, ACT_ID_); -create index ACT_IDX_RU_ACTI_PROC - on ACT_RU_ACTINST (PROC_INST_ID_); -create index ACT_IDX_RU_ACTI_PROC_ACT - on ACT_RU_ACTINST (PROC_INST_ID_, ACT_ID_); -create index ACT_IDX_RU_ACTI_START - on ACT_RU_ACTINST (START_TIME_); -create index ACT_IDX_RU_ACTI_TASK - on ACT_RU_ACTINST (TASK_ID_); - -create table ACT_RU_DEADLETTER_JOB -( - ID_ VARCHAR(64) not NULL, - REV_ INT4, - CATEGORY_ VARCHAR(255), - TYPE_ VARCHAR(255) not null, - EXCLUSIVE_ BOOL, - EXECUTION_ID_ VARCHAR(64), - PROCESS_INSTANCE_ID_ VARCHAR(64), - PROC_DEF_ID_ VARCHAR(64), - ELEMENT_ID_ VARCHAR(255), - ELEMENT_NAME_ VARCHAR(255), - SCOPE_ID_ VARCHAR(255), - SUB_SCOPE_ID_ VARCHAR(255), - SCOPE_TYPE_ VARCHAR(255), - SCOPE_DEFINITION_ID_ VARCHAR(255), - CORRELATION_ID_ VARCHAR(255), - EXCEPTION_STACK_ID_ VARCHAR(64), - EXCEPTION_MSG_ VARCHAR(4000), - DUEDATE_ TIMESTAMP, - REPEAT_ VARCHAR(255), - HANDLER_TYPE_ VARCHAR(255), - HANDLER_CFG_ text, - CUSTOM_VALUES_ID_ VARCHAR(12), - CREATE_TIME_ TIMESTAMP, - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', - constraint ACT_RU_DEADLETTER_JOB_PKEY primary KEY(ID_) -); - -create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID - on ACT_RU_DEADLETTER_JOB (CORRELATION_ID_); -create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID - on ACT_RU_DEADLETTER_JOB (CUSTOM_VALUES_ID_); -create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID - on ACT_RU_DEADLETTER_JOB (EXCEPTION_STACK_ID_); -create index ACT_IDX_DJOB_EXECUTION_ID - on ACT_RU_DEADLETTER_JOB (EXECUTION_ID_); -create index ACT_IDX_DJOB_PROC_DEF_ID - on ACT_RU_DEADLETTER_JOB (PROC_DEF_ID_); -create index ACT_IDX_DJOB_PROC_INST_ID - on ACT_RU_DEADLETTER_JOB (PROCESS_INSTANCE_ID_); -create index ACT_IDX_DJOB_SCOPE - on ACT_RU_DEADLETTER_JOB (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_DJOB_SUB_SCOPE - on ACT_RU_DEADLETTER_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_); - -create table ACT_RU_ENTITYLINK -( - ID_ VARCHAR(64) not null, - REV_ INT4, - CREATE_TIME_ TIMESTAMP, - LINK_TYPE_ VARCHAR(255), - SCOPE_ID_ VARCHAR(255), - SUB_SCOPE_ID_ VARCHAR(255), - SCOPE_TYPE_ VARCHAR(255), - SCOPE_DEFINITION_ID_ VARCHAR(255), - PARENT_ELEMENT_ID_ VARCHAR(255), - REF_SCOPE_ID_ VARCHAR(255), - REF_SCOPE_TYPE_ VARCHAR(255), - REF_SCOPE_DEFINITION_ID_ VARCHAR(255), - ROOT_SCOPE_ID_ VARCHAR(255), - ROOT_SCOPE_TYPE_ VARCHAR(255), - HIERARCHY_TYPE_ VARCHAR(255) -); -create index ACT_IDX_ENT_LNK_REF_SCOPE - on ACT_RU_ENTITYLINK (REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_); -create index ACT_IDX_ENT_LNK_ROOT_SCOPE - on ACT_RU_ENTITYLINK (ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_); -create index ACT_IDX_ENT_LNK_SCOPE - on ACT_RU_ENTITYLINK (SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_); -create index ACT_IDX_ENT_LNK_SCOPE_DEF - on ACT_RU_ENTITYLINK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_); - --- auto-generated definition -create table ACT_RU_EVENT_SUBSCR -( - ID_ VARCHAR(64) not null - constraint ACT_RU_EVENT_SUBSCR_PKEY - primary key, - REV_ INT4, - EVENT_TYPE_ VARCHAR(255) not null, - EVENT_NAME_ VARCHAR(255), - EXECUTION_ID_ VARCHAR(64), - PROC_INST_ID_ VARCHAR(64), - ACTIVITY_ID_ VARCHAR(64), - CONFIGURATION_ VARCHAR(255), - CREATED_ TIMESTAMP, - PROC_DEF_ID_ VARCHAR(64), - SUB_SCOPE_ID_ VARCHAR(64), - SCOPE_ID_ VARCHAR(64), - SCOPE_DEFINITION_ID_ VARCHAR(64), - SCOPE_TYPE_ VARCHAR(64), - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING' -); - -create index ACT_IDX_EVENT_SUBSCR_CONFIG_ - on ACT_RU_EVENT_SUBSCR (CONFIGURATION_); - --- auto-generated definition -create table ACT_RU_EXECUTION -( - ID_ VARCHAR(64) not null - constraint ACT_RU_EXECUTION_PKEY - primary key, - REV_ INT4, - PROC_INST_ID_ VARCHAR(64), - BUSINESS_KEY_ VARCHAR(255), - PARENT_ID_ VARCHAR(64), - PROC_DEF_ID_ VARCHAR(64), - SUPER_EXEC_ VARCHAR(64), - ROOT_PROC_INST_ID_ VARCHAR(64), - ACT_ID_ VARCHAR(255), - IS_ACTIVE_ NUMERIC(1), - IS_CONCURRENT_ NUMERIC(1), - IS_SCOPE_ NUMERIC(1), - IS_EVENT_SCOPE_ NUMERIC(1), - IS_MI_ROOT_ NUMERIC(1), - SUSPENSION_STATE_ INT4, - CACHED_ENT_STATE_ INT4, - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', - NAME_ VARCHAR(255), - START_ACT_ID_ VARCHAR(255), - START_TIME_ TIMESTAMP, - START_USER_ID_ VARCHAR(255), - LOCK_TIME_ TIMESTAMP, - LOCK_OWNER_ VARCHAR(255), - IS_COUNT_ENABLED_ NUMERIC(12,2), - EVT_SUBSCR_COUNT_ INT4, - TASK_COUNT_ INT4, - JOB_COUNT_ INT4, - TIMER_JOB_COUNT_ INT4, - SUSP_JOB_COUNT_ INT4, - DEADLETTER_JOB_COUNT_ INT4, - EXTERNAL_WORKER_JOB_COUNT_ INT4, - VAR_COUNT_ INT4, - ID_LINK_COUNT_ INT4, - CALLBACK_ID_ VARCHAR(255), - CALLBACK_TYPE_ VARCHAR(255), - REFERENCE_ID_ VARCHAR(255), - REFERENCE_TYPE_ VARCHAR(255), - PROPAGATED_STAGE_INST_ID_ VARCHAR(255), - BUSINESS_STATUS_ VARCHAR(255) -); - -create index ACT_IDX_EXEC_BUSKEY - on ACT_RU_EXECUTION (BUSINESS_KEY_); - -create index ACT_IDX_EXEC_REF_ID_ - on ACT_RU_EXECUTION (REFERENCE_ID_); - -create index ACT_IDX_EXEC_ROOT - on ACT_RU_EXECUTION (ROOT_PROC_INST_ID_); - -create index ACT_IDX_EXE_PARENT - on ACT_RU_EXECUTION (PARENT_ID_); - -create index ACT_IDX_EXE_PROCDEF - on ACT_RU_EXECUTION (PROC_DEF_ID_); - -create index ACT_IDX_EXE_PROCINST - on ACT_RU_EXECUTION (PROC_INST_ID_); - -create index ACT_IDX_EXE_SUPER - on ACT_RU_EXECUTION (SUPER_EXEC_); - -create table ACT_RU_EXTERNAL_JOB -( - ID_ VARCHAR(64) not null - constraint ACT_RU_EXTERNAL_JOB_PKEY - primary key, - REV_ INT4, - CATEGORY_ VARCHAR(255), - TYPE_ VARCHAR(255) not null, - LOCK_EXP_TIME_ TIMESTAMP, - LOCK_OWNER_ VARCHAR(255), - EXCLUSIVE_ BOOL, - 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_ INT4, - EXCEPTION_STACK_ID_ VARCHAR(64), - EXCEPTION_MSG_ text, - DUEDATE_ TIMESTAMP, - REPEAT_ VARCHAR(255), - HANDLER_TYPE_ VARCHAR(255), - HANDLER_CFG_ text, - CUSTOM_VALUES_ID_ VARCHAR(64), - CREATE_TIME_ TIMESTAMP, - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING' -); - -create index ACT_IDX_EJOB_SCOPE - on ACT_RU_EXTERNAL_JOB (SCOPE_ID_, SCOPE_TYPE_); - -create index ACT_IDX_EJOB_SCOPE_DEF - on ACT_RU_EXTERNAL_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_); - -create index ACT_IDX_EJOB_SUB_SCOPE - on ACT_RU_EXTERNAL_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_); - -create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID - on ACT_RU_EXTERNAL_JOB (CORRELATION_ID_); - -create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID - on ACT_RU_EXTERNAL_JOB (CUSTOM_VALUES_ID_); - -create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID - on ACT_RU_EXTERNAL_JOB (EXCEPTION_STACK_ID_); - -create table ACT_RU_HISTORY_JOB -( - ID_ VARCHAR(64) not null - constraint ACT_RU_HISTORY_JOB_PKEY - primary key, - REV_ INT4, - LOCK_EXP_TIME_ TIMESTAMP, - LOCK_OWNER_ VARCHAR(255), - RETRIES_ INT4, - EXCEPTION_STACK_ID_ VARCHAR(64), - EXCEPTION_MSG_ VARCHAR(4000), - HANDLER_TYPE_ VARCHAR(255), - HANDLER_CFG_ VARCHAR(4000), - CUSTOM_VALUES_ID_ VARCHAR(64), - ADV_HANDLER_CFG_ID_ VARCHAR(64), - CREATE_TIME_ TIMESTAMP, - SCOPE_TYPE_ VARCHAR(255), - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING' -); - -create table ACT_RU_IDENTITYLINK -( - ID_ VARCHAR(64) not null - constraint ACT_RU_IDENTITYLINK_PKEY - primary key, - REV_ INT4, - GROUP_ID_ VARCHAR(255), - TYPE_ VARCHAR(255), - USER_ID_ VARCHAR(255), - TASK_ID_ VARCHAR(64), - PROC_INST_ID_ VARCHAR(64), - PROC_DEF_ID_ VARCHAR(64), - SCOPE_ID_ VARCHAR(255), - SUB_SCOPE_ID_ VARCHAR(255), - SCOPE_TYPE_ VARCHAR(255), - SCOPE_DEFINITION_ID_ VARCHAR(255) -); - -create index ACT_IDX_ATHRZ_PROCEDEF - on ACT_RU_IDENTITYLINK (PROC_DEF_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_); - -create index ACT_IDX_IDENT_LNK_SUB_SCOPE - on ACT_RU_IDENTITYLINK (SUB_SCOPE_ID_, SCOPE_TYPE_); - -create index ACT_IDX_IDENT_LNK_USER - on ACT_RU_IDENTITYLINK (USER_ID_); - -create index ACT_IDX_IDL_PROCINST - on ACT_RU_IDENTITYLINK (PROC_INST_ID_); - -create index ACT_IDX_TSKASS_TASK - on ACT_RU_IDENTITYLINK (TASK_ID_); - -create table ACT_RU_JOB -( - ID_ VARCHAR(64) not null - constraint ACT_RU_JOB_PKEY - primary key, - REV_ INT4, - CATEGORY_ VARCHAR(255), - TYPE_ VARCHAR(255) not null, - LOCK_EXP_TIME_ TIMESTAMP, - LOCK_OWNER_ VARCHAR(255), - EXCLUSIVE_ BOOL, - 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_ INT4, - EXCEPTION_STACK_ID_ VARCHAR(64), - EXCEPTION_MSG_ text, - DUEDATE_ TIMESTAMP, - REPEAT_ VARCHAR(255), - HANDLER_TYPE_ VARCHAR(255), - HANDLER_CFG_ VARCHAR(4000), - CUSTOM_VALUES_ID_ VARCHAR(64), - CREATE_TIME_ TIMESTAMP, - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING' -); - -create index ACT_IDX_JOB_CORRELATION_ID - on ACT_RU_JOB (CORRELATION_ID_); - -create index ACT_IDX_JOB_CUSTOM_VALUES_ID - on ACT_RU_JOB (CUSTOM_VALUES_ID_); - -create index ACT_IDX_JOB_EXCEPTION_STACK_ID - on ACT_RU_JOB (EXCEPTION_STACK_ID_); - -create index ACT_IDX_JOB_EXECUTION_ID - on ACT_RU_JOB (EXECUTION_ID_); - -create index ACT_IDX_JOB_PROC_DEF_ID - on ACT_RU_JOB (PROC_DEF_ID_); - -create index ACT_IDX_JOB_PROC_INST_ID - on ACT_RU_JOB (PROCESS_INSTANCE_ID_); - -create index ACT_IDX_JOB_SCOPE - on ACT_RU_JOB (SCOPE_ID_, SCOPE_TYPE_); - -create index ACT_IDX_JOB_SCOPE_DEF - on ACT_RU_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_); - -create index ACT_IDX_JOB_SUB_SCOPE - on ACT_RU_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_); - -create table ACT_RU_SUSPENDED_JOB -( - ID_ VARCHAR(64) not null - constraint ACT_RU_SUSPENDED_JOB_PKEY - primary key, - REV_ INT4, - CATEGORY_ VARCHAR(255), - TYPE_ VARCHAR(255) not null, - EXCLUSIVE_ BOOL, - 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_ INT4, - EXCEPTION_STACK_ID_ VARCHAR(64), - EXCEPTION_MSG_ VARCHAR(4000), - DUEDATE_ TIMESTAMP, - REPEAT_ VARCHAR(255), - HANDLER_TYPE_ VARCHAR(255), - HANDLER_CFG_ VARCHAR(4000), - CUSTOM_VALUES_ID_ VARCHAR(64), - CREATE_TIME_ TIMESTAMP, - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING' -); - -create index ACT_IDX_SJOB_EXECUTION_ID - on ACT_RU_SUSPENDED_JOB (EXECUTION_ID_); - -create index ACT_IDX_SJOB_PROC_DEF_ID - on ACT_RU_SUSPENDED_JOB (PROC_DEF_ID_); - -create index ACT_IDX_SJOB_PROC_INST_ID - on ACT_RU_SUSPENDED_JOB (PROCESS_INSTANCE_ID_); - -create index ACT_IDX_SJOB_SCOPE - on ACT_RU_SUSPENDED_JOB (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_SJOB_SUB_SCOPE - on ACT_RU_SUSPENDED_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_); - -create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID - on ACT_RU_SUSPENDED_JOB (CORRELATION_ID_); - -create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID - on ACT_RU_SUSPENDED_JOB (CUSTOM_VALUES_ID_); - -create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID - on ACT_RU_SUSPENDED_JOB (EXCEPTION_STACK_ID_); - -create table ACT_RU_TASK -( - ID_ VARCHAR(64) not null - constraint ACT_RU_TASK_PKEY - primary key, - REV_ INT4, - EXECUTION_ID_ VARCHAR(64), - PROC_INST_ID_ VARCHAR(64), - PROC_DEF_ID_ VARCHAR(64), - TASK_DEF_ID_ VARCHAR(64), - SCOPE_ID_ VARCHAR(255), - SUB_SCOPE_ID_ VARCHAR(255), - SCOPE_TYPE_ VARCHAR(255), - SCOPE_DEFINITION_ID_ VARCHAR(255), - PROPAGATED_STAGE_INST_ID_ VARCHAR(255), - NAME_ VARCHAR(255), - PARENT_TASK_ID_ VARCHAR(64), - DESCRIPTION_ VARCHAR(2000), - TASK_DEF_KEY_ VARCHAR(255), - OWNER_ VARCHAR(255), - ASSIGNEE_ VARCHAR(255), - DELEGATION_ VARCHAR(64), - PRIORITY_ INT4, - CREATE_TIME_ TIMESTAMP , - DUE_DATE_ TIMESTAMP, - CATEGORY_ VARCHAR(255), - SUSPENSION_STATE_ INT4, - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING', - FORM_KEY_ VARCHAR(255), - CLAIM_TIME_ TIMESTAMP, - IS_COUNT_ENABLED_ NUMERIC(12,2), - VAR_COUNT_ INT4, - ID_LINK_COUNT_ INT4, - SUB_TASK_COUNT_ INT4 -); - -create index ACT_IDX_TASK_CREATE - on ACT_RU_TASK (CREATE_TIME_); - -create index ACT_IDX_TASK_EXEC - on ACT_RU_TASK (EXECUTION_ID_); - -create index ACT_IDX_TASK_PROCDEF - on ACT_RU_TASK (PROC_DEF_ID_); - -create index ACT_IDX_TASK_PROCINST - on ACT_RU_TASK (PROC_INST_ID_); - -create index ACT_IDX_TASK_SCOPE - on ACT_RU_TASK (SCOPE_ID_, SCOPE_TYPE_); - -create index ACT_IDX_TASK_SCOPE_DEF - on ACT_RU_TASK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_); - -create index ACT_IDX_TASK_SUB_SCOPE - on ACT_RU_TASK (SUB_SCOPE_ID_, SCOPE_TYPE_); - -create table ACT_RU_TIMER_JOB -( - ID_ VARCHAR(64) not null - constraint ACT_RU_TIMER_JOB_PKEY - primary key, - REV_ INT4, - CATEGORY_ VARCHAR(255), - TYPE_ VARCHAR(255) not null, - LOCK_EXP_TIME_ TIMESTAMP, - LOCK_OWNER_ VARCHAR(255), - EXCLUSIVE_ BOOL, - 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_ INT4, - EXCEPTION_STACK_ID_ VARCHAR(64), - EXCEPTION_MSG_ VARCHAR(4000), - DUEDATE_ TIMESTAMP, - REPEAT_ VARCHAR(255), - HANDLER_TYPE_ VARCHAR(255), - HANDLER_CFG_ VARCHAR(4000), - CUSTOM_VALUES_ID_ VARCHAR(64), - CREATE_TIME_ TIMESTAMP, - TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING' -); - -create index ACT_IDX_TIMER_JOB_CORRELATION_ID - on ACT_RU_TIMER_JOB (CORRELATION_ID_); - -create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID - on ACT_RU_TIMER_JOB (CUSTOM_VALUES_ID_); - -create index ACT_IDX_TIMER_JOB_DUEDATE - on ACT_RU_TIMER_JOB (DUEDATE_); - -create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID - on ACT_RU_TIMER_JOB (EXCEPTION_STACK_ID_); - -create index ACT_IDX_TJOB_EXECUTION_ID - on ACT_RU_TIMER_JOB (EXECUTION_ID_); - -create index ACT_IDX_TJOB_PROC_DEF_ID - on ACT_RU_TIMER_JOB (PROC_DEF_ID_); - -create index ACT_IDX_TJOB_PROC_INST_ID - on ACT_RU_TIMER_JOB (PROCESS_INSTANCE_ID_); - -create index ACT_IDX_TJOB_SCOPE - on ACT_RU_TIMER_JOB (SCOPE_ID_, SCOPE_TYPE_); - -create index ACT_IDX_TJOB_SCOPE_DEF - on ACT_RU_TIMER_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_); - -create index ACT_IDX_TJOB_SUB_SCOPE - on ACT_RU_TIMER_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_); - -create table ACT_RU_VARIABLE -( - ID_ VARCHAR(64) not null - constraint ACT_RU_VARIABLE_PKEY - primary key, - REV_ INT4, - TYPE_ VARCHAR(255) not null, - NAME_ VARCHAR(255) not null, - EXECUTION_ID_ VARCHAR(64), - PROC_INST_ID_ VARCHAR(64), - TASK_ID_ VARCHAR(64), - SCOPE_ID_ VARCHAR(255), - SUB_SCOPE_ID_ VARCHAR(255), - SCOPE_TYPE_ VARCHAR(255), - BYTEARRAY_ID_ VARCHAR(64), - DOUBLE_ NUMERIC(12,2), - LONG_ NUMERIC(12,2), - TEXT_ VARCHAR(2000), - TEXT2_ VARCHAR(2000) -); - -create index ACT_IDX_RU_VAR_SCOPE_ID_TYPE - on ACT_RU_VARIABLE (SCOPE_ID_, SCOPE_TYPE_); - -create index ACT_IDX_RU_VAR_SUB_ID_TYPE - on ACT_RU_VARIABLE (SUB_SCOPE_ID_, SCOPE_TYPE_); - -create index ACT_IDX_VARIABLE_TASK_ID - on ACT_RU_VARIABLE (TASK_ID_); - -create index ACT_IDX_VAR_BYTEARRAY - on ACT_RU_VARIABLE (BYTEARRAY_ID_); - -create index ACT_IDX_VAR_EXE - on ACT_RU_VARIABLE (EXECUTION_ID_); - -create index ACT_IDX_VAR_PROCINST - on ACT_RU_VARIABLE (PROC_INST_ID_); -