flow-script.sql 92 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706
  1. -- ----------------------------
  2. -- 这里包含流程引擎自带的数据表,以及橙单工作流模块内置的zz_flow开头的数据表。
  3. -- ----------------------------
  4. SET NAMES utf8mb4;
  5. SET FOREIGN_KEY_CHECKS = 0;
  6. -- ----------------------------
  7. -- Table structure for ACT_EVT_LOG
  8. -- ----------------------------
  9. DROP TABLE IF EXISTS `ACT_EVT_LOG`;
  10. CREATE TABLE `ACT_EVT_LOG`
  11. (
  12. `LOG_NR_` bigint(20) NOT NULL AUTO_INCREMENT,
  13. `TYPE_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  14. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  15. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  16. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  17. `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  18. `TIME_STAMP_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
  19. `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  20. `DATA_` longblob,
  21. `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  22. `LOCK_TIME_` timestamp(3) NULL DEFAULT NULL,
  23. `IS_PROCESSED_` tinyint(4) DEFAULT '0',
  24. PRIMARY KEY (`LOG_NR_`)
  25. ) ENGINE = InnoDB
  26. DEFAULT CHARSET = utf8
  27. COLLATE = utf8_bin;
  28. -- ----------------------------
  29. -- Table structure for ACT_GE_BYTEARRAY
  30. -- ----------------------------
  31. DROP TABLE IF EXISTS `ACT_GE_BYTEARRAY`;
  32. CREATE TABLE `ACT_GE_BYTEARRAY`
  33. (
  34. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  35. `REV_` int(11) DEFAULT NULL,
  36. `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  37. `DEPLOYMENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  38. `BYTES_` longblob,
  39. `GENERATED_` tinyint(4) DEFAULT NULL,
  40. PRIMARY KEY (`ID_`),
  41. KEY `ACT_FK_BYTEARR_DEPL` (`DEPLOYMENT_ID_`),
  42. CONSTRAINT `ACT_FK_BYTEARR_DEPL` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `ACT_RE_DEPLOYMENT` (`ID_`)
  43. ) ENGINE = InnoDB
  44. DEFAULT CHARSET = utf8
  45. COLLATE = utf8_bin;
  46. -- ----------------------------
  47. -- Table structure for ACT_GE_PROPERTY
  48. -- ----------------------------
  49. DROP TABLE IF EXISTS `ACT_GE_PROPERTY`;
  50. CREATE TABLE `ACT_GE_PROPERTY`
  51. (
  52. `NAME_` varchar(64) COLLATE utf8_bin NOT NULL,
  53. `VALUE_` varchar(300) COLLATE utf8_bin DEFAULT NULL,
  54. `REV_` int(11) DEFAULT NULL,
  55. PRIMARY KEY (`NAME_`)
  56. ) ENGINE = InnoDB
  57. DEFAULT CHARSET = utf8
  58. COLLATE = utf8_bin;
  59. -- ----------------------------
  60. -- Records of ACT_GE_PROPERTY
  61. -- ----------------------------
  62. BEGIN;
  63. INSERT INTO `ACT_GE_PROPERTY`
  64. VALUES ('batch.schema.version', '6.6.0.0', 1);
  65. INSERT INTO `ACT_GE_PROPERTY`
  66. VALUES ('cfg.execution-related-entities-count', 'true', 1);
  67. INSERT INTO `ACT_GE_PROPERTY`
  68. VALUES ('cfg.task-related-entities-count', 'true', 1);
  69. INSERT INTO `ACT_GE_PROPERTY`
  70. VALUES ('common.schema.version', '6.6.0.0', 1);
  71. INSERT INTO `ACT_GE_PROPERTY`
  72. VALUES ('entitylink.schema.version', '6.6.0.0', 1);
  73. INSERT INTO `ACT_GE_PROPERTY`
  74. VALUES ('eventsubscription.schema.version', '6.6.0.0', 1);
  75. INSERT INTO `ACT_GE_PROPERTY`
  76. VALUES ('identitylink.schema.version', '6.6.0.0', 1);
  77. INSERT INTO `ACT_GE_PROPERTY`
  78. VALUES ('job.schema.version', '6.6.0.0', 1);
  79. INSERT INTO `ACT_GE_PROPERTY`
  80. VALUES ('next.dbid', '1', 1);
  81. INSERT INTO `ACT_GE_PROPERTY`
  82. VALUES ('schema.history', 'create(6.6.0.0)', 1);
  83. INSERT INTO `ACT_GE_PROPERTY`
  84. VALUES ('schema.version', '6.6.0.0', 1);
  85. INSERT INTO `ACT_GE_PROPERTY`
  86. VALUES ('task.schema.version', '6.6.0.0', 1);
  87. INSERT INTO `ACT_GE_PROPERTY`
  88. VALUES ('variable.schema.version', '6.6.0.0', 1);
  89. COMMIT;
  90. -- ----------------------------
  91. -- Table structure for ACT_HI_ACTINST
  92. -- ----------------------------
  93. DROP TABLE IF EXISTS `ACT_HI_ACTINST`;
  94. CREATE TABLE `ACT_HI_ACTINST`
  95. (
  96. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  97. `REV_` int(11) DEFAULT '1',
  98. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  99. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  100. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  101. `ACT_ID_` varchar(255) COLLATE utf8_bin NOT NULL,
  102. `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  103. `CALL_PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  104. `ACT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  105. `ACT_TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  106. `ASSIGNEE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  107. `START_TIME_` datetime(3) NOT NULL,
  108. `END_TIME_` datetime(3) DEFAULT NULL,
  109. `TRANSACTION_ORDER_` int(11) DEFAULT NULL,
  110. `DURATION_` bigint(20) DEFAULT NULL,
  111. `DELETE_REASON_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  112. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  113. PRIMARY KEY (`ID_`),
  114. KEY `ACT_IDX_HI_ACT_INST_START` (`START_TIME_`),
  115. KEY `ACT_IDX_HI_ACT_INST_END` (`END_TIME_`),
  116. KEY `ACT_IDX_HI_ACT_INST_PROCINST` (`PROC_INST_ID_`, `ACT_ID_`),
  117. KEY `ACT_IDX_HI_ACT_INST_EXEC` (`EXECUTION_ID_`, `ACT_ID_`)
  118. ) ENGINE = InnoDB
  119. DEFAULT CHARSET = utf8
  120. COLLATE = utf8_bin;
  121. -- ----------------------------
  122. -- Table structure for ACT_HI_ATTACHMENT
  123. -- ----------------------------
  124. DROP TABLE IF EXISTS `ACT_HI_ATTACHMENT`;
  125. CREATE TABLE `ACT_HI_ATTACHMENT`
  126. (
  127. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  128. `REV_` int(11) DEFAULT NULL,
  129. `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  130. `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  131. `DESCRIPTION_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  132. `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  133. `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  134. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  135. `URL_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  136. `CONTENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  137. `TIME_` datetime(3) DEFAULT NULL,
  138. PRIMARY KEY (`ID_`)
  139. ) ENGINE = InnoDB
  140. DEFAULT CHARSET = utf8
  141. COLLATE = utf8_bin;
  142. -- ----------------------------
  143. -- Table structure for ACT_HI_COMMENT
  144. -- ----------------------------
  145. DROP TABLE IF EXISTS `ACT_HI_COMMENT`;
  146. CREATE TABLE `ACT_HI_COMMENT`
  147. (
  148. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  149. `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  150. `TIME_` datetime(3) NOT NULL,
  151. `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  152. `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  153. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  154. `ACTION_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  155. `MESSAGE_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  156. `FULL_MSG_` longblob,
  157. PRIMARY KEY (`ID_`)
  158. ) ENGINE = InnoDB
  159. DEFAULT CHARSET = utf8
  160. COLLATE = utf8_bin;
  161. -- ----------------------------
  162. -- Table structure for ACT_HI_DETAIL
  163. -- ----------------------------
  164. DROP TABLE IF EXISTS `ACT_HI_DETAIL`;
  165. CREATE TABLE `ACT_HI_DETAIL`
  166. (
  167. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  168. `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  169. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  170. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  171. `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  172. `ACT_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  173. `NAME_` varchar(255) COLLATE utf8_bin NOT NULL,
  174. `VAR_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  175. `REV_` int(11) DEFAULT NULL,
  176. `TIME_` datetime(3) NOT NULL,
  177. `BYTEARRAY_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  178. `DOUBLE_` double DEFAULT NULL,
  179. `LONG_` bigint(20) DEFAULT NULL,
  180. `TEXT_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  181. `TEXT2_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  182. PRIMARY KEY (`ID_`),
  183. KEY `ACT_IDX_HI_DETAIL_PROC_INST` (`PROC_INST_ID_`),
  184. KEY `ACT_IDX_HI_DETAIL_ACT_INST` (`ACT_INST_ID_`),
  185. KEY `ACT_IDX_HI_DETAIL_TIME` (`TIME_`),
  186. KEY `ACT_IDX_HI_DETAIL_NAME` (`NAME_`),
  187. KEY `ACT_IDX_HI_DETAIL_TASK_ID` (`TASK_ID_`)
  188. ) ENGINE = InnoDB
  189. DEFAULT CHARSET = utf8
  190. COLLATE = utf8_bin;
  191. -- ----------------------------
  192. -- Table structure for ACT_HI_ENTITYLINK
  193. -- ----------------------------
  194. DROP TABLE IF EXISTS `ACT_HI_ENTITYLINK`;
  195. CREATE TABLE `ACT_HI_ENTITYLINK`
  196. (
  197. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  198. `LINK_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  199. `CREATE_TIME_` datetime(3) DEFAULT NULL,
  200. `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  201. `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  202. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  203. `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  204. `PARENT_ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  205. `REF_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  206. `REF_SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  207. `REF_SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  208. `ROOT_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  209. `ROOT_SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  210. `HIERARCHY_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  211. PRIMARY KEY (`ID_`),
  212. KEY `ACT_IDX_HI_ENT_LNK_SCOPE` (`SCOPE_ID_`, `SCOPE_TYPE_`, `LINK_TYPE_`),
  213. KEY `ACT_IDX_HI_ENT_LNK_ROOT_SCOPE` (`ROOT_SCOPE_ID_`, `ROOT_SCOPE_TYPE_`, `LINK_TYPE_`),
  214. KEY `ACT_IDX_HI_ENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`, `SCOPE_TYPE_`, `LINK_TYPE_`)
  215. ) ENGINE = InnoDB
  216. DEFAULT CHARSET = utf8
  217. COLLATE = utf8_bin;
  218. -- ----------------------------
  219. -- Table structure for ACT_HI_IDENTITYLINK
  220. -- ----------------------------
  221. DROP TABLE IF EXISTS `ACT_HI_IDENTITYLINK`;
  222. CREATE TABLE `ACT_HI_IDENTITYLINK`
  223. (
  224. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  225. `GROUP_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  226. `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  227. `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  228. `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  229. `CREATE_TIME_` datetime(3) DEFAULT NULL,
  230. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  231. `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  232. `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  233. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  234. `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  235. PRIMARY KEY (`ID_`),
  236. KEY `ACT_IDX_HI_IDENT_LNK_USER` (`USER_ID_`),
  237. KEY `ACT_IDX_HI_IDENT_LNK_SCOPE` (`SCOPE_ID_`, `SCOPE_TYPE_`),
  238. KEY `ACT_IDX_HI_IDENT_LNK_SUB_SCOPE` (`SUB_SCOPE_ID_`, `SCOPE_TYPE_`),
  239. KEY `ACT_IDX_HI_IDENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`, `SCOPE_TYPE_`),
  240. KEY `ACT_IDX_HI_IDENT_LNK_TASK` (`TASK_ID_`),
  241. KEY `ACT_IDX_HI_IDENT_LNK_PROCINST` (`PROC_INST_ID_`)
  242. ) ENGINE = InnoDB
  243. DEFAULT CHARSET = utf8
  244. COLLATE = utf8_bin;
  245. -- ----------------------------
  246. -- Table structure for ACT_HI_PROCINST
  247. -- ----------------------------
  248. DROP TABLE IF EXISTS `ACT_HI_PROCINST`;
  249. CREATE TABLE `ACT_HI_PROCINST`
  250. (
  251. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  252. `REV_` int(11) DEFAULT '1',
  253. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  254. `BUSINESS_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  255. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  256. `START_TIME_` datetime(3) NOT NULL,
  257. `END_TIME_` datetime(3) DEFAULT NULL,
  258. `DURATION_` bigint(20) DEFAULT NULL,
  259. `START_USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  260. `START_ACT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  261. `END_ACT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  262. `SUPER_PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  263. `DELETE_REASON_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  264. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  265. `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  266. `CALLBACK_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  267. `CALLBACK_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  268. `REFERENCE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  269. `REFERENCE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  270. PRIMARY KEY (`ID_`),
  271. UNIQUE KEY `PROC_INST_ID_` (`PROC_INST_ID_`),
  272. KEY `ACT_IDX_HI_PRO_INST_END` (`END_TIME_`),
  273. KEY `ACT_IDX_HI_PRO_I_BUSKEY` (`BUSINESS_KEY_`)
  274. ) ENGINE = InnoDB
  275. DEFAULT CHARSET = utf8
  276. COLLATE = utf8_bin;
  277. -- ----------------------------
  278. -- Table structure for ACT_HI_TASKINST
  279. -- ----------------------------
  280. DROP TABLE IF EXISTS `ACT_HI_TASKINST`;
  281. CREATE TABLE `ACT_HI_TASKINST`
  282. (
  283. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  284. `REV_` int(11) DEFAULT '1',
  285. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  286. `TASK_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  287. `TASK_DEF_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  288. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  289. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  290. `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  291. `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  292. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  293. `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  294. `PROPAGATED_STAGE_INST_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  295. `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  296. `PARENT_TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  297. `DESCRIPTION_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  298. `OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  299. `ASSIGNEE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  300. `START_TIME_` datetime(3) NOT NULL,
  301. `CLAIM_TIME_` datetime(3) DEFAULT NULL,
  302. `END_TIME_` datetime(3) DEFAULT NULL,
  303. `DURATION_` bigint(20) DEFAULT NULL,
  304. `DELETE_REASON_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  305. `PRIORITY_` int(11) DEFAULT NULL,
  306. `DUE_DATE_` datetime(3) DEFAULT NULL,
  307. `FORM_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  308. `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  309. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  310. `LAST_UPDATED_TIME_` datetime(3) DEFAULT NULL,
  311. PRIMARY KEY (`ID_`),
  312. KEY `ACT_IDX_HI_TASK_SCOPE` (`SCOPE_ID_`, `SCOPE_TYPE_`),
  313. KEY `ACT_IDX_HI_TASK_SUB_SCOPE` (`SUB_SCOPE_ID_`, `SCOPE_TYPE_`),
  314. KEY `ACT_IDX_HI_TASK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`, `SCOPE_TYPE_`),
  315. KEY `ACT_IDX_HI_TASK_INST_PROCINST` (`PROC_INST_ID_`)
  316. ) ENGINE = InnoDB
  317. DEFAULT CHARSET = utf8
  318. COLLATE = utf8_bin;
  319. -- ----------------------------
  320. -- Table structure for ACT_HI_TSK_LOG
  321. -- ----------------------------
  322. DROP TABLE IF EXISTS `ACT_HI_TSK_LOG`;
  323. CREATE TABLE `ACT_HI_TSK_LOG`
  324. (
  325. `ID_` bigint(20) NOT NULL AUTO_INCREMENT,
  326. `TYPE_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  327. `TASK_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  328. `TIME_STAMP_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
  329. `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  330. `DATA_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  331. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  332. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  333. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  334. `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  335. `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  336. `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  337. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  338. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  339. PRIMARY KEY (`ID_`)
  340. ) ENGINE = InnoDB
  341. DEFAULT CHARSET = utf8
  342. COLLATE = utf8_bin;
  343. -- ----------------------------
  344. -- Table structure for ACT_HI_VARINST
  345. -- ----------------------------
  346. DROP TABLE IF EXISTS `ACT_HI_VARINST`;
  347. CREATE TABLE `ACT_HI_VARINST`
  348. (
  349. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  350. `REV_` int(11) DEFAULT '1',
  351. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  352. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  353. `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  354. `NAME_` varchar(255) COLLATE utf8_bin NOT NULL,
  355. `VAR_TYPE_` varchar(100) COLLATE utf8_bin DEFAULT NULL,
  356. `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  357. `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  358. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  359. `BYTEARRAY_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  360. `DOUBLE_` double DEFAULT NULL,
  361. `LONG_` bigint(20) DEFAULT NULL,
  362. `TEXT_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  363. `TEXT2_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  364. `CREATE_TIME_` datetime(3) DEFAULT NULL,
  365. `LAST_UPDATED_TIME_` datetime(3) DEFAULT NULL,
  366. PRIMARY KEY (`ID_`),
  367. KEY `ACT_IDX_HI_PROCVAR_NAME_TYPE` (`NAME_`, `VAR_TYPE_`),
  368. KEY `ACT_IDX_HI_VAR_SCOPE_ID_TYPE` (`SCOPE_ID_`, `SCOPE_TYPE_`),
  369. KEY `ACT_IDX_HI_VAR_SUB_ID_TYPE` (`SUB_SCOPE_ID_`, `SCOPE_TYPE_`),
  370. KEY `ACT_IDX_HI_PROCVAR_PROC_INST` (`PROC_INST_ID_`),
  371. KEY `ACT_IDX_HI_PROCVAR_TASK_ID` (`TASK_ID_`),
  372. KEY `ACT_IDX_HI_PROCVAR_EXE` (`EXECUTION_ID_`)
  373. ) ENGINE = InnoDB
  374. DEFAULT CHARSET = utf8
  375. COLLATE = utf8_bin;
  376. -- ----------------------------
  377. -- Table structure for ACT_ID_BYTEARRAY
  378. -- ----------------------------
  379. DROP TABLE IF EXISTS `ACT_ID_BYTEARRAY`;
  380. CREATE TABLE `ACT_ID_BYTEARRAY`
  381. (
  382. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  383. `REV_` int(11) DEFAULT NULL,
  384. `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  385. `BYTES_` longblob,
  386. PRIMARY KEY (`ID_`)
  387. ) ENGINE = InnoDB
  388. DEFAULT CHARSET = utf8
  389. COLLATE = utf8_bin;
  390. -- ----------------------------
  391. -- Table structure for ACT_ID_GROUP
  392. -- ----------------------------
  393. DROP TABLE IF EXISTS `ACT_ID_GROUP`;
  394. CREATE TABLE `ACT_ID_GROUP`
  395. (
  396. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  397. `REV_` int(11) DEFAULT NULL,
  398. `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  399. `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  400. PRIMARY KEY (`ID_`)
  401. ) ENGINE = InnoDB
  402. DEFAULT CHARSET = utf8
  403. COLLATE = utf8_bin;
  404. -- ----------------------------
  405. -- Table structure for ACT_ID_INFO
  406. -- ----------------------------
  407. DROP TABLE IF EXISTS `ACT_ID_INFO`;
  408. CREATE TABLE `ACT_ID_INFO`
  409. (
  410. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  411. `REV_` int(11) DEFAULT NULL,
  412. `USER_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  413. `TYPE_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  414. `KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  415. `VALUE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  416. `PASSWORD_` longblob,
  417. `PARENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  418. PRIMARY KEY (`ID_`)
  419. ) ENGINE = InnoDB
  420. DEFAULT CHARSET = utf8
  421. COLLATE = utf8_bin;
  422. -- ----------------------------
  423. -- Table structure for ACT_ID_MEMBERSHIP
  424. -- ----------------------------
  425. DROP TABLE IF EXISTS `ACT_ID_MEMBERSHIP`;
  426. CREATE TABLE `ACT_ID_MEMBERSHIP`
  427. (
  428. `USER_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  429. `GROUP_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  430. PRIMARY KEY (`USER_ID_`, `GROUP_ID_`),
  431. KEY `ACT_FK_MEMB_GROUP` (`GROUP_ID_`),
  432. CONSTRAINT `ACT_FK_MEMB_GROUP` FOREIGN KEY (`GROUP_ID_`) REFERENCES `ACT_ID_GROUP` (`ID_`),
  433. CONSTRAINT `ACT_FK_MEMB_USER` FOREIGN KEY (`USER_ID_`) REFERENCES `ACT_ID_USER` (`ID_`)
  434. ) ENGINE = InnoDB
  435. DEFAULT CHARSET = utf8
  436. COLLATE = utf8_bin;
  437. -- ----------------------------
  438. -- Table structure for ACT_ID_PRIV
  439. -- ----------------------------
  440. DROP TABLE IF EXISTS `ACT_ID_PRIV`;
  441. CREATE TABLE `ACT_ID_PRIV`
  442. (
  443. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  444. `NAME_` varchar(255) COLLATE utf8_bin NOT NULL,
  445. PRIMARY KEY (`ID_`),
  446. UNIQUE KEY `ACT_UNIQ_PRIV_NAME` (`NAME_`)
  447. ) ENGINE = InnoDB
  448. DEFAULT CHARSET = utf8
  449. COLLATE = utf8_bin;
  450. -- ----------------------------
  451. -- Table structure for ACT_ID_PRIV_MAPPING
  452. -- ----------------------------
  453. DROP TABLE IF EXISTS `ACT_ID_PRIV_MAPPING`;
  454. CREATE TABLE `ACT_ID_PRIV_MAPPING`
  455. (
  456. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  457. `PRIV_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  458. `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  459. `GROUP_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  460. PRIMARY KEY (`ID_`),
  461. KEY `ACT_FK_PRIV_MAPPING` (`PRIV_ID_`),
  462. KEY `ACT_IDX_PRIV_USER` (`USER_ID_`),
  463. KEY `ACT_IDX_PRIV_GROUP` (`GROUP_ID_`),
  464. CONSTRAINT `ACT_FK_PRIV_MAPPING` FOREIGN KEY (`PRIV_ID_`) REFERENCES `ACT_ID_PRIV` (`ID_`)
  465. ) ENGINE = InnoDB
  466. DEFAULT CHARSET = utf8
  467. COLLATE = utf8_bin;
  468. -- ----------------------------
  469. -- Table structure for ACT_ID_PROPERTY
  470. -- ----------------------------
  471. DROP TABLE IF EXISTS `ACT_ID_PROPERTY`;
  472. CREATE TABLE `ACT_ID_PROPERTY`
  473. (
  474. `NAME_` varchar(64) COLLATE utf8_bin NOT NULL,
  475. `VALUE_` varchar(300) COLLATE utf8_bin DEFAULT NULL,
  476. `REV_` int(11) DEFAULT NULL,
  477. PRIMARY KEY (`NAME_`)
  478. ) ENGINE = InnoDB
  479. DEFAULT CHARSET = utf8
  480. COLLATE = utf8_bin;
  481. -- ----------------------------
  482. -- Records of ACT_ID_PROPERTY
  483. -- ----------------------------
  484. BEGIN;
  485. INSERT INTO `ACT_ID_PROPERTY`
  486. VALUES ('schema.version', '6.6.0.0', 1);
  487. COMMIT;
  488. -- ----------------------------
  489. -- Table structure for ACT_ID_TOKEN
  490. -- ----------------------------
  491. DROP TABLE IF EXISTS `ACT_ID_TOKEN`;
  492. CREATE TABLE `ACT_ID_TOKEN`
  493. (
  494. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  495. `REV_` int(11) DEFAULT NULL,
  496. `TOKEN_VALUE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  497. `TOKEN_DATE_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
  498. `IP_ADDRESS_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  499. `USER_AGENT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  500. `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  501. `TOKEN_DATA_` varchar(2000) COLLATE utf8_bin DEFAULT NULL,
  502. PRIMARY KEY (`ID_`)
  503. ) ENGINE = InnoDB
  504. DEFAULT CHARSET = utf8
  505. COLLATE = utf8_bin;
  506. -- ----------------------------
  507. -- Table structure for ACT_ID_USER
  508. -- ----------------------------
  509. DROP TABLE IF EXISTS `ACT_ID_USER`;
  510. CREATE TABLE `ACT_ID_USER`
  511. (
  512. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  513. `REV_` int(11) DEFAULT NULL,
  514. `FIRST_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  515. `LAST_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  516. `DISPLAY_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  517. `EMAIL_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  518. `PWD_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  519. `PICTURE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  520. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  521. PRIMARY KEY (`ID_`)
  522. ) ENGINE = InnoDB
  523. DEFAULT CHARSET = utf8
  524. COLLATE = utf8_bin;
  525. -- ----------------------------
  526. -- Table structure for ACT_PROCDEF_INFO
  527. -- ----------------------------
  528. DROP TABLE IF EXISTS `ACT_PROCDEF_INFO`;
  529. CREATE TABLE `ACT_PROCDEF_INFO`
  530. (
  531. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  532. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  533. `REV_` int(11) DEFAULT NULL,
  534. `INFO_JSON_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  535. PRIMARY KEY (`ID_`),
  536. UNIQUE KEY `ACT_UNIQ_INFO_PROCDEF` (`PROC_DEF_ID_`),
  537. KEY `ACT_IDX_INFO_PROCDEF` (`PROC_DEF_ID_`),
  538. KEY `ACT_FK_INFO_JSON_BA` (`INFO_JSON_ID_`),
  539. CONSTRAINT `ACT_FK_INFO_JSON_BA` FOREIGN KEY (`INFO_JSON_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  540. CONSTRAINT `ACT_FK_INFO_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`)
  541. ) ENGINE = InnoDB
  542. DEFAULT CHARSET = utf8
  543. COLLATE = utf8_bin;
  544. -- ----------------------------
  545. -- Table structure for ACT_RE_DEPLOYMENT
  546. -- ----------------------------
  547. DROP TABLE IF EXISTS `ACT_RE_DEPLOYMENT`;
  548. CREATE TABLE `ACT_RE_DEPLOYMENT`
  549. (
  550. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  551. `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  552. `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  553. `KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  554. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  555. `DEPLOY_TIME_` timestamp(3) NULL DEFAULT NULL,
  556. `DERIVED_FROM_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  557. `DERIVED_FROM_ROOT_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  558. `PARENT_DEPLOYMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  559. `ENGINE_VERSION_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  560. PRIMARY KEY (`ID_`)
  561. ) ENGINE = InnoDB
  562. DEFAULT CHARSET = utf8
  563. COLLATE = utf8_bin;
  564. -- ----------------------------
  565. -- Table structure for ACT_RE_MODEL
  566. -- ----------------------------
  567. DROP TABLE IF EXISTS `ACT_RE_MODEL`;
  568. CREATE TABLE `ACT_RE_MODEL`
  569. (
  570. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  571. `REV_` int(11) DEFAULT NULL,
  572. `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  573. `KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  574. `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  575. `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  576. `LAST_UPDATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  577. `VERSION_` int(11) DEFAULT NULL,
  578. `META_INFO_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  579. `DEPLOYMENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  580. `EDITOR_SOURCE_VALUE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  581. `EDITOR_SOURCE_EXTRA_VALUE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  582. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  583. PRIMARY KEY (`ID_`),
  584. KEY `ACT_FK_MODEL_SOURCE` (`EDITOR_SOURCE_VALUE_ID_`),
  585. KEY `ACT_FK_MODEL_SOURCE_EXTRA` (`EDITOR_SOURCE_EXTRA_VALUE_ID_`),
  586. KEY `ACT_FK_MODEL_DEPLOYMENT` (`DEPLOYMENT_ID_`),
  587. CONSTRAINT `ACT_FK_MODEL_DEPLOYMENT` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `ACT_RE_DEPLOYMENT` (`ID_`),
  588. CONSTRAINT `ACT_FK_MODEL_SOURCE` FOREIGN KEY (`EDITOR_SOURCE_VALUE_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  589. CONSTRAINT `ACT_FK_MODEL_SOURCE_EXTRA` FOREIGN KEY (`EDITOR_SOURCE_EXTRA_VALUE_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`)
  590. ) ENGINE = InnoDB
  591. DEFAULT CHARSET = utf8
  592. COLLATE = utf8_bin;
  593. -- ----------------------------
  594. -- Table structure for ACT_RE_PROCDEF
  595. -- ----------------------------
  596. DROP TABLE IF EXISTS `ACT_RE_PROCDEF`;
  597. CREATE TABLE `ACT_RE_PROCDEF`
  598. (
  599. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  600. `REV_` int(11) DEFAULT NULL,
  601. `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  602. `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  603. `KEY_` varchar(255) COLLATE utf8_bin NOT NULL,
  604. `VERSION_` int(11) NOT NULL,
  605. `DEPLOYMENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  606. `RESOURCE_NAME_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  607. `DGRM_RESOURCE_NAME_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  608. `DESCRIPTION_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  609. `HAS_START_FORM_KEY_` tinyint(4) DEFAULT NULL,
  610. `HAS_GRAPHICAL_NOTATION_` tinyint(4) DEFAULT NULL,
  611. `SUSPENSION_STATE_` int(11) DEFAULT NULL,
  612. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  613. `ENGINE_VERSION_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  614. `DERIVED_FROM_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  615. `DERIVED_FROM_ROOT_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  616. `DERIVED_VERSION_` int(11) NOT NULL DEFAULT '0',
  617. PRIMARY KEY (`ID_`),
  618. UNIQUE KEY `ACT_UNIQ_PROCDEF` (`KEY_`, `VERSION_`, `DERIVED_VERSION_`, `TENANT_ID_`)
  619. ) ENGINE = InnoDB
  620. DEFAULT CHARSET = utf8
  621. COLLATE = utf8_bin;
  622. -- ----------------------------
  623. -- Table structure for ACT_RU_ACTINST
  624. -- ----------------------------
  625. DROP TABLE IF EXISTS `ACT_RU_ACTINST`;
  626. CREATE TABLE `ACT_RU_ACTINST`
  627. (
  628. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  629. `REV_` int(11) DEFAULT '1',
  630. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  631. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  632. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  633. `ACT_ID_` varchar(255) COLLATE utf8_bin NOT NULL,
  634. `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  635. `CALL_PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  636. `ACT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  637. `ACT_TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  638. `ASSIGNEE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  639. `START_TIME_` datetime(3) NOT NULL,
  640. `END_TIME_` datetime(3) DEFAULT NULL,
  641. `DURATION_` bigint(20) DEFAULT NULL,
  642. `TRANSACTION_ORDER_` int(11) DEFAULT NULL,
  643. `DELETE_REASON_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  644. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  645. PRIMARY KEY (`ID_`),
  646. KEY `ACT_IDX_RU_ACTI_START` (`START_TIME_`),
  647. KEY `ACT_IDX_RU_ACTI_END` (`END_TIME_`),
  648. KEY `ACT_IDX_RU_ACTI_PROC` (`PROC_INST_ID_`),
  649. KEY `ACT_IDX_RU_ACTI_PROC_ACT` (`PROC_INST_ID_`, `ACT_ID_`),
  650. KEY `ACT_IDX_RU_ACTI_EXEC` (`EXECUTION_ID_`),
  651. KEY `ACT_IDX_RU_ACTI_EXEC_ACT` (`EXECUTION_ID_`, `ACT_ID_`)
  652. ) ENGINE = InnoDB
  653. DEFAULT CHARSET = utf8
  654. COLLATE = utf8_bin;
  655. -- ----------------------------
  656. -- Table structure for ACT_RU_DEADLETTER_JOB
  657. -- ----------------------------
  658. DROP TABLE IF EXISTS `ACT_RU_DEADLETTER_JOB`;
  659. CREATE TABLE `ACT_RU_DEADLETTER_JOB`
  660. (
  661. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  662. `REV_` int(11) DEFAULT NULL,
  663. `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  664. `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  665. `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  666. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  667. `PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  668. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  669. `ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  670. `ELEMENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  671. `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  672. `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  673. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  674. `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  675. `CORRELATION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  676. `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  677. `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  678. `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  679. `REPEAT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  680. `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  681. `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  682. `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  683. `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  684. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  685. PRIMARY KEY (`ID_`),
  686. KEY `ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`),
  687. KEY `ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`),
  688. KEY `ACT_IDX_DEADLETTER_JOB_CORRELATION_ID` (`CORRELATION_ID_`),
  689. KEY `ACT_IDX_DJOB_SCOPE` (`SCOPE_ID_`, `SCOPE_TYPE_`),
  690. KEY `ACT_IDX_DJOB_SUB_SCOPE` (`SUB_SCOPE_ID_`, `SCOPE_TYPE_`),
  691. KEY `ACT_IDX_DJOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`, `SCOPE_TYPE_`),
  692. KEY `ACT_FK_DEADLETTER_JOB_EXECUTION` (`EXECUTION_ID_`),
  693. KEY `ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`),
  694. KEY `ACT_FK_DEADLETTER_JOB_PROC_DEF` (`PROC_DEF_ID_`),
  695. CONSTRAINT `ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  696. CONSTRAINT `ACT_FK_DEADLETTER_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  697. CONSTRAINT `ACT_FK_DEADLETTER_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  698. CONSTRAINT `ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  699. CONSTRAINT `ACT_FK_DEADLETTER_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`)
  700. ) ENGINE = InnoDB
  701. DEFAULT CHARSET = utf8
  702. COLLATE = utf8_bin;
  703. -- ----------------------------
  704. -- Table structure for ACT_RU_ENTITYLINK
  705. -- ----------------------------
  706. DROP TABLE IF EXISTS `ACT_RU_ENTITYLINK`;
  707. CREATE TABLE `ACT_RU_ENTITYLINK`
  708. (
  709. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  710. `REV_` int(11) DEFAULT NULL,
  711. `CREATE_TIME_` datetime(3) DEFAULT NULL,
  712. `LINK_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  713. `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  714. `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  715. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  716. `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  717. `PARENT_ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  718. `REF_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  719. `REF_SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  720. `REF_SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  721. `ROOT_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  722. `ROOT_SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  723. `HIERARCHY_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  724. PRIMARY KEY (`ID_`),
  725. KEY `ACT_IDX_ENT_LNK_SCOPE` (`SCOPE_ID_`, `SCOPE_TYPE_`, `LINK_TYPE_`),
  726. KEY `ACT_IDX_ENT_LNK_ROOT_SCOPE` (`ROOT_SCOPE_ID_`, `ROOT_SCOPE_TYPE_`, `LINK_TYPE_`),
  727. KEY `ACT_IDX_ENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`, `SCOPE_TYPE_`, `LINK_TYPE_`)
  728. ) ENGINE = InnoDB
  729. DEFAULT CHARSET = utf8
  730. COLLATE = utf8_bin;
  731. -- ----------------------------
  732. -- Table structure for ACT_RU_EVENT_SUBSCR
  733. -- ----------------------------
  734. DROP TABLE IF EXISTS `ACT_RU_EVENT_SUBSCR`;
  735. CREATE TABLE `ACT_RU_EVENT_SUBSCR`
  736. (
  737. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  738. `REV_` int(11) DEFAULT NULL,
  739. `EVENT_TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  740. `EVENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  741. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  742. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  743. `ACTIVITY_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  744. `CONFIGURATION_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  745. `CREATED_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  746. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  747. `SUB_SCOPE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  748. `SCOPE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  749. `SCOPE_DEFINITION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  750. `SCOPE_TYPE_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  751. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  752. PRIMARY KEY (`ID_`),
  753. KEY `ACT_IDX_EVENT_SUBSCR_CONFIG_` (`CONFIGURATION_`),
  754. KEY `ACT_FK_EVENT_EXEC` (`EXECUTION_ID_`),
  755. CONSTRAINT `ACT_FK_EVENT_EXEC` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`)
  756. ) ENGINE = InnoDB
  757. DEFAULT CHARSET = utf8
  758. COLLATE = utf8_bin;
  759. -- ----------------------------
  760. -- Table structure for ACT_RU_EXECUTION
  761. -- ----------------------------
  762. DROP TABLE IF EXISTS `ACT_RU_EXECUTION`;
  763. CREATE TABLE `ACT_RU_EXECUTION`
  764. (
  765. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  766. `REV_` int(11) DEFAULT NULL,
  767. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  768. `BUSINESS_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  769. `PARENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  770. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  771. `SUPER_EXEC_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  772. `ROOT_PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  773. `ACT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  774. `IS_ACTIVE_` tinyint(4) DEFAULT NULL,
  775. `IS_CONCURRENT_` tinyint(4) DEFAULT NULL,
  776. `IS_SCOPE_` tinyint(4) DEFAULT NULL,
  777. `IS_EVENT_SCOPE_` tinyint(4) DEFAULT NULL,
  778. `IS_MI_ROOT_` tinyint(4) DEFAULT NULL,
  779. `SUSPENSION_STATE_` int(11) DEFAULT NULL,
  780. `CACHED_ENT_STATE_` int(11) DEFAULT NULL,
  781. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  782. `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  783. `START_ACT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  784. `START_TIME_` datetime(3) DEFAULT NULL,
  785. `START_USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  786. `LOCK_TIME_` timestamp(3) NULL DEFAULT NULL,
  787. `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  788. `IS_COUNT_ENABLED_` tinyint(4) DEFAULT NULL,
  789. `EVT_SUBSCR_COUNT_` int(11) DEFAULT NULL,
  790. `TASK_COUNT_` int(11) DEFAULT NULL,
  791. `JOB_COUNT_` int(11) DEFAULT NULL,
  792. `TIMER_JOB_COUNT_` int(11) DEFAULT NULL,
  793. `SUSP_JOB_COUNT_` int(11) DEFAULT NULL,
  794. `DEADLETTER_JOB_COUNT_` int(11) DEFAULT NULL,
  795. `EXTERNAL_WORKER_JOB_COUNT_` int(11) DEFAULT NULL,
  796. `VAR_COUNT_` int(11) DEFAULT NULL,
  797. `ID_LINK_COUNT_` int(11) DEFAULT NULL,
  798. `CALLBACK_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  799. `CALLBACK_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  800. `REFERENCE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  801. `REFERENCE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  802. `PROPAGATED_STAGE_INST_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  803. PRIMARY KEY (`ID_`),
  804. KEY `ACT_IDX_EXEC_BUSKEY` (`BUSINESS_KEY_`),
  805. KEY `ACT_IDC_EXEC_ROOT` (`ROOT_PROC_INST_ID_`),
  806. KEY `ACT_FK_EXE_PROCINST` (`PROC_INST_ID_`),
  807. KEY `ACT_FK_EXE_PARENT` (`PARENT_ID_`),
  808. KEY `ACT_FK_EXE_SUPER` (`SUPER_EXEC_`),
  809. KEY `ACT_FK_EXE_PROCDEF` (`PROC_DEF_ID_`),
  810. CONSTRAINT `ACT_FK_EXE_PARENT` FOREIGN KEY (`PARENT_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`) ON DELETE CASCADE,
  811. CONSTRAINT `ACT_FK_EXE_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`),
  812. CONSTRAINT `ACT_FK_EXE_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`) ON DELETE CASCADE ON UPDATE CASCADE,
  813. CONSTRAINT `ACT_FK_EXE_SUPER` FOREIGN KEY (`SUPER_EXEC_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`) ON DELETE CASCADE
  814. ) ENGINE = InnoDB
  815. DEFAULT CHARSET = utf8
  816. COLLATE = utf8_bin;
  817. -- ----------------------------
  818. -- Table structure for ACT_RU_EXTERNAL_JOB
  819. -- ----------------------------
  820. DROP TABLE IF EXISTS `ACT_RU_EXTERNAL_JOB`;
  821. CREATE TABLE `ACT_RU_EXTERNAL_JOB`
  822. (
  823. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  824. `REV_` int(11) DEFAULT NULL,
  825. `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  826. `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  827. `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  828. `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  829. `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  830. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  831. `PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  832. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  833. `ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  834. `ELEMENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  835. `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  836. `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  837. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  838. `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  839. `CORRELATION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  840. `RETRIES_` int(11) DEFAULT NULL,
  841. `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  842. `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  843. `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  844. `REPEAT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  845. `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  846. `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  847. `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  848. `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  849. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  850. PRIMARY KEY (`ID_`),
  851. KEY `ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`),
  852. KEY `ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`),
  853. KEY `ACT_IDX_EXTERNAL_JOB_CORRELATION_ID` (`CORRELATION_ID_`),
  854. KEY `ACT_IDX_EJOB_SCOPE` (`SCOPE_ID_`, `SCOPE_TYPE_`),
  855. KEY `ACT_IDX_EJOB_SUB_SCOPE` (`SUB_SCOPE_ID_`, `SCOPE_TYPE_`),
  856. KEY `ACT_IDX_EJOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`, `SCOPE_TYPE_`),
  857. CONSTRAINT `ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  858. CONSTRAINT `ACT_FK_EXTERNAL_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`)
  859. ) ENGINE = InnoDB
  860. DEFAULT CHARSET = utf8
  861. COLLATE = utf8_bin;
  862. -- ----------------------------
  863. -- Table structure for ACT_RU_HISTORY_JOB
  864. -- ----------------------------
  865. DROP TABLE IF EXISTS `ACT_RU_HISTORY_JOB`;
  866. CREATE TABLE `ACT_RU_HISTORY_JOB`
  867. (
  868. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  869. `REV_` int(11) DEFAULT NULL,
  870. `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  871. `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  872. `RETRIES_` int(11) DEFAULT NULL,
  873. `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  874. `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  875. `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  876. `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  877. `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  878. `ADV_HANDLER_CFG_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  879. `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  880. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  881. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  882. PRIMARY KEY (`ID_`)
  883. ) ENGINE = InnoDB
  884. DEFAULT CHARSET = utf8
  885. COLLATE = utf8_bin;
  886. -- ----------------------------
  887. -- Table structure for ACT_RU_IDENTITYLINK
  888. -- ----------------------------
  889. DROP TABLE IF EXISTS `ACT_RU_IDENTITYLINK`;
  890. CREATE TABLE `ACT_RU_IDENTITYLINK`
  891. (
  892. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  893. `REV_` int(11) DEFAULT NULL,
  894. `GROUP_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  895. `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  896. `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  897. `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  898. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  899. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  900. `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  901. `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  902. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  903. `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  904. PRIMARY KEY (`ID_`),
  905. KEY `ACT_IDX_IDENT_LNK_USER` (`USER_ID_`),
  906. KEY `ACT_IDX_IDENT_LNK_GROUP` (`GROUP_ID_`),
  907. KEY `ACT_IDX_IDENT_LNK_SCOPE` (`SCOPE_ID_`, `SCOPE_TYPE_`),
  908. KEY `ACT_IDX_IDENT_LNK_SUB_SCOPE` (`SUB_SCOPE_ID_`, `SCOPE_TYPE_`),
  909. KEY `ACT_IDX_IDENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`, `SCOPE_TYPE_`),
  910. KEY `ACT_IDX_ATHRZ_PROCEDEF` (`PROC_DEF_ID_`),
  911. KEY `ACT_FK_TSKASS_TASK` (`TASK_ID_`),
  912. KEY `ACT_FK_IDL_PROCINST` (`PROC_INST_ID_`),
  913. CONSTRAINT `ACT_FK_ATHRZ_PROCEDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`),
  914. CONSTRAINT `ACT_FK_IDL_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  915. CONSTRAINT `ACT_FK_TSKASS_TASK` FOREIGN KEY (`TASK_ID_`) REFERENCES `ACT_RU_TASK` (`ID_`)
  916. ) ENGINE = InnoDB
  917. DEFAULT CHARSET = utf8
  918. COLLATE = utf8_bin;
  919. -- ----------------------------
  920. -- Table structure for ACT_RU_JOB
  921. -- ----------------------------
  922. DROP TABLE IF EXISTS `ACT_RU_JOB`;
  923. CREATE TABLE `ACT_RU_JOB`
  924. (
  925. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  926. `REV_` int(11) DEFAULT NULL,
  927. `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  928. `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  929. `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  930. `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  931. `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  932. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  933. `PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  934. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  935. `ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  936. `ELEMENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  937. `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  938. `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  939. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  940. `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  941. `CORRELATION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  942. `RETRIES_` int(11) DEFAULT NULL,
  943. `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  944. `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  945. `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  946. `REPEAT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  947. `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  948. `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  949. `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  950. `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  951. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  952. PRIMARY KEY (`ID_`),
  953. KEY `ACT_IDX_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`),
  954. KEY `ACT_IDX_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`),
  955. KEY `ACT_IDX_JOB_CORRELATION_ID` (`CORRELATION_ID_`),
  956. KEY `ACT_IDX_JOB_SCOPE` (`SCOPE_ID_`, `SCOPE_TYPE_`),
  957. KEY `ACT_IDX_JOB_SUB_SCOPE` (`SUB_SCOPE_ID_`, `SCOPE_TYPE_`),
  958. KEY `ACT_IDX_JOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`, `SCOPE_TYPE_`),
  959. KEY `ACT_FK_JOB_EXECUTION` (`EXECUTION_ID_`),
  960. KEY `ACT_FK_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`),
  961. KEY `ACT_FK_JOB_PROC_DEF` (`PROC_DEF_ID_`),
  962. CONSTRAINT `ACT_FK_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  963. CONSTRAINT `ACT_FK_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  964. CONSTRAINT `ACT_FK_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  965. CONSTRAINT `ACT_FK_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  966. CONSTRAINT `ACT_FK_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`)
  967. ) ENGINE = InnoDB
  968. DEFAULT CHARSET = utf8
  969. COLLATE = utf8_bin;
  970. -- ----------------------------
  971. -- Table structure for ACT_RU_SUSPENDED_JOB
  972. -- ----------------------------
  973. DROP TABLE IF EXISTS `ACT_RU_SUSPENDED_JOB`;
  974. CREATE TABLE `ACT_RU_SUSPENDED_JOB`
  975. (
  976. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  977. `REV_` int(11) DEFAULT NULL,
  978. `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  979. `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  980. `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  981. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  982. `PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  983. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  984. `ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  985. `ELEMENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  986. `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  987. `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  988. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  989. `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  990. `CORRELATION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  991. `RETRIES_` int(11) DEFAULT NULL,
  992. `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  993. `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  994. `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  995. `REPEAT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  996. `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  997. `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  998. `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  999. `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  1000. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  1001. PRIMARY KEY (`ID_`),
  1002. KEY `ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`),
  1003. KEY `ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`),
  1004. KEY `ACT_IDX_SUSPENDED_JOB_CORRELATION_ID` (`CORRELATION_ID_`),
  1005. KEY `ACT_IDX_SJOB_SCOPE` (`SCOPE_ID_`, `SCOPE_TYPE_`),
  1006. KEY `ACT_IDX_SJOB_SUB_SCOPE` (`SUB_SCOPE_ID_`, `SCOPE_TYPE_`),
  1007. KEY `ACT_IDX_SJOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`, `SCOPE_TYPE_`),
  1008. KEY `ACT_FK_SUSPENDED_JOB_EXECUTION` (`EXECUTION_ID_`),
  1009. KEY `ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`),
  1010. KEY `ACT_FK_SUSPENDED_JOB_PROC_DEF` (`PROC_DEF_ID_`),
  1011. CONSTRAINT `ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  1012. CONSTRAINT `ACT_FK_SUSPENDED_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  1013. CONSTRAINT `ACT_FK_SUSPENDED_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  1014. CONSTRAINT `ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  1015. CONSTRAINT `ACT_FK_SUSPENDED_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`)
  1016. ) ENGINE = InnoDB
  1017. DEFAULT CHARSET = utf8
  1018. COLLATE = utf8_bin;
  1019. -- ----------------------------
  1020. -- Table structure for ACT_RU_TASK
  1021. -- ----------------------------
  1022. DROP TABLE IF EXISTS `ACT_RU_TASK`;
  1023. CREATE TABLE `ACT_RU_TASK`
  1024. (
  1025. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  1026. `REV_` int(11) DEFAULT NULL,
  1027. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1028. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1029. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1030. `TASK_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1031. `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1032. `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1033. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1034. `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1035. `PROPAGATED_STAGE_INST_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1036. `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1037. `PARENT_TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1038. `DESCRIPTION_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  1039. `TASK_DEF_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1040. `OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1041. `ASSIGNEE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1042. `DELEGATION_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1043. `PRIORITY_` int(11) DEFAULT NULL,
  1044. `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  1045. `DUE_DATE_` datetime(3) DEFAULT NULL,
  1046. `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1047. `SUSPENSION_STATE_` int(11) DEFAULT NULL,
  1048. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  1049. `FORM_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1050. `CLAIM_TIME_` datetime(3) DEFAULT NULL,
  1051. `IS_COUNT_ENABLED_` tinyint(4) DEFAULT NULL,
  1052. `VAR_COUNT_` int(11) DEFAULT NULL,
  1053. `ID_LINK_COUNT_` int(11) DEFAULT NULL,
  1054. `SUB_TASK_COUNT_` int(11) DEFAULT NULL,
  1055. PRIMARY KEY (`ID_`),
  1056. KEY `ACT_IDX_TASK_CREATE` (`CREATE_TIME_`),
  1057. KEY `ACT_IDX_TASK_SCOPE` (`SCOPE_ID_`, `SCOPE_TYPE_`),
  1058. KEY `ACT_IDX_TASK_SUB_SCOPE` (`SUB_SCOPE_ID_`, `SCOPE_TYPE_`),
  1059. KEY `ACT_IDX_TASK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`, `SCOPE_TYPE_`),
  1060. KEY `ACT_FK_TASK_EXE` (`EXECUTION_ID_`),
  1061. KEY `ACT_FK_TASK_PROCINST` (`PROC_INST_ID_`),
  1062. KEY `ACT_FK_TASK_PROCDEF` (`PROC_DEF_ID_`),
  1063. CONSTRAINT `ACT_FK_TASK_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  1064. CONSTRAINT `ACT_FK_TASK_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`),
  1065. CONSTRAINT `ACT_FK_TASK_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`)
  1066. ) ENGINE = InnoDB
  1067. DEFAULT CHARSET = utf8
  1068. COLLATE = utf8_bin;
  1069. -- ----------------------------
  1070. -- Table structure for ACT_RU_TIMER_JOB
  1071. -- ----------------------------
  1072. DROP TABLE IF EXISTS `ACT_RU_TIMER_JOB`;
  1073. CREATE TABLE `ACT_RU_TIMER_JOB`
  1074. (
  1075. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  1076. `REV_` int(11) DEFAULT NULL,
  1077. `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1078. `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  1079. `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  1080. `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1081. `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  1082. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1083. `PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1084. `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1085. `ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1086. `ELEMENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1087. `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1088. `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1089. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1090. `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1091. `CORRELATION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1092. `RETRIES_` int(11) DEFAULT NULL,
  1093. `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1094. `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  1095. `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  1096. `REPEAT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1097. `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1098. `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  1099. `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1100. `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  1101. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  1102. PRIMARY KEY (`ID_`),
  1103. KEY `ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`),
  1104. KEY `ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`),
  1105. KEY `ACT_IDX_TIMER_JOB_CORRELATION_ID` (`CORRELATION_ID_`),
  1106. KEY `ACT_IDX_TJOB_SCOPE` (`SCOPE_ID_`, `SCOPE_TYPE_`),
  1107. KEY `ACT_IDX_TJOB_SUB_SCOPE` (`SUB_SCOPE_ID_`, `SCOPE_TYPE_`),
  1108. KEY `ACT_IDX_TJOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`, `SCOPE_TYPE_`),
  1109. KEY `ACT_FK_TIMER_JOB_EXECUTION` (`EXECUTION_ID_`),
  1110. KEY `ACT_FK_TIMER_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`),
  1111. KEY `ACT_FK_TIMER_JOB_PROC_DEF` (`PROC_DEF_ID_`),
  1112. CONSTRAINT `ACT_FK_TIMER_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  1113. CONSTRAINT `ACT_FK_TIMER_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  1114. CONSTRAINT `ACT_FK_TIMER_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  1115. CONSTRAINT `ACT_FK_TIMER_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  1116. CONSTRAINT `ACT_FK_TIMER_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`)
  1117. ) ENGINE = InnoDB
  1118. DEFAULT CHARSET = utf8
  1119. COLLATE = utf8_bin;
  1120. -- ----------------------------
  1121. -- Table structure for ACT_RU_VARIABLE
  1122. -- ----------------------------
  1123. DROP TABLE IF EXISTS `ACT_RU_VARIABLE`;
  1124. CREATE TABLE `ACT_RU_VARIABLE`
  1125. (
  1126. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  1127. `REV_` int(11) DEFAULT NULL,
  1128. `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  1129. `NAME_` varchar(255) COLLATE utf8_bin NOT NULL,
  1130. `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1131. `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1132. `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1133. `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1134. `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1135. `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1136. `BYTEARRAY_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1137. `DOUBLE_` double DEFAULT NULL,
  1138. `LONG_` bigint(20) DEFAULT NULL,
  1139. `TEXT_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  1140. `TEXT2_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  1141. PRIMARY KEY (`ID_`),
  1142. KEY `ACT_IDX_RU_VAR_SCOPE_ID_TYPE` (`SCOPE_ID_`, `SCOPE_TYPE_`),
  1143. KEY `ACT_IDX_RU_VAR_SUB_ID_TYPE` (`SUB_SCOPE_ID_`, `SCOPE_TYPE_`),
  1144. KEY `ACT_FK_VAR_BYTEARRAY` (`BYTEARRAY_ID_`),
  1145. KEY `ACT_IDX_VARIABLE_TASK_ID` (`TASK_ID_`),
  1146. KEY `ACT_FK_VAR_EXE` (`EXECUTION_ID_`),
  1147. KEY `ACT_FK_VAR_PROCINST` (`PROC_INST_ID_`),
  1148. CONSTRAINT `ACT_FK_VAR_BYTEARRAY` FOREIGN KEY (`BYTEARRAY_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  1149. CONSTRAINT `ACT_FK_VAR_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  1150. CONSTRAINT `ACT_FK_VAR_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`)
  1151. ) ENGINE = InnoDB
  1152. DEFAULT CHARSET = utf8
  1153. COLLATE = utf8_bin;
  1154. -- ----------------------------
  1155. -- Table structure for FLW_CHANNEL_DEFINITION
  1156. -- ----------------------------
  1157. DROP TABLE IF EXISTS `FLW_CHANNEL_DEFINITION`;
  1158. CREATE TABLE `FLW_CHANNEL_DEFINITION`
  1159. (
  1160. `ID_` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  1161. `NAME_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1162. `VERSION_` int(11) DEFAULT NULL,
  1163. `KEY_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1164. `CATEGORY_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1165. `DEPLOYMENT_ID_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1166. `CREATE_TIME_` datetime(3) DEFAULT NULL,
  1167. `TENANT_ID_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1168. `RESOURCE_NAME_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1169. `DESCRIPTION_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1170. PRIMARY KEY (`ID_`),
  1171. UNIQUE KEY `ACT_IDX_CHANNEL_DEF_UNIQ` (`KEY_`, `VERSION_`, `TENANT_ID_`)
  1172. ) ENGINE = InnoDB
  1173. DEFAULT CHARSET = utf8mb4
  1174. COLLATE = utf8mb4_bin;
  1175. -- ----------------------------
  1176. -- Table structure for FLW_EV_DATABASECHANGELOG
  1177. -- ----------------------------
  1178. DROP TABLE IF EXISTS `FLW_EV_DATABASECHANGELOG`;
  1179. CREATE TABLE `FLW_EV_DATABASECHANGELOG`
  1180. (
  1181. `ID` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  1182. `AUTHOR` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  1183. `FILENAME` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  1184. `DATEEXECUTED` datetime NOT NULL,
  1185. `ORDEREXECUTED` int(11) NOT NULL,
  1186. `EXECTYPE` varchar(10) COLLATE utf8mb4_bin NOT NULL,
  1187. `MD5SUM` varchar(35) COLLATE utf8mb4_bin DEFAULT NULL,
  1188. `DESCRIPTION` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1189. `COMMENTS` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1190. `TAG` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1191. `LIQUIBASE` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL,
  1192. `CONTEXTS` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1193. `LABELS` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1194. `DEPLOYMENT_ID` varchar(10) COLLATE utf8mb4_bin DEFAULT NULL
  1195. ) ENGINE = InnoDB
  1196. DEFAULT CHARSET = utf8mb4
  1197. COLLATE = utf8mb4_bin;
  1198. -- ----------------------------
  1199. -- Records of FLW_EV_DATABASECHANGELOG
  1200. -- ----------------------------
  1201. BEGIN;
  1202. INSERT INTO `FLW_EV_DATABASECHANGELOG`
  1203. VALUES ('1', 'flowable', 'org/flowable/eventregistry/db/liquibase/flowable-eventregistry-db-changelog.xml',
  1204. '2021-08-22 15:01:56', 1, 'EXECUTED', '8:1b0c48c9cf7945be799d868a2626d687',
  1205. 'createTable tableName=FLW_EVENT_DEPLOYMENT; createTable tableName=FLW_EVENT_RESOURCE; createTable tableName=FLW_EVENT_DEFINITION; createIndex indexName=ACT_IDX_EVENT_DEF_UNIQ, tableName=FLW_EVENT_DEFINITION; createTable tableName=FLW_CHANNEL_DEFIN...',
  1206. '', NULL, '3.8.9', NULL, NULL, '9615716437');
  1207. COMMIT;
  1208. -- ----------------------------
  1209. -- Table structure for FLW_EV_DATABASECHANGELOGLOCK
  1210. -- ----------------------------
  1211. DROP TABLE IF EXISTS `FLW_EV_DATABASECHANGELOGLOCK`;
  1212. CREATE TABLE `FLW_EV_DATABASECHANGELOGLOCK`
  1213. (
  1214. `ID` int(11) NOT NULL,
  1215. `LOCKED` bit(1) NOT NULL,
  1216. `LOCKGRANTED` datetime DEFAULT NULL,
  1217. `LOCKEDBY` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1218. PRIMARY KEY (`ID`)
  1219. ) ENGINE = InnoDB
  1220. DEFAULT CHARSET = utf8mb4
  1221. COLLATE = utf8mb4_bin;
  1222. -- ----------------------------
  1223. -- Records of FLW_EV_DATABASECHANGELOGLOCK
  1224. -- ----------------------------
  1225. BEGIN;
  1226. INSERT INTO `FLW_EV_DATABASECHANGELOGLOCK`
  1227. VALUES (1, b'0', NULL, NULL);
  1228. COMMIT;
  1229. -- ----------------------------
  1230. -- Table structure for FLW_EVENT_DEFINITION
  1231. -- ----------------------------
  1232. DROP TABLE IF EXISTS `FLW_EVENT_DEFINITION`;
  1233. CREATE TABLE `FLW_EVENT_DEFINITION`
  1234. (
  1235. `ID_` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  1236. `NAME_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1237. `VERSION_` int(11) DEFAULT NULL,
  1238. `KEY_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1239. `CATEGORY_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1240. `DEPLOYMENT_ID_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1241. `TENANT_ID_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1242. `RESOURCE_NAME_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1243. `DESCRIPTION_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1244. PRIMARY KEY (`ID_`),
  1245. UNIQUE KEY `ACT_IDX_EVENT_DEF_UNIQ` (`KEY_`, `VERSION_`, `TENANT_ID_`)
  1246. ) ENGINE = InnoDB
  1247. DEFAULT CHARSET = utf8mb4
  1248. COLLATE = utf8mb4_bin;
  1249. -- ----------------------------
  1250. -- Table structure for FLW_EVENT_DEPLOYMENT
  1251. -- ----------------------------
  1252. DROP TABLE IF EXISTS `FLW_EVENT_DEPLOYMENT`;
  1253. CREATE TABLE `FLW_EVENT_DEPLOYMENT`
  1254. (
  1255. `ID_` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  1256. `NAME_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1257. `CATEGORY_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1258. `DEPLOY_TIME_` datetime(3) DEFAULT NULL,
  1259. `TENANT_ID_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1260. `PARENT_DEPLOYMENT_ID_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1261. PRIMARY KEY (`ID_`)
  1262. ) ENGINE = InnoDB
  1263. DEFAULT CHARSET = utf8mb4
  1264. COLLATE = utf8mb4_bin;
  1265. -- ----------------------------
  1266. -- Table structure for FLW_EVENT_RESOURCE
  1267. -- ----------------------------
  1268. DROP TABLE IF EXISTS `FLW_EVENT_RESOURCE`;
  1269. CREATE TABLE `FLW_EVENT_RESOURCE`
  1270. (
  1271. `ID_` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  1272. `NAME_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1273. `DEPLOYMENT_ID_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  1274. `RESOURCE_BYTES_` longblob,
  1275. PRIMARY KEY (`ID_`)
  1276. ) ENGINE = InnoDB
  1277. DEFAULT CHARSET = utf8mb4
  1278. COLLATE = utf8mb4_bin;
  1279. -- ----------------------------
  1280. -- Table structure for FLW_RU_BATCH
  1281. -- ----------------------------
  1282. DROP TABLE IF EXISTS `FLW_RU_BATCH`;
  1283. CREATE TABLE `FLW_RU_BATCH`
  1284. (
  1285. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  1286. `REV_` int(11) DEFAULT NULL,
  1287. `TYPE_` varchar(64) COLLATE utf8_bin NOT NULL,
  1288. `SEARCH_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1289. `SEARCH_KEY2_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1290. `CREATE_TIME_` datetime(3) NOT NULL,
  1291. `COMPLETE_TIME_` datetime(3) DEFAULT NULL,
  1292. `STATUS_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1293. `BATCH_DOC_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1294. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  1295. PRIMARY KEY (`ID_`)
  1296. ) ENGINE = InnoDB
  1297. DEFAULT CHARSET = utf8
  1298. COLLATE = utf8_bin;
  1299. -- ----------------------------
  1300. -- Table structure for FLW_RU_BATCH_PART
  1301. -- ----------------------------
  1302. DROP TABLE IF EXISTS `FLW_RU_BATCH_PART`;
  1303. CREATE TABLE `FLW_RU_BATCH_PART`
  1304. (
  1305. `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  1306. `REV_` int(11) DEFAULT NULL,
  1307. `BATCH_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1308. `TYPE_` varchar(64) COLLATE utf8_bin NOT NULL,
  1309. `SCOPE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1310. `SUB_SCOPE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1311. `SCOPE_TYPE_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1312. `SEARCH_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1313. `SEARCH_KEY2_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1314. `CREATE_TIME_` datetime(3) NOT NULL,
  1315. `COMPLETE_TIME_` datetime(3) DEFAULT NULL,
  1316. `STATUS_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  1317. `RESULT_DOC_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  1318. `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  1319. PRIMARY KEY (`ID_`),
  1320. KEY `FLW_IDX_BATCH_PART` (`BATCH_ID_`),
  1321. CONSTRAINT `FLW_FK_BATCH_PART_PARENT` FOREIGN KEY (`BATCH_ID_`) REFERENCES `FLW_RU_BATCH` (`ID_`)
  1322. ) ENGINE = InnoDB
  1323. DEFAULT CHARSET = utf8
  1324. COLLATE = utf8_bin;
  1325. -- ----------------------------
  1326. -- 流程分类表
  1327. -- ----------------------------
  1328. DROP TABLE IF EXISTS `zz_flow_category`;
  1329. CREATE TABLE `zz_flow_category`
  1330. (
  1331. `category_id` bigint(20) NOT NULL COMMENT '主键Id',
  1332. `name` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '显示名称',
  1333. `code` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '分类编码',
  1334. `show_order` int(11) NOT NULL COMMENT '实现顺序',
  1335. `update_time` datetime NOT NULL COMMENT '更新时间',
  1336. `update_user_id` bigint(20) NOT NULL COMMENT '更新者Id',
  1337. `create_time` datetime NOT NULL COMMENT '创建时间',
  1338. `create_user_id` bigint(20) NOT NULL COMMENT '创建者Id',
  1339. PRIMARY KEY (`category_id`) USING BTREE,
  1340. UNIQUE KEY `uk_code` (`code`) USING BTREE
  1341. ) ENGINE = InnoDB
  1342. DEFAULT CHARSET = utf8mb4
  1343. COLLATE = utf8mb4_bin COMMENT ='流程分类表';
  1344. -- ----------------------------
  1345. -- 流程管理表
  1346. -- ----------------------------
  1347. DROP TABLE IF EXISTS `zz_flow_entry`;
  1348. CREATE TABLE `zz_flow_entry`
  1349. (
  1350. `entry_id` bigint(20) NOT NULL COMMENT '主键',
  1351. `process_definition_name` varchar(200) NOT NULL COMMENT '流程名称',
  1352. `process_definition_key` varchar(150) NOT NULL COMMENT '流程标识Key',
  1353. `category_id` bigint(20) NOT NULL COMMENT '流程分类',
  1354. `main_entry_publish_id` bigint(20) DEFAULT NULL COMMENT '工作流部署的发布主版本Id',
  1355. `latest_publish_time` datetime DEFAULT NULL COMMENT '最新发布时间',
  1356. `status` int(11) NOT NULL COMMENT '流程状态',
  1357. `bpmn_xml` longtext COMMENT '流程定义的xml',
  1358. `bind_form_type` int(11) NOT NULL COMMENT '绑定表单类型',
  1359. `page_id` bigint(20) DEFAULT NULL COMMENT '在线表单的页面Id',
  1360. `default_form_id` bigint(20) DEFAULT NULL COMMENT '在线表单Id',
  1361. `default_router_name` varchar(255) DEFAULT NULL COMMENT '静态表单的缺省路由名称',
  1362. `encoded_rule` varchar(255) DEFAULT NULL COMMENT '工单表编码字段的编码规则',
  1363. `extension_data` varchar(3000) DEFAULT NULL COMMENT '流程的自定义扩展数据',
  1364. `update_time` datetime NOT NULL COMMENT '更新时间',
  1365. `update_user_id` bigint(20) NOT NULL COMMENT '更新者Id',
  1366. `create_time` datetime NOT NULL COMMENT '创建时间',
  1367. `create_user_id` bigint(20) NOT NULL COMMENT '创建者Id',
  1368. PRIMARY KEY (`entry_id`) USING BTREE,
  1369. UNIQUE KEY `uk_process_definition_key` (`process_definition_key`) USING BTREE,
  1370. KEY `idx_category_id` (`category_id`) USING BTREE,
  1371. KEY `idx_status` (`status`) USING BTREE,
  1372. KEY `idx_process_definition_name` (`process_definition_name`) USING BTREE
  1373. ) ENGINE = InnoDB
  1374. DEFAULT CHARSET = utf8mb4 COMMENT ='流程管理表';
  1375. -- ----------------------------
  1376. -- 流程发布表
  1377. -- ----------------------------
  1378. DROP TABLE IF EXISTS `zz_flow_entry_publish`;
  1379. CREATE TABLE `zz_flow_entry_publish`
  1380. (
  1381. `entry_publish_id` bigint(20) NOT NULL COMMENT '主键Id',
  1382. `entry_id` bigint(20) NOT NULL COMMENT '流程Id',
  1383. `process_definition_id` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '流程引擎的定义Id',
  1384. `deploy_id` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '流程引擎的部署Id',
  1385. `publish_version` int(11) NOT NULL COMMENT '发布版本',
  1386. `active_status` bit(1) NOT NULL COMMENT '激活状态',
  1387. `main_version` bit(1) NOT NULL COMMENT '是否为主版本',
  1388. `create_user_id` bigint(20) NOT NULL COMMENT '创建者Id',
  1389. `publish_time` datetime NOT NULL COMMENT '发布时间',
  1390. `init_task_info` text CHARACTER SET utf8mb4 COMMENT '第一个非开始节点任务的附加信息',
  1391. PRIMARY KEY (`entry_publish_id`) USING BTREE,
  1392. UNIQUE KEY `uk_process_definition_id` (`process_definition_id`) USING BTREE,
  1393. KEY `idx_entry_id` (`entry_id`) USING BTREE
  1394. ) ENGINE = InnoDB
  1395. DEFAULT CHARSET = utf8mb4
  1396. COLLATE = utf8mb4_bin COMMENT ='流程发布表';
  1397. -- ----------------------------
  1398. -- 流程发布变量表
  1399. -- ----------------------------
  1400. DROP TABLE IF EXISTS `zz_flow_entry_publish_variable`;
  1401. CREATE TABLE `zz_flow_entry_publish_variable`
  1402. (
  1403. `variable_id` bigint(20) NOT NULL COMMENT '主键Id',
  1404. `entry_publish_id` bigint(20) NOT NULL COMMENT '流程Id',
  1405. `variable_name` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '变量名',
  1406. `show_name` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '显示名',
  1407. `variable_type` int(11) NOT NULL COMMENT '变量类型',
  1408. `bind_datasource_id` bigint(20) DEFAULT NULL COMMENT '绑定数据源Id',
  1409. `bind_relation_id` bigint(20) DEFAULT NULL COMMENT '绑定数据源关联Id',
  1410. `bind_column_id` bigint(20) DEFAULT NULL COMMENT '绑定字段Id',
  1411. `builtin` bit(1) NOT NULL COMMENT '是否内置',
  1412. PRIMARY KEY (`variable_id`) USING BTREE,
  1413. KEY `idx_entry_publish_id` (`entry_publish_id`) USING BTREE
  1414. ) ENGINE = InnoDB
  1415. DEFAULT CHARSET = utf8mb4
  1416. COLLATE = utf8mb4_bin COMMENT ='流程发布变量表';
  1417. -- ----------------------------
  1418. -- 流程变量表
  1419. -- ----------------------------
  1420. DROP TABLE IF EXISTS `zz_flow_entry_variable`;
  1421. CREATE TABLE `zz_flow_entry_variable`
  1422. (
  1423. `variable_id` bigint(20) NOT NULL COMMENT '主键Id',
  1424. `entry_id` bigint(20) NOT NULL COMMENT '流程Id',
  1425. `variable_name` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '变量名',
  1426. `show_name` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '显示名',
  1427. `variable_type` int(11) NOT NULL COMMENT '变量类型',
  1428. `bind_datasource_id` bigint(20) DEFAULT NULL COMMENT '绑定数据源Id',
  1429. `bind_relation_id` bigint(20) DEFAULT NULL COMMENT '绑定数据源关联Id',
  1430. `bind_column_id` bigint(20) DEFAULT NULL COMMENT '绑定字段Id',
  1431. `builtin` bit(1) NOT NULL COMMENT '是否内置',
  1432. `create_time` datetime NOT NULL COMMENT '创建时间',
  1433. PRIMARY KEY (`variable_id`) USING BTREE,
  1434. UNIQUE KEY `uk_entry_id_variable_name` (`entry_id`, `variable_name`) USING BTREE
  1435. ) ENGINE = InnoDB
  1436. DEFAULT CHARSET = utf8mb4
  1437. COLLATE = utf8mb4_bin COMMENT ='流程变量表';
  1438. -- ----------------------------
  1439. -- 流程任务审批表
  1440. -- ----------------------------
  1441. DROP TABLE IF EXISTS `zz_flow_task_comment`;
  1442. CREATE TABLE `zz_flow_task_comment`
  1443. (
  1444. `id` bigint(20) NOT NULL COMMENT '主键Id',
  1445. `process_instance_id` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '流程实例Id',
  1446. `task_id` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '任务Id',
  1447. `task_key` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '任务标识',
  1448. `task_name` varchar(512) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务名称',
  1449. `execution_id` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务的执行Id',
  1450. `multi_instance_exec_id` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '会签任务的执行Id',
  1451. `approval_type` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '审批类型',
  1452. `task_comment` varchar(1024) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '批注内容',
  1453. `delegate_assignee` varchar(512) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '委托指定人,比如加签、转办等',
  1454. `custom_business_data` longtext COLLATE utf8mb4_bin COMMENT '自定义数据。开发者可自行扩展,推荐使用JSON格式数据',
  1455. `create_user_id` bigint(20) NOT NULL COMMENT '创建者Id',
  1456. `create_login_name` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '创建者登录名',
  1457. `create_username` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '创建者用户名',
  1458. `create_time` datetime NOT NULL COMMENT '创建时间',
  1459. PRIMARY KEY (`id`) USING BTREE,
  1460. KEY `idx_multi_instance_exec_id` (`multi_instance_exec_id`) USING BTREE,
  1461. KEY `idx_process_instance_id` (`process_instance_id`) USING BTREE
  1462. ) ENGINE = InnoDB
  1463. DEFAULT CHARSET = utf8mb4
  1464. COLLATE = utf8mb4_bin COMMENT ='流程任务审批表';
  1465. -- ----------------------------
  1466. -- 流程多实例任务审批流水表
  1467. -- ----------------------------
  1468. DROP TABLE IF EXISTS `zz_flow_multi_instance_trans`;
  1469. CREATE TABLE `zz_flow_multi_instance_trans`
  1470. (
  1471. `id` bigint NOT NULL COMMENT '主键Id',
  1472. `process_instance_id` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '流程实例Id',
  1473. `task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务Id',
  1474. `task_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务标识',
  1475. `multi_instance_exec_id` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '会签任务的执行Id',
  1476. `execution_id` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '任务的执行Id',
  1477. `assignee_list` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '会签指派人列表',
  1478. `create_user_id` bigint(20) NOT NULL COMMENT '创建者Id',
  1479. `create_login_name` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '创建者登录名',
  1480. `create_username` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '创建者用户名',
  1481. `create_time` datetime NOT NULL COMMENT '创建时间',
  1482. PRIMARY KEY (`id`),
  1483. UNIQUE KEY `uk_execution_id` (`execution_id`) USING BTREE,
  1484. KEY `idx_multi_instance_exec_id` (`multi_instance_exec_id`) USING BTREE
  1485. ) ENGINE = InnoDB
  1486. DEFAULT CHARSET = utf8mb4
  1487. COLLATE = utf8mb4_bin COMMENT ='流程多实例任务审批流水表';
  1488. -- ----------------------------
  1489. -- 流程流程图任务扩展表
  1490. -- ----------------------------
  1491. DROP TABLE IF EXISTS `zz_flow_task_ext`;
  1492. CREATE TABLE `zz_flow_task_ext`
  1493. (
  1494. `process_definition_id` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '流程引擎的定义Id',
  1495. `task_id` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '流程引擎任务Id',
  1496. `operation_list_json` longtext COLLATE utf8mb4_bin COMMENT '操作列表JSON',
  1497. `variable_list_json` longtext COLLATE utf8mb4_bin COMMENT '变量列表JSON',
  1498. `assignee_list_json` text COLLATE utf8mb4_bin COMMENT '存储多实例的assigneeList的JSON',
  1499. `group_type` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '分组类型',
  1500. `dept_post_list_json` varchar(1024) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '保存岗位相关的数据',
  1501. `role_ids` varchar(1024) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '保存角色Id数据',
  1502. `dept_ids` varchar(1024) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '保存部门Id数据',
  1503. `candidate_usernames` varchar(4000) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '保存候选组用户名数据',
  1504. `copy_list_json` varchar(4000) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '抄送相关的数据',
  1505. `extra_data_json` text COLLATE utf8mb4_bin COMMENT '用户任务的扩展属性,存储为JSON的字符串格式',
  1506. PRIMARY KEY (`process_definition_id`, `task_id`) USING BTREE
  1507. ) ENGINE = InnoDB
  1508. DEFAULT CHARSET = utf8mb4
  1509. COLLATE = utf8mb4_bin COMMENT ='流程流程图任务扩展表';
  1510. -- ----------------------------
  1511. -- 流程工单表
  1512. -- ----------------------------
  1513. DROP TABLE IF EXISTS `zz_flow_work_order`;
  1514. CREATE TABLE `zz_flow_work_order`
  1515. (
  1516. `work_order_id` bigint(20) NOT NULL COMMENT '主键Id',
  1517. `work_order_code` varchar(255) COLLATE utf8mb4_bin COMMENT '工单编码字段',
  1518. `process_definition_key` varchar(128) COLLATE utf8mb4_bin NOT NULL COMMENT '流程定义标识',
  1519. `process_definition_name` varchar(200) CHARACTER SET utf8mb4 NOT NULL COMMENT '流程名称',
  1520. `process_definition_id` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '流程引擎的定义Id',
  1521. `process_instance_id` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '流程实例Id',
  1522. `online_table_id` bigint(20) DEFAULT NULL COMMENT '在线表单的主表Id',
  1523. `table_name` varchar(128) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用于静态表单的表名',
  1524. `business_key` varchar(128) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '业务主键值',
  1525. `task_id` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '未完成的任务Id',
  1526. `task_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '未完成的任务名称',
  1527. `task_definition_key` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '未完成的任务标识',
  1528. `latest_approval_status` int(11) COMMENT '最近的审批状态',
  1529. `flow_status` int(11) NOT NULL DEFAULT 0 COMMENT '流程状态',
  1530. `submit_username` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '提交用户登录名称',
  1531. `dept_id` bigint(20) NOT NULL COMMENT '提交用户所在部门Id',
  1532. `update_time` datetime NOT NULL COMMENT '更新时间',
  1533. `update_user_id` bigint(20) NOT NULL COMMENT '更新者Id',
  1534. `create_time` datetime NOT NULL COMMENT '创建时间',
  1535. `create_user_id` bigint(20) NOT NULL COMMENT '创建者Id',
  1536. `deleted_flag` int(11) NOT NULL COMMENT '删除标记(1: 正常 -1: 已删除)',
  1537. PRIMARY KEY (`work_order_id`) USING BTREE,
  1538. UNIQUE KEY `uk_process_instance_id` (`process_instance_id`) USING BTREE,
  1539. KEY `idx_process_definition_key` (`process_definition_key`) USING BTREE,
  1540. KEY `idx_create_user_id` (`create_user_id`) USING BTREE,
  1541. KEY `idx_create_time` (`create_time`) USING BTREE,
  1542. KEY `idx_dept_id` (`dept_id`) USING BTREE,
  1543. KEY `idx_table_name` (`table_name`) USING BTREE,
  1544. KEY `idx_business_key` (`business_key`) USING BTREE
  1545. ) ENGINE = InnoDB
  1546. DEFAULT CHARSET = utf8mb4
  1547. COLLATE = utf8mb4_bin COMMENT ='流程工单表';
  1548. -- ----------------------------
  1549. -- 流程工单扩展表
  1550. -- ----------------------------
  1551. DROP TABLE IF EXISTS `zz_flow_work_order_ext`;
  1552. CREATE TABLE `zz_flow_work_order_ext`
  1553. (
  1554. `id` bigint NOT NULL COMMENT '主键Id',
  1555. `work_order_id` bigint NOT NULL COMMENT '工单Id',
  1556. `draft_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '草稿数据',
  1557. `business_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '业务数据',
  1558. `update_time` datetime NOT NULL COMMENT '更新时间',
  1559. `update_user_id` bigint(20) NOT NULL COMMENT '更新者Id',
  1560. `create_time` datetime NOT NULL COMMENT '创建时间',
  1561. `create_user_id` bigint(20) NOT NULL COMMENT '创建者Id',
  1562. `deleted_flag` int(11) NOT NULL COMMENT '删除标记(1: 正常 -1: 已删除)',
  1563. PRIMARY KEY (`id`) USING BTREE,
  1564. KEY `idx_work_order_id` (`work_order_id`) USING BTREE
  1565. ) ENGINE = InnoDB
  1566. DEFAULT CHARSET = utf8mb4
  1567. COLLATE = utf8mb4_bin COMMENT ='流程工单扩展表';
  1568. -- ----------------------------
  1569. -- 流程消息通知表
  1570. -- ----------------------------
  1571. DROP TABLE IF EXISTS `zz_flow_message`;
  1572. CREATE TABLE `zz_flow_message`
  1573. (
  1574. `message_id` bigint(20) NOT NULL COMMENT '主键Id',
  1575. `message_type` tinyint(4) NOT NULL COMMENT '消息类型',
  1576. `message_content` varchar(1024) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '消息内容',
  1577. `remind_count` int(11) DEFAULT 0 COMMENT '催办次数',
  1578. `work_order_id` bigint(20) DEFAULT NULL COMMENT '工单Id',
  1579. `process_definition_id` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '流程定义Id',
  1580. `process_definition_key` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '流程定义标识',
  1581. `process_definition_name` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '流程定义名称',
  1582. `process_instance_id` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程实例Id',
  1583. `process_instance_initiator` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程实例发起者',
  1584. `task_id` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程任务Id',
  1585. `task_definition_key` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程任务定义标识',
  1586. `task_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程任务名称',
  1587. `task_start_time` datetime DEFAULT NULL COMMENT '任务开始时间',
  1588. `task_finished` bit(1) NOT NULL DEFAULT b'0' COMMENT '任务是否已完成',
  1589. `task_assignee` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务指派人登录名',
  1590. `business_data_shot` longtext COLLATE utf8mb4_bin COMMENT '业务数据快照',
  1591. `online_form_data` bit(1) COMMENT '是否为在线表单消息数据',
  1592. `update_time` datetime NOT NULL COMMENT '更新时间',
  1593. `update_user_id` bigint(20) NOT NULL COMMENT '更新者Id',
  1594. `create_time` datetime NOT NULL COMMENT '创建时间',
  1595. `create_user_id` bigint(20) NOT NULL COMMENT '创建者Id',
  1596. `create_username` varchar(255) COLLATE utf8mb4_bin NOT NULL COMMENT '创建者显示名',
  1597. PRIMARY KEY (`message_id`) USING BTREE,
  1598. KEY `idx_notified_username` (`task_assignee`) USING BTREE,
  1599. KEY `idx_process_instance_id` (`process_instance_id`) USING BTREE,
  1600. KEY `idx_message_type` (`message_type`) USING BTREE,
  1601. KEY `idx_task_id` (`task_id`) USING BTREE,
  1602. KEY `idx_task_finished` (`task_finished`) USING BTREE,
  1603. KEY `idx_update_time` (`update_time`) USING BTREE
  1604. ) ENGINE = InnoDB
  1605. DEFAULT CHARSET = utf8mb4
  1606. COLLATE = utf8mb4_bin COMMENT ='流程消息通知表';
  1607. -- ----------------------------
  1608. -- 流程消息通知候选人表
  1609. -- ----------------------------
  1610. DROP TABLE IF EXISTS `zz_flow_msg_candidate_identity`;
  1611. CREATE TABLE `zz_flow_msg_candidate_identity`
  1612. (
  1613. `id` bigint(20) NOT NULL COMMENT '主键Id',
  1614. `message_id` bigint(20) NOT NULL COMMENT '流程任务Id',
  1615. `candidate_type` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '候选身份类型',
  1616. `candidate_id` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '候选身份Id',
  1617. PRIMARY KEY (`id`),
  1618. KEY `idx_candidate_id` (`candidate_id`) USING BTREE,
  1619. KEY `idx_message_id` (`message_id`) USING BTREE
  1620. ) ENGINE = InnoDB
  1621. DEFAULT CHARSET = utf8mb4
  1622. COLLATE = utf8mb4_bin COMMENT ='流程消息通知候选人表';
  1623. -- ----------------------------
  1624. -- 流程消息候选人操作表
  1625. -- ----------------------------
  1626. DROP TABLE IF EXISTS `zz_flow_msg_identity_operation`;
  1627. CREATE TABLE `zz_flow_msg_identity_operation`
  1628. (
  1629. `id` bigint NOT NULL COMMENT '主键Id',
  1630. `message_id` bigint NOT NULL COMMENT '流程任务Id',
  1631. `login_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户登录名',
  1632. `operation_type` int NOT NULL COMMENT '操作类型',
  1633. `operation_time` datetime NOT NULL COMMENT '操作时间',
  1634. PRIMARY KEY (`id`),
  1635. KEY `idx_message_id` (`message_id`) USING BTREE,
  1636. KEY `idx_login_name` (`login_name`) USING BTREE
  1637. ) ENGINE = InnoDB
  1638. DEFAULT CHARSET = utf8mb4
  1639. COLLATE = utf8mb4_bin COMMENT ='流程消息候选人操作表';
  1640. SET FOREIGN_KEY_CHECKS = 1;