flow-script.sql 77 KB

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