mysql.sql 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. create table ACT_GE_PROPERTY (
  2. NAME_ varchar(64),
  3. VALUE_ varchar(300),
  4. REV_ integer,
  5. primary key (NAME_)
  6. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  7. insert into ACT_GE_PROPERTY
  8. values ('schema.version', '5.22.0.0', 1);
  9. insert into ACT_GE_PROPERTY
  10. values ('schema.history', 'create(5.22.0.0)', 1);
  11. insert into ACT_GE_PROPERTY
  12. values ('next.dbid', '1', 1);
  13. create table ACT_GE_BYTEARRAY (
  14. ID_ varchar(64),
  15. REV_ integer,
  16. NAME_ varchar(255),
  17. DEPLOYMENT_ID_ varchar(64),
  18. BYTES_ LONGBLOB,
  19. GENERATED_ TINYINT,
  20. primary key (ID_)
  21. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  22. create table ACT_RE_DEPLOYMENT (
  23. ID_ varchar(64),
  24. NAME_ varchar(255),
  25. CATEGORY_ varchar(255),
  26. TENANT_ID_ varchar(255) default '',
  27. DEPLOY_TIME_ timestamp(3) NULL,
  28. primary key (ID_)
  29. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  30. create table ACT_RE_MODEL (
  31. ID_ varchar(64) not null,
  32. REV_ integer,
  33. NAME_ varchar(255),
  34. KEY_ varchar(255),
  35. CATEGORY_ varchar(255),
  36. CREATE_TIME_ timestamp(3) null,
  37. LAST_UPDATE_TIME_ timestamp(3) null,
  38. VERSION_ integer,
  39. META_INFO_ varchar(4000),
  40. DEPLOYMENT_ID_ varchar(64),
  41. EDITOR_SOURCE_VALUE_ID_ varchar(64),
  42. EDITOR_SOURCE_EXTRA_VALUE_ID_ varchar(64),
  43. TENANT_ID_ varchar(255) default '',
  44. primary key (ID_)
  45. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  46. create table ACT_RU_EXECUTION (
  47. ID_ varchar(64),
  48. REV_ integer,
  49. PROC_INST_ID_ varchar(64),
  50. BUSINESS_KEY_ varchar(255),
  51. PARENT_ID_ varchar(64),
  52. PROC_DEF_ID_ varchar(64),
  53. SUPER_EXEC_ varchar(64),
  54. ACT_ID_ varchar(255),
  55. IS_ACTIVE_ TINYINT,
  56. IS_CONCURRENT_ TINYINT,
  57. IS_SCOPE_ TINYINT,
  58. IS_EVENT_SCOPE_ TINYINT,
  59. SUSPENSION_STATE_ integer,
  60. CACHED_ENT_STATE_ integer,
  61. TENANT_ID_ varchar(255) default '',
  62. NAME_ varchar(255),
  63. LOCK_TIME_ timestamp(3) NULL,
  64. primary key (ID_)
  65. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  66. create table ACT_RU_JOB (
  67. ID_ varchar(64) NOT NULL,
  68. REV_ integer,
  69. TYPE_ varchar(255) NOT NULL,
  70. LOCK_EXP_TIME_ timestamp(3) NULL,
  71. LOCK_OWNER_ varchar(255),
  72. EXCLUSIVE_ boolean,
  73. EXECUTION_ID_ varchar(64),
  74. PROCESS_INSTANCE_ID_ varchar(64),
  75. PROC_DEF_ID_ varchar(64),
  76. RETRIES_ integer,
  77. EXCEPTION_STACK_ID_ varchar(64),
  78. EXCEPTION_MSG_ varchar(4000),
  79. DUEDATE_ timestamp(3) NULL,
  80. REPEAT_ varchar(255),
  81. HANDLER_TYPE_ varchar(255),
  82. HANDLER_CFG_ varchar(4000),
  83. TENANT_ID_ varchar(255) default '',
  84. primary key (ID_)
  85. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  86. create table ACT_RE_PROCDEF (
  87. ID_ varchar(64) not null,
  88. REV_ integer,
  89. CATEGORY_ varchar(255),
  90. NAME_ varchar(255),
  91. KEY_ varchar(255) not null,
  92. VERSION_ integer not null,
  93. DEPLOYMENT_ID_ varchar(64),
  94. RESOURCE_NAME_ varchar(4000),
  95. DGRM_RESOURCE_NAME_ varchar(4000),
  96. DESCRIPTION_ varchar(4000),
  97. HAS_START_FORM_KEY_ TINYINT,
  98. HAS_GRAPHICAL_NOTATION_ TINYINT,
  99. SUSPENSION_STATE_ integer,
  100. TENANT_ID_ varchar(255) default '',
  101. primary key (ID_)
  102. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  103. create table ACT_RU_TASK (
  104. ID_ varchar(64),
  105. REV_ integer,
  106. EXECUTION_ID_ varchar(64),
  107. PROC_INST_ID_ varchar(64),
  108. PROC_DEF_ID_ varchar(64),
  109. NAME_ varchar(255),
  110. PARENT_TASK_ID_ varchar(64),
  111. DESCRIPTION_ varchar(4000),
  112. TASK_DEF_KEY_ varchar(255),
  113. OWNER_ varchar(255),
  114. ASSIGNEE_ varchar(255),
  115. DELEGATION_ varchar(64),
  116. PRIORITY_ integer,
  117. CREATE_TIME_ timestamp(3) NULL,
  118. DUE_DATE_ datetime(3),
  119. CATEGORY_ varchar(255),
  120. SUSPENSION_STATE_ integer,
  121. TENANT_ID_ varchar(255) default '',
  122. FORM_KEY_ varchar(255),
  123. primary key (ID_)
  124. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  125. create table ACT_RU_IDENTITYLINK (
  126. ID_ varchar(64),
  127. REV_ integer,
  128. GROUP_ID_ varchar(255),
  129. TYPE_ varchar(255),
  130. USER_ID_ varchar(255),
  131. TASK_ID_ varchar(64),
  132. PROC_INST_ID_ varchar(64),
  133. PROC_DEF_ID_ varchar(64),
  134. primary key (ID_)
  135. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  136. create table ACT_RU_VARIABLE (
  137. ID_ varchar(64) not null,
  138. REV_ integer,
  139. TYPE_ varchar(255) not null,
  140. NAME_ varchar(255) not null,
  141. EXECUTION_ID_ varchar(64),
  142. PROC_INST_ID_ varchar(64),
  143. TASK_ID_ varchar(64),
  144. BYTEARRAY_ID_ varchar(64),
  145. DOUBLE_ double,
  146. LONG_ bigint,
  147. TEXT_ varchar(4000),
  148. TEXT2_ varchar(4000),
  149. primary key (ID_)
  150. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  151. create table ACT_RU_EVENT_SUBSCR (
  152. ID_ varchar(64) not null,
  153. REV_ integer,
  154. EVENT_TYPE_ varchar(255) not null,
  155. EVENT_NAME_ varchar(255),
  156. EXECUTION_ID_ varchar(64),
  157. PROC_INST_ID_ varchar(64),
  158. ACTIVITY_ID_ varchar(64),
  159. CONFIGURATION_ varchar(255),
  160. CREATED_ timestamp(3) not null DEFAULT CURRENT_TIMESTAMP(3),
  161. PROC_DEF_ID_ varchar(64),
  162. TENANT_ID_ varchar(255) default '',
  163. primary key (ID_)
  164. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  165. create table ACT_EVT_LOG (
  166. LOG_NR_ bigint auto_increment,
  167. TYPE_ varchar(64),
  168. PROC_DEF_ID_ varchar(64),
  169. PROC_INST_ID_ varchar(64),
  170. EXECUTION_ID_ varchar(64),
  171. TASK_ID_ varchar(64),
  172. TIME_STAMP_ timestamp(3) not null,
  173. USER_ID_ varchar(255),
  174. DATA_ LONGBLOB,
  175. LOCK_OWNER_ varchar(255),
  176. LOCK_TIME_ timestamp(3) null,
  177. IS_PROCESSED_ tinyint default 0,
  178. primary key (LOG_NR_)
  179. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  180. create table ACT_PROCDEF_INFO (
  181. ID_ varchar(64) not null,
  182. PROC_DEF_ID_ varchar(64) not null,
  183. REV_ integer,
  184. INFO_JSON_ID_ varchar(64),
  185. primary key (ID_)
  186. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  187. create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_);
  188. create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_);
  189. create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
  190. create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
  191. create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
  192. create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_);
  193. create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_);
  194. create index ACT_IDX_INFO_PROCDEF on ACT_PROCDEF_INFO(PROC_DEF_ID_);
  195. alter table ACT_GE_BYTEARRAY
  196. add constraint ACT_FK_BYTEARR_DEPL
  197. foreign key (DEPLOYMENT_ID_)
  198. references ACT_RE_DEPLOYMENT (ID_);
  199. alter table ACT_RE_PROCDEF
  200. add constraint ACT_UNIQ_PROCDEF
  201. unique (KEY_,VERSION_, TENANT_ID_);
  202. alter table ACT_RU_EXECUTION
  203. add constraint ACT_FK_EXE_PROCINST
  204. foreign key (PROC_INST_ID_)
  205. references ACT_RU_EXECUTION (ID_) on delete cascade on update cascade;
  206. alter table ACT_RU_EXECUTION
  207. add constraint ACT_FK_EXE_PARENT
  208. foreign key (PARENT_ID_)
  209. references ACT_RU_EXECUTION (ID_);
  210. alter table ACT_RU_EXECUTION
  211. add constraint ACT_FK_EXE_SUPER
  212. foreign key (SUPER_EXEC_)
  213. references ACT_RU_EXECUTION (ID_);
  214. alter table ACT_RU_EXECUTION
  215. add constraint ACT_FK_EXE_PROCDEF
  216. foreign key (PROC_DEF_ID_)
  217. references ACT_RE_PROCDEF (ID_);
  218. alter table ACT_RU_IDENTITYLINK
  219. add constraint ACT_FK_TSKASS_TASK
  220. foreign key (TASK_ID_)
  221. references ACT_RU_TASK (ID_);
  222. alter table ACT_RU_IDENTITYLINK
  223. add constraint ACT_FK_ATHRZ_PROCEDEF
  224. foreign key (PROC_DEF_ID_)
  225. references ACT_RE_PROCDEF(ID_);
  226. alter table ACT_RU_IDENTITYLINK
  227. add constraint ACT_FK_IDL_PROCINST
  228. foreign key (PROC_INST_ID_)
  229. references ACT_RU_EXECUTION (ID_);
  230. alter table ACT_RU_TASK
  231. add constraint ACT_FK_TASK_EXE
  232. foreign key (EXECUTION_ID_)
  233. references ACT_RU_EXECUTION (ID_);
  234. alter table ACT_RU_TASK
  235. add constraint ACT_FK_TASK_PROCINST
  236. foreign key (PROC_INST_ID_)
  237. references ACT_RU_EXECUTION (ID_);
  238. alter table ACT_RU_TASK
  239. add constraint ACT_FK_TASK_PROCDEF
  240. foreign key (PROC_DEF_ID_)
  241. references ACT_RE_PROCDEF (ID_);
  242. alter table ACT_RU_VARIABLE
  243. add constraint ACT_FK_VAR_EXE
  244. foreign key (EXECUTION_ID_)
  245. references ACT_RU_EXECUTION (ID_);
  246. alter table ACT_RU_VARIABLE
  247. add constraint ACT_FK_VAR_PROCINST
  248. foreign key (PROC_INST_ID_)
  249. references ACT_RU_EXECUTION(ID_);
  250. alter table ACT_RU_VARIABLE
  251. add constraint ACT_FK_VAR_BYTEARRAY
  252. foreign key (BYTEARRAY_ID_)
  253. references ACT_GE_BYTEARRAY (ID_);
  254. alter table ACT_RU_JOB
  255. add constraint ACT_FK_JOB_EXCEPTION
  256. foreign key (EXCEPTION_STACK_ID_)
  257. references ACT_GE_BYTEARRAY (ID_);
  258. alter table ACT_RU_EVENT_SUBSCR
  259. add constraint ACT_FK_EVENT_EXEC
  260. foreign key (EXECUTION_ID_)
  261. references ACT_RU_EXECUTION(ID_);
  262. alter table ACT_RE_MODEL
  263. add constraint ACT_FK_MODEL_SOURCE
  264. foreign key (EDITOR_SOURCE_VALUE_ID_)
  265. references ACT_GE_BYTEARRAY (ID_);
  266. alter table ACT_RE_MODEL
  267. add constraint ACT_FK_MODEL_SOURCE_EXTRA
  268. foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_)
  269. references ACT_GE_BYTEARRAY (ID_);
  270. alter table ACT_RE_MODEL
  271. add constraint ACT_FK_MODEL_DEPLOYMENT
  272. foreign key (DEPLOYMENT_ID_)
  273. references ACT_RE_DEPLOYMENT (ID_);
  274. alter table ACT_PROCDEF_INFO
  275. add constraint ACT_FK_INFO_JSON_BA
  276. foreign key (INFO_JSON_ID_)
  277. references ACT_GE_BYTEARRAY (ID_);
  278. alter table ACT_PROCDEF_INFO
  279. add constraint ACT_FK_INFO_PROCDEF
  280. foreign key (PROC_DEF_ID_)
  281. references ACT_RE_PROCDEF (ID_);
  282. alter table ACT_PROCDEF_INFO
  283. add constraint ACT_UNIQ_INFO_PROCDEF
  284. unique (PROC_DEF_ID_);
  285. create table ACT_HI_PROCINST (
  286. ID_ varchar(64) not null,
  287. PROC_INST_ID_ varchar(64) not null,
  288. BUSINESS_KEY_ varchar(255),
  289. PROC_DEF_ID_ varchar(64) not null,
  290. START_TIME_ datetime(3) not null,
  291. END_TIME_ datetime(3),
  292. DURATION_ bigint,
  293. START_USER_ID_ varchar(255),
  294. START_ACT_ID_ varchar(255),
  295. END_ACT_ID_ varchar(255),
  296. SUPER_PROCESS_INSTANCE_ID_ varchar(64),
  297. DELETE_REASON_ varchar(4000),
  298. TENANT_ID_ varchar(255) default '',
  299. NAME_ varchar(255),
  300. primary key (ID_),
  301. unique (PROC_INST_ID_)
  302. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  303. create table ACT_HI_ACTINST (
  304. ID_ varchar(64) not null,
  305. PROC_DEF_ID_ varchar(64) not null,
  306. PROC_INST_ID_ varchar(64) not null,
  307. EXECUTION_ID_ varchar(64) not null,
  308. ACT_ID_ varchar(255) not null,
  309. TASK_ID_ varchar(64),
  310. CALL_PROC_INST_ID_ varchar(64),
  311. ACT_NAME_ varchar(255),
  312. ACT_TYPE_ varchar(255) not null,
  313. ASSIGNEE_ varchar(255),
  314. START_TIME_ datetime(3) not null,
  315. END_TIME_ datetime(3),
  316. DURATION_ bigint,
  317. TENANT_ID_ varchar(255) default '',
  318. primary key (ID_)
  319. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  320. create table ACT_HI_TASKINST (
  321. ID_ varchar(64) not null,
  322. PROC_DEF_ID_ varchar(64),
  323. TASK_DEF_KEY_ varchar(255),
  324. PROC_INST_ID_ varchar(64),
  325. EXECUTION_ID_ varchar(64),
  326. NAME_ varchar(255),
  327. PARENT_TASK_ID_ varchar(64),
  328. DESCRIPTION_ varchar(4000),
  329. OWNER_ varchar(255),
  330. ASSIGNEE_ varchar(255),
  331. START_TIME_ datetime(3) not null,
  332. CLAIM_TIME_ datetime(3),
  333. END_TIME_ datetime(3),
  334. DURATION_ bigint,
  335. DELETE_REASON_ varchar(4000),
  336. PRIORITY_ integer,
  337. DUE_DATE_ datetime(3),
  338. FORM_KEY_ varchar(255),
  339. CATEGORY_ varchar(255),
  340. TENANT_ID_ varchar(255) default '',
  341. primary key (ID_)
  342. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  343. create table ACT_HI_VARINST (
  344. ID_ varchar(64) not null,
  345. PROC_INST_ID_ varchar(64),
  346. EXECUTION_ID_ varchar(64),
  347. TASK_ID_ varchar(64),
  348. NAME_ varchar(255) not null,
  349. VAR_TYPE_ varchar(100),
  350. REV_ integer,
  351. BYTEARRAY_ID_ varchar(64),
  352. DOUBLE_ double,
  353. LONG_ bigint,
  354. TEXT_ varchar(4000),
  355. TEXT2_ varchar(4000),
  356. CREATE_TIME_ datetime(3),
  357. LAST_UPDATED_TIME_ datetime(3),
  358. primary key (ID_)
  359. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  360. create table ACT_HI_DETAIL (
  361. ID_ varchar(64) not null,
  362. TYPE_ varchar(255) not null,
  363. PROC_INST_ID_ varchar(64),
  364. EXECUTION_ID_ varchar(64),
  365. TASK_ID_ varchar(64),
  366. ACT_INST_ID_ varchar(64),
  367. NAME_ varchar(255) not null,
  368. VAR_TYPE_ varchar(255),
  369. REV_ integer,
  370. TIME_ datetime(3) not null,
  371. BYTEARRAY_ID_ varchar(64),
  372. DOUBLE_ double,
  373. LONG_ bigint,
  374. TEXT_ varchar(4000),
  375. TEXT2_ varchar(4000),
  376. primary key (ID_)
  377. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  378. create table ACT_HI_COMMENT (
  379. ID_ varchar(64) not null,
  380. TYPE_ varchar(255),
  381. TIME_ datetime(3) not null,
  382. USER_ID_ varchar(255),
  383. TASK_ID_ varchar(64),
  384. PROC_INST_ID_ varchar(64),
  385. ACTION_ varchar(255),
  386. MESSAGE_ varchar(4000),
  387. FULL_MSG_ LONGBLOB,
  388. primary key (ID_)
  389. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  390. create table ACT_HI_ATTACHMENT (
  391. ID_ varchar(64) not null,
  392. REV_ integer,
  393. USER_ID_ varchar(255),
  394. NAME_ varchar(255),
  395. DESCRIPTION_ varchar(4000),
  396. TYPE_ varchar(255),
  397. TASK_ID_ varchar(64),
  398. PROC_INST_ID_ varchar(64),
  399. URL_ varchar(4000),
  400. CONTENT_ID_ varchar(64),
  401. TIME_ datetime(3),
  402. primary key (ID_)
  403. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  404. create table ACT_HI_IDENTITYLINK (
  405. ID_ varchar(64),
  406. GROUP_ID_ varchar(255),
  407. TYPE_ varchar(255),
  408. USER_ID_ varchar(255),
  409. TASK_ID_ varchar(64),
  410. PROC_INST_ID_ varchar(64),
  411. primary key (ID_)
  412. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  413. create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_);
  414. create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_);
  415. create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_);
  416. create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_);
  417. create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_);
  418. create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_);
  419. create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL(TIME_);
  420. create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL(NAME_);
  421. create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_);
  422. create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_);
  423. create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_);
  424. create index ACT_IDX_HI_PROCVAR_TASK_ID on ACT_HI_VARINST(TASK_ID_);
  425. create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_);
  426. create index ACT_IDX_HI_ACT_INST_EXEC on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_);
  427. create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
  428. create index ACT_IDX_HI_IDENT_LNK_TASK on ACT_HI_IDENTITYLINK(TASK_ID_);
  429. create index ACT_IDX_HI_IDENT_LNK_PROCINST on ACT_HI_IDENTITYLINK(PROC_INST_ID_);
  430. create index ACT_IDX_HI_TASK_INST_PROCINST on ACT_HI_TASKINST(PROC_INST_ID_);
  431. create table ACT_ID_GROUP (
  432. ID_ varchar(64),
  433. REV_ integer,
  434. NAME_ varchar(255),
  435. TYPE_ varchar(255),
  436. primary key (ID_)
  437. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  438. create table ACT_ID_MEMBERSHIP (
  439. USER_ID_ varchar(64),
  440. GROUP_ID_ varchar(64),
  441. primary key (USER_ID_, GROUP_ID_)
  442. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  443. create table ACT_ID_USER (
  444. ID_ varchar(64),
  445. REV_ integer,
  446. FIRST_ varchar(255),
  447. LAST_ varchar(255),
  448. EMAIL_ varchar(255),
  449. PWD_ varchar(255),
  450. PICTURE_ID_ varchar(64),
  451. primary key (ID_)
  452. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  453. create table ACT_ID_INFO (
  454. ID_ varchar(64),
  455. REV_ integer,
  456. USER_ID_ varchar(64),
  457. TYPE_ varchar(64),
  458. KEY_ varchar(255),
  459. VALUE_ varchar(255),
  460. PASSWORD_ LONGBLOB,
  461. PARENT_ID_ varchar(255),
  462. primary key (ID_)
  463. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  464. alter table ACT_ID_MEMBERSHIP
  465. add constraint ACT_FK_MEMB_GROUP
  466. foreign key (GROUP_ID_)
  467. references ACT_ID_GROUP (ID_);
  468. alter table ACT_ID_MEMBERSHIP
  469. add constraint ACT_FK_MEMB_USER
  470. foreign key (USER_ID_)
  471. references ACT_ID_USER (ID_);