杭州市委办项管
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

911 строки
28KB

  1. create table ACT_HI_COMMENT(
  2. ID_ VARCHAR(64) not NULL,
  3. TYPE_ VARCHAR(255),
  4. TIME_ TIMESTAMP not null,
  5. USER_ID_ VARCHAR(255),
  6. TASK_ID_ VARCHAR(64),
  7. PROC_INST_ID_ VARCHAR(64),
  8. ACTION_ VARCHAR(255),
  9. MESSAGE_ VARCHAR(2000),
  10. FULL_MSG_ BLOB,
  11. constraint ACT_HI_COMMENT_PKEY primary KEY(ID_)
  12. );
  13. create table ACT_HI_DETAIL
  14. (
  15. ID_ VARCHAR(64) not NULL,
  16. TYPE_ VARCHAR(255) not null,
  17. PROC_INST_ID_ VARCHAR(64),
  18. EXECUTION_ID_ VARCHAR(64),
  19. TASK_ID_ VARCHAR(64),
  20. ACT_INST_ID_ VARCHAR(64),
  21. NAME_ VARCHAR(255) not null,
  22. VAR_TYPE_ VARCHAR(64),
  23. REV_ INT4,
  24. TIME_ TIMESTAMP not null,
  25. BYTEARRAY_ID_ VARCHAR(64),
  26. DOUBLE_ NUMERIC(30,10),
  27. LONG_ NUMERIC(19),
  28. TEXT_ VARCHAR(2000),
  29. TEXT2_ VARCHAR(2000),
  30. constraint ACT_HI_DETAIL_PKEY primary KEY(ID_)
  31. );
  32. create index ACT_IDX_HI_DETAIL_ACT_INST
  33. on ACT_HI_DETAIL (ACT_INST_ID_);
  34. create index ACT_IDX_HI_DETAIL_NAME
  35. on ACT_HI_DETAIL (NAME_);
  36. create index ACT_IDX_HI_DETAIL_PROC_INST
  37. on ACT_HI_DETAIL (PROC_INST_ID_);
  38. create index ACT_IDX_HI_DETAIL_TASK_ID
  39. on ACT_HI_DETAIL (TASK_ID_);
  40. create index ACT_IDX_HI_DETAIL_TIME
  41. on ACT_HI_DETAIL (TIME_);
  42. create table ACT_HI_ENTITYLINK
  43. (
  44. ID_ VARCHAR(64) not null,
  45. LINK_TYPE_ VARCHAR(255),
  46. CREATE_TIME_ TIMESTAMP,
  47. SCOPE_ID_ VARCHAR(255),
  48. SUB_SCOPE_ID_ VARCHAR(255),
  49. SCOPE_TYPE_ VARCHAR(255),
  50. SCOPE_DEFINITION_ID_ VARCHAR(255),
  51. PARENT_ELEMENT_ID_ VARCHAR(255),
  52. REF_SCOPE_ID_ VARCHAR(255),
  53. REF_SCOPE_TYPE_ VARCHAR(255),
  54. REF_SCOPE_DEFINITION_ID_ VARCHAR(255),
  55. ROOT_SCOPE_ID_ VARCHAR(255),
  56. ROOT_SCOPE_TYPE_ VARCHAR(255),
  57. HIERARCHY_TYPE_ VARCHAR(255),
  58. constraint ACT_HI_ENTITYLINK_PKEY primary key(ID_)
  59. );
  60. create index ACT_IDX_HI_ENT_LNK_REF_SCOPE
  61. on ACT_HI_ENTITYLINK (REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
  62. create index ACT_IDX_HI_ENT_LNK_ROOT_SCOPE
  63. on ACT_HI_ENTITYLINK (ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
  64. create index ACT_IDX_HI_ENT_LNK_SCOPE
  65. on ACT_HI_ENTITYLINK (SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
  66. create index ACT_IDX_HI_ENT_LNK_SCOPE_DEF
  67. on ACT_HI_ENTITYLINK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
  68. create table ACT_HI_IDENTITYLINK(
  69. ID_ VARCHAR(64) not NULL,
  70. GROUP_ID_ VARCHAR(255),
  71. TYPE_ VARCHAR(255),
  72. USER_ID_ VARCHAR(255),
  73. TASK_ID_ VARCHAR(64),
  74. CREATE_TIME_ TIMESTAMP ,
  75. PROC_INST_ID_ VARCHAR(64),
  76. SCOPE_ID_ VARCHAR(255),
  77. SUB_SCOPE_ID_ VARCHAR(255),
  78. SCOPE_TYPE_ VARCHAR(255),
  79. SCOPE_DEFINITION_ID_ VARCHAR(255),
  80. constraint ACT_HI_IDENTITYLINK_PKEY primary KEY(ID_)
  81. );
  82. create index ACT_IDX_HI_IDENT_LNK_PROCINST
  83. on ACT_HI_IDENTITYLINK (PROC_INST_ID_);
  84. create index ACT_IDX_HI_IDENT_LNK_SCOPE
  85. on ACT_HI_IDENTITYLINK (SCOPE_ID_, SCOPE_TYPE_);
  86. create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF
  87. on ACT_HI_IDENTITYLINK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
  88. create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE
  89. on ACT_HI_IDENTITYLINK (SUB_SCOPE_ID_, SCOPE_TYPE_);
  90. create index ACT_IDX_HI_IDENT_LNK_TASK
  91. on ACT_HI_IDENTITYLINK (TASK_ID_);
  92. create index ACT_IDX_HI_IDENT_LNK_USER
  93. on ACT_HI_IDENTITYLINK (USER_ID_);
  94. create table ACT_HI_PROCINST
  95. (
  96. ID_ VARCHAR(64) not NULL,
  97. REV_ INT4 default 1,
  98. PROC_INST_ID_ VARCHAR(64) not NULL,
  99. BUSINESS_KEY_ VARCHAR(255),
  100. PROC_DEF_ID_ VARCHAR(64) not null,
  101. START_TIME_ TIMESTAMP not null,
  102. END_TIME_ TIMESTAMP,
  103. DURATION_ NUMERIC(12,2),
  104. START_USER_ID_ VARCHAR(255),
  105. START_ACT_ID_ VARCHAR(255),
  106. END_ACT_ID_ VARCHAR(255),
  107. SUPER_PROCESS_INSTANCE_ID_ VARCHAR(64),
  108. DELETE_REASON_ text,
  109. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
  110. NAME_ VARCHAR(255),
  111. CALLBACK_ID_ VARCHAR(255),
  112. CALLBACK_TYPE_ VARCHAR(255),
  113. REFERENCE_ID_ VARCHAR(255),
  114. REFERENCE_TYPE_ VARCHAR(255),
  115. PROPAGATED_STAGE_INST_ID_ VARCHAR(255),
  116. BUSINESS_STATUS_ VARCHAR(255),
  117. constraint ACT_HI_PROCINST_PKEY primary KEY(ID_)
  118. );
  119. CREATE UNIQUE INDEX ACT_HI_PROCINST_PROC_INST_ID_UK ON ACT_HI_PROCINST(PROC_INST_ID_);
  120. create index ACT_IDX_HI_PRO_INST_END
  121. on ACT_HI_PROCINST (END_TIME_);
  122. create index ACT_IDX_HI_PRO_I_BUSKEY
  123. on ACT_HI_PROCINST (BUSINESS_KEY_);
  124. create table ACT_HI_TASKINST
  125. (
  126. ID_ VARCHAR(64) not NULL,
  127. REV_ INT4 default 1,
  128. PROC_DEF_ID_ VARCHAR(64),
  129. TASK_DEF_ID_ VARCHAR(64),
  130. TASK_DEF_KEY_ VARCHAR(255),
  131. PROC_INST_ID_ VARCHAR(64),
  132. EXECUTION_ID_ VARCHAR(64),
  133. SCOPE_ID_ VARCHAR(255),
  134. SUB_SCOPE_ID_ VARCHAR(255),
  135. SCOPE_TYPE_ VARCHAR(255),
  136. SCOPE_DEFINITION_ID_ VARCHAR(255),
  137. PROPAGATED_STAGE_INST_ID_ VARCHAR(255),
  138. PARENT_TASK_ID_ VARCHAR(64),
  139. NAME_ VARCHAR(255),
  140. DESCRIPTION_ VARCHAR(2000),
  141. OWNER_ VARCHAR(255),
  142. ASSIGNEE_ VARCHAR(255),
  143. START_TIME_ TIMESTAMP not null,
  144. CLAIM_TIME_ TIMESTAMP,
  145. END_TIME_ TIMESTAMP,
  146. DURATION_ NUMERIC(19),
  147. DELETE_REASON_ VARCHAR(2000),
  148. PRIORITY_ INT4,
  149. DUE_DATE_ TIMESTAMP,
  150. FORM_KEY_ VARCHAR(255),
  151. CATEGORY_ VARCHAR(255),
  152. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
  153. LAST_UPDATED_TIME_ TIMESTAMP,
  154. constraint ACT_HI_TASKINST_PKEY primary KEY(ID_)
  155. );
  156. create index ACT_IDX_HI_TASK_INST_PROCINST
  157. on ACT_HI_TASKINST (PROC_INST_ID_);
  158. create index ACT_IDX_HI_TASK_SCOPE
  159. on ACT_HI_TASKINST (SCOPE_ID_, SCOPE_TYPE_);
  160. create index ACT_IDX_HI_TASK_SCOPE_DEF
  161. on ACT_HI_TASKINST (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
  162. create index ACT_IDX_HI_TASK_SUB_SCOPE
  163. on ACT_HI_TASKINST (SUB_SCOPE_ID_, SCOPE_TYPE_);
  164. create table ACT_HI_TSK_LOG (
  165. ID_ NUMERIC(19) not NULL,
  166. TYPE_ VARCHAR(64),
  167. TASK_ID_ VARCHAR(64) not null,
  168. TIME_STAMP_ TIMESTAMP not null,
  169. USER_ID_ VARCHAR(255),
  170. DATA_ VARCHAR(2000),
  171. EXECUTION_ID_ VARCHAR(64),
  172. PROC_INST_ID_ VARCHAR(64),
  173. PROC_DEF_ID_ VARCHAR(64),
  174. SCOPE_ID_ VARCHAR(255),
  175. SCOPE_DEFINITION_ID_ VARCHAR(255),
  176. SUB_SCOPE_ID_ VARCHAR(255),
  177. SCOPE_TYPE_ VARCHAR(255),
  178. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
  179. constraint ACT_HI_TSK_LOG_PKEY primary KEY(ID_)
  180. );
  181. create table ACT_HI_VARINST
  182. (
  183. ID_ VARCHAR(64) not NULL,
  184. REV_ INT4 default 1,
  185. PROC_INST_ID_ VARCHAR(64),
  186. EXECUTION_ID_ VARCHAR(64),
  187. TASK_ID_ VARCHAR(64),
  188. NAME_ VARCHAR(255) not null,
  189. VAR_TYPE_ VARCHAR(100),
  190. SCOPE_ID_ VARCHAR(255),
  191. SUB_SCOPE_ID_ VARCHAR(255),
  192. SCOPE_TYPE_ VARCHAR(255),
  193. BYTEARRAY_ID_ VARCHAR(64),
  194. DOUBLE_ NUMERIC(12,2),
  195. LONG_ NUMERIC(12,2),
  196. TEXT_ text,
  197. TEXT2_ text,
  198. CREATE_TIME_ TIMESTAMP,
  199. LAST_UPDATED_TIME_ TIMESTAMP,
  200. constraint ACT_HI_VARINST_PKEY primary KEY(ID_)
  201. );
  202. create index ACT_IDX_HI_PROCVAR_EX
  203. on ACT_HI_VARINST (EXECUTION_ID_);
  204. create index ACT_IDX_HI_PROCVAR_NAME_TYPE
  205. on ACT_HI_VARINST (NAME_, VAR_TYPE_);
  206. create index ACT_IDX_HI_PROCVAR_PROC_INST
  207. on ACT_HI_VARINST (PROC_INST_ID_);
  208. create index ACT_IDX_HI_PROCVAR_TASK_ID
  209. on ACT_HI_VARINST (TASK_ID_);
  210. create index ACT_IDX_HI_VAR_SCOPE_ID_TYPE
  211. on ACT_HI_VARINST (SCOPE_ID_, SCOPE_TYPE_);
  212. create index ACT_IDX_HI_VAR_SUB_ID_TYPE
  213. on ACT_HI_VARINST (SUB_SCOPE_ID_, SCOPE_TYPE_);
  214. create table ACT_PROCDEF_INFO (
  215. ID_ VARCHAR(64) not NULL,
  216. PROC_DEF_ID_ VARCHAR(64) not null,
  217. REV_ INT4,
  218. INFO_JSON_ID_ VARCHAR(64),
  219. constraint ACT_PROCDEF_INFO_PKEY
  220. primary KEY(ID_)
  221. );
  222. create index ACT_IDX_PROCDEF_INFO_JSON
  223. on ACT_PROCDEF_INFO (INFO_JSON_ID_);
  224. create index ACT_IDX_PROCDEF_INFO_PROC
  225. on ACT_PROCDEF_INFO (PROC_DEF_ID_);
  226. create table ACT_RE_DEPLOYMENT
  227. (
  228. ID_ VARCHAR(64) not NULL,
  229. NAME_ VARCHAR(255),
  230. CATEGORY_ VARCHAR(255),
  231. KEY_ VARCHAR(255),
  232. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
  233. DEPLOY_TIME_ TIMESTAMP ,
  234. DERIVED_FROM_ VARCHAR(64),
  235. DERIVED_FROM_ROOT_ VARCHAR(64),
  236. PARENT_DEPLOYMENT_ID_ VARCHAR(255),
  237. ENGINE_VERSION_ VARCHAR(255),
  238. constraint ACT_RE_DEPLOYMENT_PKEY
  239. primary KEY(ID_)
  240. );
  241. create table ACT_RE_MODEL
  242. (
  243. ID_ VARCHAR(64) not NULL,
  244. REV_ INT4,
  245. NAME_ VARCHAR(255),
  246. KEY_ VARCHAR(255),
  247. CATEGORY_ VARCHAR(255),
  248. CREATE_TIME_ TIMESTAMP,
  249. LAST_UPDATE_TIME_ TIMESTAMP,
  250. VERSION_ INT4,
  251. META_INFO_ VARCHAR(2000),
  252. DEPLOYMENT_ID_ VARCHAR(64),
  253. EDITOR_SOURCE_VALUE_ID_ VARCHAR(64),
  254. EDITOR_SOURCE_EXTRA_VALUE_ID_ VARCHAR(64),
  255. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
  256. constraint ACT_RE_MODEL_PKEY
  257. primary key(ID_)
  258. );
  259. create index ACT_IDX_MODEL_DEPLOYMENT
  260. on ACT_RE_MODEL (DEPLOYMENT_ID_);
  261. create index ACT_IDX_MODEL_SOURCE
  262. on ACT_RE_MODEL (EDITOR_SOURCE_VALUE_ID_);
  263. create index ACT_IDX_MODEL_SOURCE_EXTRA
  264. on ACT_RE_MODEL (EDITOR_SOURCE_EXTRA_VALUE_ID_);
  265. create table ACT_RE_PROCDEF
  266. (
  267. ID_ VARCHAR(64) not NULL,
  268. REV_ INT4,
  269. CATEGORY_ VARCHAR(255),
  270. NAME_ VARCHAR(255),
  271. KEY_ VARCHAR(255) not null,
  272. VERSION_ INT4 not null,
  273. DEPLOYMENT_ID_ VARCHAR(64),
  274. RESOURCE_NAME_ VARCHAR(2000),
  275. DGRM_RESOURCE_NAME_ VARCHAR(4000),
  276. DESCRIPTION_ VARCHAR(2000),
  277. HAS_START_FORM_KEY_ NUMERIC(1),
  278. HAS_GRAPHICAL_NOTATION_ NUMERIC(1),
  279. SUSPENSION_STATE_ INT4,
  280. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
  281. DERIVED_FROM_ VARCHAR(64),
  282. DERIVED_FROM_ROOT_ VARCHAR(64),
  283. DERIVED_VERSION_ INT4 default 0 not null,
  284. ENGINE_VERSION_ VARCHAR(255),
  285. constraint ACT_RE_PROCDEF_PKEY primary key(ID_)
  286. );
  287. create unique index ACT_UNIQ_PROCDEF_UK on ACT_RE_PROCDEF(KEY_, VERSION_, DERIVED_VERSION_, TENANT_ID_);
  288. create table ACT_RU_ACTINST
  289. (
  290. ID_ VARCHAR(64) not NULL,
  291. REV_ INT4 default 1,
  292. PROC_DEF_ID_ VARCHAR(64) not null,
  293. PROC_INST_ID_ VARCHAR(64) not null,
  294. EXECUTION_ID_ VARCHAR(64) not null,
  295. ACT_ID_ VARCHAR(255) not null,
  296. TASK_ID_ VARCHAR(64),
  297. CALL_PROC_INST_ID_ VARCHAR(64),
  298. ACT_NAME_ VARCHAR(255),
  299. ACT_TYPE_ VARCHAR(255) not null,
  300. ASSIGNEE_ VARCHAR(255),
  301. START_TIME_ TIMESTAMP not null,
  302. END_TIME_ TIMESTAMP,
  303. DURATION_ NUMERIC(12,2),
  304. TRANSACTION_ORDER_ INT4,
  305. DELETE_REASON_ VARCHAR(2000),
  306. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
  307. constraint ACT_RU_ACTINST_PKEY primary key(ID_)
  308. );
  309. create index ACT_IDX_RU_ACTI_END
  310. on ACT_RU_ACTINST (END_TIME_);
  311. create index ACT_IDX_RU_ACTI_EXEC
  312. on ACT_RU_ACTINST (EXECUTION_ID_);
  313. create index ACT_IDX_RU_ACTI_EXEC_ACT
  314. on ACT_RU_ACTINST (EXECUTION_ID_, ACT_ID_);
  315. create index ACT_IDX_RU_ACTI_PROC
  316. on ACT_RU_ACTINST (PROC_INST_ID_);
  317. create index ACT_IDX_RU_ACTI_PROC_ACT
  318. on ACT_RU_ACTINST (PROC_INST_ID_, ACT_ID_);
  319. create index ACT_IDX_RU_ACTI_START
  320. on ACT_RU_ACTINST (START_TIME_);
  321. create index ACT_IDX_RU_ACTI_TASK
  322. on ACT_RU_ACTINST (TASK_ID_);
  323. create table ACT_RU_DEADLETTER_JOB
  324. (
  325. ID_ VARCHAR(64) not NULL,
  326. REV_ INT4,
  327. CATEGORY_ VARCHAR(255),
  328. TYPE_ VARCHAR(255) not null,
  329. EXCLUSIVE_ BOOL,
  330. EXECUTION_ID_ VARCHAR(64),
  331. PROCESS_INSTANCE_ID_ VARCHAR(64),
  332. PROC_DEF_ID_ VARCHAR(64),
  333. ELEMENT_ID_ VARCHAR(255),
  334. ELEMENT_NAME_ VARCHAR(255),
  335. SCOPE_ID_ VARCHAR(255),
  336. SUB_SCOPE_ID_ VARCHAR(255),
  337. SCOPE_TYPE_ VARCHAR(255),
  338. SCOPE_DEFINITION_ID_ VARCHAR(255),
  339. CORRELATION_ID_ VARCHAR(255),
  340. EXCEPTION_STACK_ID_ VARCHAR(64),
  341. EXCEPTION_MSG_ VARCHAR(4000),
  342. DUEDATE_ TIMESTAMP,
  343. REPEAT_ VARCHAR(255),
  344. HANDLER_TYPE_ VARCHAR(255),
  345. HANDLER_CFG_ text,
  346. CUSTOM_VALUES_ID_ VARCHAR(12),
  347. CREATE_TIME_ TIMESTAMP,
  348. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
  349. constraint ACT_RU_DEADLETTER_JOB_PKEY primary KEY(ID_)
  350. );
  351. create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID
  352. on ACT_RU_DEADLETTER_JOB (CORRELATION_ID_);
  353. create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID
  354. on ACT_RU_DEADLETTER_JOB (CUSTOM_VALUES_ID_);
  355. create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID
  356. on ACT_RU_DEADLETTER_JOB (EXCEPTION_STACK_ID_);
  357. create index ACT_IDX_DJOB_EXECUTION_ID
  358. on ACT_RU_DEADLETTER_JOB (EXECUTION_ID_);
  359. create index ACT_IDX_DJOB_PROC_DEF_ID
  360. on ACT_RU_DEADLETTER_JOB (PROC_DEF_ID_);
  361. create index ACT_IDX_DJOB_PROC_INST_ID
  362. on ACT_RU_DEADLETTER_JOB (PROCESS_INSTANCE_ID_);
  363. create index ACT_IDX_DJOB_SCOPE
  364. on ACT_RU_DEADLETTER_JOB (SCOPE_ID_, SCOPE_TYPE_);
  365. create index ACT_IDX_DJOB_SCOPE_DEF
  366. on ACT_RU_DEADLETTER_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
  367. create index ACT_IDX_DJOB_SUB_SCOPE
  368. on ACT_RU_DEADLETTER_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_);
  369. create table ACT_RU_ENTITYLINK
  370. (
  371. ID_ VARCHAR(64) not null,
  372. REV_ INT4,
  373. CREATE_TIME_ TIMESTAMP,
  374. LINK_TYPE_ VARCHAR(255),
  375. SCOPE_ID_ VARCHAR(255),
  376. SUB_SCOPE_ID_ VARCHAR(255),
  377. SCOPE_TYPE_ VARCHAR(255),
  378. SCOPE_DEFINITION_ID_ VARCHAR(255),
  379. PARENT_ELEMENT_ID_ VARCHAR(255),
  380. REF_SCOPE_ID_ VARCHAR(255),
  381. REF_SCOPE_TYPE_ VARCHAR(255),
  382. REF_SCOPE_DEFINITION_ID_ VARCHAR(255),
  383. ROOT_SCOPE_ID_ VARCHAR(255),
  384. ROOT_SCOPE_TYPE_ VARCHAR(255),
  385. HIERARCHY_TYPE_ VARCHAR(255)
  386. );
  387. create index ACT_IDX_ENT_LNK_REF_SCOPE
  388. on ACT_RU_ENTITYLINK (REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
  389. create index ACT_IDX_ENT_LNK_ROOT_SCOPE
  390. on ACT_RU_ENTITYLINK (ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
  391. create index ACT_IDX_ENT_LNK_SCOPE
  392. on ACT_RU_ENTITYLINK (SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
  393. create index ACT_IDX_ENT_LNK_SCOPE_DEF
  394. on ACT_RU_ENTITYLINK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);
  395. -- auto-generated definition
  396. create table ACT_RU_EVENT_SUBSCR
  397. (
  398. ID_ VARCHAR(64) not null
  399. constraint ACT_RU_EVENT_SUBSCR_PKEY
  400. primary key,
  401. REV_ INT4,
  402. EVENT_TYPE_ VARCHAR(255) not null,
  403. EVENT_NAME_ VARCHAR(255),
  404. EXECUTION_ID_ VARCHAR(64),
  405. PROC_INST_ID_ VARCHAR(64),
  406. ACTIVITY_ID_ VARCHAR(64),
  407. CONFIGURATION_ VARCHAR(255),
  408. CREATED_ TIMESTAMP,
  409. PROC_DEF_ID_ VARCHAR(64),
  410. SUB_SCOPE_ID_ VARCHAR(64),
  411. SCOPE_ID_ VARCHAR(64),
  412. SCOPE_DEFINITION_ID_ VARCHAR(64),
  413. SCOPE_TYPE_ VARCHAR(64),
  414. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING'
  415. );
  416. create index ACT_IDX_EVENT_SUBSCR_CONFIG_
  417. on ACT_RU_EVENT_SUBSCR (CONFIGURATION_);
  418. -- auto-generated definition
  419. create table ACT_RU_EXECUTION
  420. (
  421. ID_ VARCHAR(64) not null
  422. constraint ACT_RU_EXECUTION_PKEY
  423. primary key,
  424. REV_ INT4,
  425. PROC_INST_ID_ VARCHAR(64),
  426. BUSINESS_KEY_ VARCHAR(255),
  427. PARENT_ID_ VARCHAR(64),
  428. PROC_DEF_ID_ VARCHAR(64),
  429. SUPER_EXEC_ VARCHAR(64),
  430. ROOT_PROC_INST_ID_ VARCHAR(64),
  431. ACT_ID_ VARCHAR(255),
  432. IS_ACTIVE_ NUMERIC(1),
  433. IS_CONCURRENT_ NUMERIC(1),
  434. IS_SCOPE_ NUMERIC(1),
  435. IS_EVENT_SCOPE_ NUMERIC(1),
  436. IS_MI_ROOT_ NUMERIC(1),
  437. SUSPENSION_STATE_ INT4,
  438. CACHED_ENT_STATE_ INT4,
  439. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
  440. NAME_ VARCHAR(255),
  441. START_ACT_ID_ VARCHAR(255),
  442. START_TIME_ TIMESTAMP,
  443. START_USER_ID_ VARCHAR(255),
  444. LOCK_TIME_ TIMESTAMP,
  445. LOCK_OWNER_ VARCHAR(255),
  446. IS_COUNT_ENABLED_ NUMERIC(12,2),
  447. EVT_SUBSCR_COUNT_ INT4,
  448. TASK_COUNT_ INT4,
  449. JOB_COUNT_ INT4,
  450. TIMER_JOB_COUNT_ INT4,
  451. SUSP_JOB_COUNT_ INT4,
  452. DEADLETTER_JOB_COUNT_ INT4,
  453. EXTERNAL_WORKER_JOB_COUNT_ INT4,
  454. VAR_COUNT_ INT4,
  455. ID_LINK_COUNT_ INT4,
  456. CALLBACK_ID_ VARCHAR(255),
  457. CALLBACK_TYPE_ VARCHAR(255),
  458. REFERENCE_ID_ VARCHAR(255),
  459. REFERENCE_TYPE_ VARCHAR(255),
  460. PROPAGATED_STAGE_INST_ID_ VARCHAR(255),
  461. BUSINESS_STATUS_ VARCHAR(255)
  462. );
  463. create index ACT_IDX_EXEC_BUSKEY
  464. on ACT_RU_EXECUTION (BUSINESS_KEY_);
  465. create index ACT_IDX_EXEC_REF_ID_
  466. on ACT_RU_EXECUTION (REFERENCE_ID_);
  467. create index ACT_IDX_EXEC_ROOT
  468. on ACT_RU_EXECUTION (ROOT_PROC_INST_ID_);
  469. create index ACT_IDX_EXE_PARENT
  470. on ACT_RU_EXECUTION (PARENT_ID_);
  471. create index ACT_IDX_EXE_PROCDEF
  472. on ACT_RU_EXECUTION (PROC_DEF_ID_);
  473. create index ACT_IDX_EXE_PROCINST
  474. on ACT_RU_EXECUTION (PROC_INST_ID_);
  475. create index ACT_IDX_EXE_SUPER
  476. on ACT_RU_EXECUTION (SUPER_EXEC_);
  477. create table ACT_RU_EXTERNAL_JOB
  478. (
  479. ID_ VARCHAR(64) not null
  480. constraint ACT_RU_EXTERNAL_JOB_PKEY
  481. primary key,
  482. REV_ INT4,
  483. CATEGORY_ VARCHAR(255),
  484. TYPE_ VARCHAR(255) not null,
  485. LOCK_EXP_TIME_ TIMESTAMP,
  486. LOCK_OWNER_ VARCHAR(255),
  487. EXCLUSIVE_ BOOL,
  488. EXECUTION_ID_ VARCHAR(64),
  489. PROCESS_INSTANCE_ID_ VARCHAR(64),
  490. PROC_DEF_ID_ VARCHAR(64),
  491. ELEMENT_ID_ VARCHAR(255),
  492. ELEMENT_NAME_ VARCHAR(255),
  493. SCOPE_ID_ VARCHAR(255),
  494. SUB_SCOPE_ID_ VARCHAR(255),
  495. SCOPE_TYPE_ VARCHAR(255),
  496. SCOPE_DEFINITION_ID_ VARCHAR(255),
  497. CORRELATION_ID_ VARCHAR(255),
  498. RETRIES_ INT4,
  499. EXCEPTION_STACK_ID_ VARCHAR(64),
  500. EXCEPTION_MSG_ text,
  501. DUEDATE_ TIMESTAMP,
  502. REPEAT_ VARCHAR(255),
  503. HANDLER_TYPE_ VARCHAR(255),
  504. HANDLER_CFG_ text,
  505. CUSTOM_VALUES_ID_ VARCHAR(64),
  506. CREATE_TIME_ TIMESTAMP,
  507. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING'
  508. );
  509. create index ACT_IDX_EJOB_SCOPE
  510. on ACT_RU_EXTERNAL_JOB (SCOPE_ID_, SCOPE_TYPE_);
  511. create index ACT_IDX_EJOB_SCOPE_DEF
  512. on ACT_RU_EXTERNAL_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
  513. create index ACT_IDX_EJOB_SUB_SCOPE
  514. on ACT_RU_EXTERNAL_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_);
  515. create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID
  516. on ACT_RU_EXTERNAL_JOB (CORRELATION_ID_);
  517. create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID
  518. on ACT_RU_EXTERNAL_JOB (CUSTOM_VALUES_ID_);
  519. create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID
  520. on ACT_RU_EXTERNAL_JOB (EXCEPTION_STACK_ID_);
  521. create table ACT_RU_HISTORY_JOB
  522. (
  523. ID_ VARCHAR(64) not null
  524. constraint ACT_RU_HISTORY_JOB_PKEY
  525. primary key,
  526. REV_ INT4,
  527. LOCK_EXP_TIME_ TIMESTAMP,
  528. LOCK_OWNER_ VARCHAR(255),
  529. RETRIES_ INT4,
  530. EXCEPTION_STACK_ID_ VARCHAR(64),
  531. EXCEPTION_MSG_ VARCHAR(4000),
  532. HANDLER_TYPE_ VARCHAR(255),
  533. HANDLER_CFG_ VARCHAR(4000),
  534. CUSTOM_VALUES_ID_ VARCHAR(64),
  535. ADV_HANDLER_CFG_ID_ VARCHAR(64),
  536. CREATE_TIME_ TIMESTAMP,
  537. SCOPE_TYPE_ VARCHAR(255),
  538. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING'
  539. );
  540. create table ACT_RU_IDENTITYLINK
  541. (
  542. ID_ VARCHAR(64) not null
  543. constraint ACT_RU_IDENTITYLINK_PKEY
  544. primary key,
  545. REV_ INT4,
  546. GROUP_ID_ VARCHAR(255),
  547. TYPE_ VARCHAR(255),
  548. USER_ID_ VARCHAR(255),
  549. TASK_ID_ VARCHAR(64),
  550. PROC_INST_ID_ VARCHAR(64),
  551. PROC_DEF_ID_ VARCHAR(64),
  552. SCOPE_ID_ VARCHAR(255),
  553. SUB_SCOPE_ID_ VARCHAR(255),
  554. SCOPE_TYPE_ VARCHAR(255),
  555. SCOPE_DEFINITION_ID_ VARCHAR(255)
  556. );
  557. create index ACT_IDX_ATHRZ_PROCEDEF
  558. on ACT_RU_IDENTITYLINK (PROC_DEF_ID_);
  559. create index ACT_IDX_IDENT_LNK_GROUP
  560. on ACT_RU_IDENTITYLINK (GROUP_ID_);
  561. create index ACT_IDX_IDENT_LNK_SCOPE
  562. on ACT_RU_IDENTITYLINK (SCOPE_ID_, SCOPE_TYPE_);
  563. create index ACT_IDX_IDENT_LNK_SCOPE_DEF
  564. on ACT_RU_IDENTITYLINK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
  565. create index ACT_IDX_IDENT_LNK_SUB_SCOPE
  566. on ACT_RU_IDENTITYLINK (SUB_SCOPE_ID_, SCOPE_TYPE_);
  567. create index ACT_IDX_IDENT_LNK_USER
  568. on ACT_RU_IDENTITYLINK (USER_ID_);
  569. create index ACT_IDX_IDL_PROCINST
  570. on ACT_RU_IDENTITYLINK (PROC_INST_ID_);
  571. create index ACT_IDX_TSKASS_TASK
  572. on ACT_RU_IDENTITYLINK (TASK_ID_);
  573. create table ACT_RU_JOB
  574. (
  575. ID_ VARCHAR(64) not null
  576. constraint ACT_RU_JOB_PKEY
  577. primary key,
  578. REV_ INT4,
  579. CATEGORY_ VARCHAR(255),
  580. TYPE_ VARCHAR(255) not null,
  581. LOCK_EXP_TIME_ TIMESTAMP,
  582. LOCK_OWNER_ VARCHAR(255),
  583. EXCLUSIVE_ BOOL,
  584. EXECUTION_ID_ VARCHAR(64),
  585. PROCESS_INSTANCE_ID_ VARCHAR(64),
  586. PROC_DEF_ID_ VARCHAR(64),
  587. ELEMENT_ID_ VARCHAR(255),
  588. ELEMENT_NAME_ VARCHAR(255),
  589. SCOPE_ID_ VARCHAR(255),
  590. SUB_SCOPE_ID_ VARCHAR(255),
  591. SCOPE_TYPE_ VARCHAR(255),
  592. SCOPE_DEFINITION_ID_ VARCHAR(255),
  593. CORRELATION_ID_ VARCHAR(255),
  594. RETRIES_ INT4,
  595. EXCEPTION_STACK_ID_ VARCHAR(64),
  596. EXCEPTION_MSG_ text,
  597. DUEDATE_ TIMESTAMP,
  598. REPEAT_ VARCHAR(255),
  599. HANDLER_TYPE_ VARCHAR(255),
  600. HANDLER_CFG_ VARCHAR(4000),
  601. CUSTOM_VALUES_ID_ VARCHAR(64),
  602. CREATE_TIME_ TIMESTAMP,
  603. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING'
  604. );
  605. create index ACT_IDX_JOB_CORRELATION_ID
  606. on ACT_RU_JOB (CORRELATION_ID_);
  607. create index ACT_IDX_JOB_CUSTOM_VALUES_ID
  608. on ACT_RU_JOB (CUSTOM_VALUES_ID_);
  609. create index ACT_IDX_JOB_EXCEPTION_STACK_ID
  610. on ACT_RU_JOB (EXCEPTION_STACK_ID_);
  611. create index ACT_IDX_JOB_EXECUTION_ID
  612. on ACT_RU_JOB (EXECUTION_ID_);
  613. create index ACT_IDX_JOB_PROC_DEF_ID
  614. on ACT_RU_JOB (PROC_DEF_ID_);
  615. create index ACT_IDX_JOB_PROC_INST_ID
  616. on ACT_RU_JOB (PROCESS_INSTANCE_ID_);
  617. create index ACT_IDX_JOB_SCOPE
  618. on ACT_RU_JOB (SCOPE_ID_, SCOPE_TYPE_);
  619. create index ACT_IDX_JOB_SCOPE_DEF
  620. on ACT_RU_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
  621. create index ACT_IDX_JOB_SUB_SCOPE
  622. on ACT_RU_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_);
  623. create table ACT_RU_SUSPENDED_JOB
  624. (
  625. ID_ VARCHAR(64) not null
  626. constraint ACT_RU_SUSPENDED_JOB_PKEY
  627. primary key,
  628. REV_ INT4,
  629. CATEGORY_ VARCHAR(255),
  630. TYPE_ VARCHAR(255) not null,
  631. EXCLUSIVE_ BOOL,
  632. EXECUTION_ID_ VARCHAR(64),
  633. PROCESS_INSTANCE_ID_ VARCHAR(64),
  634. PROC_DEF_ID_ VARCHAR(64),
  635. ELEMENT_ID_ VARCHAR(255),
  636. ELEMENT_NAME_ VARCHAR(255),
  637. SCOPE_ID_ VARCHAR(255),
  638. SUB_SCOPE_ID_ VARCHAR(255),
  639. SCOPE_TYPE_ VARCHAR(255),
  640. SCOPE_DEFINITION_ID_ VARCHAR(255),
  641. CORRELATION_ID_ VARCHAR(255),
  642. RETRIES_ INT4,
  643. EXCEPTION_STACK_ID_ VARCHAR(64),
  644. EXCEPTION_MSG_ VARCHAR(4000),
  645. DUEDATE_ TIMESTAMP,
  646. REPEAT_ VARCHAR(255),
  647. HANDLER_TYPE_ VARCHAR(255),
  648. HANDLER_CFG_ VARCHAR(4000),
  649. CUSTOM_VALUES_ID_ VARCHAR(64),
  650. CREATE_TIME_ TIMESTAMP,
  651. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING'
  652. );
  653. create index ACT_IDX_SJOB_EXECUTION_ID
  654. on ACT_RU_SUSPENDED_JOB (EXECUTION_ID_);
  655. create index ACT_IDX_SJOB_PROC_DEF_ID
  656. on ACT_RU_SUSPENDED_JOB (PROC_DEF_ID_);
  657. create index ACT_IDX_SJOB_PROC_INST_ID
  658. on ACT_RU_SUSPENDED_JOB (PROCESS_INSTANCE_ID_);
  659. create index ACT_IDX_SJOB_SCOPE
  660. on ACT_RU_SUSPENDED_JOB (SCOPE_ID_, SCOPE_TYPE_);
  661. create index ACT_IDX_SJOB_SCOPE_DEF
  662. on ACT_RU_SUSPENDED_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
  663. create index ACT_IDX_SJOB_SUB_SCOPE
  664. on ACT_RU_SUSPENDED_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_);
  665. create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID
  666. on ACT_RU_SUSPENDED_JOB (CORRELATION_ID_);
  667. create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID
  668. on ACT_RU_SUSPENDED_JOB (CUSTOM_VALUES_ID_);
  669. create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID
  670. on ACT_RU_SUSPENDED_JOB (EXCEPTION_STACK_ID_);
  671. create table ACT_RU_TASK
  672. (
  673. ID_ VARCHAR(64) not null
  674. constraint ACT_RU_TASK_PKEY
  675. primary key,
  676. REV_ INT4,
  677. EXECUTION_ID_ VARCHAR(64),
  678. PROC_INST_ID_ VARCHAR(64),
  679. PROC_DEF_ID_ VARCHAR(64),
  680. TASK_DEF_ID_ VARCHAR(64),
  681. SCOPE_ID_ VARCHAR(255),
  682. SUB_SCOPE_ID_ VARCHAR(255),
  683. SCOPE_TYPE_ VARCHAR(255),
  684. SCOPE_DEFINITION_ID_ VARCHAR(255),
  685. PROPAGATED_STAGE_INST_ID_ VARCHAR(255),
  686. NAME_ VARCHAR(255),
  687. PARENT_TASK_ID_ VARCHAR(64),
  688. DESCRIPTION_ VARCHAR(2000),
  689. TASK_DEF_KEY_ VARCHAR(255),
  690. OWNER_ VARCHAR(255),
  691. ASSIGNEE_ VARCHAR(255),
  692. DELEGATION_ VARCHAR(64),
  693. PRIORITY_ INT4,
  694. CREATE_TIME_ TIMESTAMP ,
  695. DUE_DATE_ TIMESTAMP,
  696. CATEGORY_ VARCHAR(255),
  697. SUSPENSION_STATE_ INT4,
  698. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
  699. FORM_KEY_ VARCHAR(255),
  700. CLAIM_TIME_ TIMESTAMP,
  701. IS_COUNT_ENABLED_ NUMERIC(12,2),
  702. VAR_COUNT_ INT4,
  703. ID_LINK_COUNT_ INT4,
  704. SUB_TASK_COUNT_ INT4
  705. );
  706. create index ACT_IDX_TASK_CREATE
  707. on ACT_RU_TASK (CREATE_TIME_);
  708. create index ACT_IDX_TASK_EXEC
  709. on ACT_RU_TASK (EXECUTION_ID_);
  710. create index ACT_IDX_TASK_PROCDEF
  711. on ACT_RU_TASK (PROC_DEF_ID_);
  712. create index ACT_IDX_TASK_PROCINST
  713. on ACT_RU_TASK (PROC_INST_ID_);
  714. create index ACT_IDX_TASK_SCOPE
  715. on ACT_RU_TASK (SCOPE_ID_, SCOPE_TYPE_);
  716. create index ACT_IDX_TASK_SCOPE_DEF
  717. on ACT_RU_TASK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
  718. create index ACT_IDX_TASK_SUB_SCOPE
  719. on ACT_RU_TASK (SUB_SCOPE_ID_, SCOPE_TYPE_);
  720. create table ACT_RU_TIMER_JOB
  721. (
  722. ID_ VARCHAR(64) not null
  723. constraint ACT_RU_TIMER_JOB_PKEY
  724. primary key,
  725. REV_ INT4,
  726. CATEGORY_ VARCHAR(255),
  727. TYPE_ VARCHAR(255) not null,
  728. LOCK_EXP_TIME_ TIMESTAMP,
  729. LOCK_OWNER_ VARCHAR(255),
  730. EXCLUSIVE_ BOOL,
  731. EXECUTION_ID_ VARCHAR(64),
  732. PROCESS_INSTANCE_ID_ VARCHAR(64),
  733. PROC_DEF_ID_ VARCHAR(64),
  734. ELEMENT_ID_ VARCHAR(255),
  735. ELEMENT_NAME_ VARCHAR(255),
  736. SCOPE_ID_ VARCHAR(255),
  737. SUB_SCOPE_ID_ VARCHAR(255),
  738. SCOPE_TYPE_ VARCHAR(255),
  739. SCOPE_DEFINITION_ID_ VARCHAR(255),
  740. CORRELATION_ID_ VARCHAR(255),
  741. RETRIES_ INT4,
  742. EXCEPTION_STACK_ID_ VARCHAR(64),
  743. EXCEPTION_MSG_ VARCHAR(4000),
  744. DUEDATE_ TIMESTAMP,
  745. REPEAT_ VARCHAR(255),
  746. HANDLER_TYPE_ VARCHAR(255),
  747. HANDLER_CFG_ VARCHAR(4000),
  748. CUSTOM_VALUES_ID_ VARCHAR(64),
  749. CREATE_TIME_ TIMESTAMP,
  750. TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING'
  751. );
  752. create index ACT_IDX_TIMER_JOB_CORRELATION_ID
  753. on ACT_RU_TIMER_JOB (CORRELATION_ID_);
  754. create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID
  755. on ACT_RU_TIMER_JOB (CUSTOM_VALUES_ID_);
  756. create index ACT_IDX_TIMER_JOB_DUEDATE
  757. on ACT_RU_TIMER_JOB (DUEDATE_);
  758. create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID
  759. on ACT_RU_TIMER_JOB (EXCEPTION_STACK_ID_);
  760. create index ACT_IDX_TJOB_EXECUTION_ID
  761. on ACT_RU_TIMER_JOB (EXECUTION_ID_);
  762. create index ACT_IDX_TJOB_PROC_DEF_ID
  763. on ACT_RU_TIMER_JOB (PROC_DEF_ID_);
  764. create index ACT_IDX_TJOB_PROC_INST_ID
  765. on ACT_RU_TIMER_JOB (PROCESS_INSTANCE_ID_);
  766. create index ACT_IDX_TJOB_SCOPE
  767. on ACT_RU_TIMER_JOB (SCOPE_ID_, SCOPE_TYPE_);
  768. create index ACT_IDX_TJOB_SCOPE_DEF
  769. on ACT_RU_TIMER_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
  770. create index ACT_IDX_TJOB_SUB_SCOPE
  771. on ACT_RU_TIMER_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_);
  772. create table ACT_RU_VARIABLE
  773. (
  774. ID_ VARCHAR(64) not null
  775. constraint ACT_RU_VARIABLE_PKEY
  776. primary key,
  777. REV_ INT4,
  778. TYPE_ VARCHAR(255) not null,
  779. NAME_ VARCHAR(255) not null,
  780. EXECUTION_ID_ VARCHAR(64),
  781. PROC_INST_ID_ VARCHAR(64),
  782. TASK_ID_ VARCHAR(64),
  783. SCOPE_ID_ VARCHAR(255),
  784. SUB_SCOPE_ID_ VARCHAR(255),
  785. SCOPE_TYPE_ VARCHAR(255),
  786. BYTEARRAY_ID_ VARCHAR(64),
  787. DOUBLE_ NUMERIC(12,2),
  788. LONG_ NUMERIC(12,2),
  789. TEXT_ VARCHAR(2000),
  790. TEXT2_ VARCHAR(2000)
  791. );
  792. create index ACT_IDX_RU_VAR_SCOPE_ID_TYPE
  793. on ACT_RU_VARIABLE (SCOPE_ID_, SCOPE_TYPE_);
  794. create index ACT_IDX_RU_VAR_SUB_ID_TYPE
  795. on ACT_RU_VARIABLE (SUB_SCOPE_ID_, SCOPE_TYPE_);
  796. create index ACT_IDX_VARIABLE_TASK_ID
  797. on ACT_RU_VARIABLE (TASK_ID_);
  798. create index ACT_IDX_VAR_BYTEARRAY
  799. on ACT_RU_VARIABLE (BYTEARRAY_ID_);
  800. create index ACT_IDX_VAR_EXE
  801. on ACT_RU_VARIABLE (EXECUTION_ID_);
  802. create index ACT_IDX_VAR_PROCINST
  803. on ACT_RU_VARIABLE (PROC_INST_ID_);