activiti.mysql.upgradestep.52.to.53.history.sql 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. execute java org.activiti.engine.impl.db.upgrade.DbUpgradeStep52To53InsertPropertyHistoryLevel
  2. -- removing not null constraint from ACT_HI_DETAIL.PROC_INST_ID_ and ACT_HI_DETAIL.EXECUTION_ID_
  3. create table ACT_HI_DETAIL_TMP (
  4. ID_ varchar(64) not null,
  5. TYPE_ varchar(255) not null,
  6. PROC_INST_ID_ varchar(64),
  7. EXECUTION_ID_ varchar(64),
  8. TASK_ID_ varchar(64),
  9. ACT_INST_ID_ varchar(64),
  10. NAME_ varchar(255),
  11. VAR_TYPE_ varchar(255),
  12. REV_ integer,
  13. TIME_ datetime not null,
  14. BYTEARRAY_ID_ varchar(64),
  15. DOUBLE_ double,
  16. LONG_ bigint,
  17. TEXT_ varchar(255),
  18. TEXT2_ varchar(255),
  19. primary key (ID_)
  20. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  21. insert into ACT_HI_DETAIL_TMP
  22. select * from ACT_HI_DETAIL;
  23. drop table ACT_HI_DETAIL;
  24. create table ACT_HI_DETAIL (
  25. ID_ varchar(64) not null,
  26. TYPE_ varchar(255) not null,
  27. PROC_INST_ID_ varchar(64),
  28. EXECUTION_ID_ varchar(64),
  29. TASK_ID_ varchar(64),
  30. ACT_INST_ID_ varchar(64),
  31. NAME_ varchar(255),
  32. VAR_TYPE_ varchar(255),
  33. REV_ integer,
  34. TIME_ datetime not null,
  35. BYTEARRAY_ID_ varchar(64),
  36. DOUBLE_ double,
  37. LONG_ bigint,
  38. TEXT_ varchar(255),
  39. TEXT2_ varchar(255),
  40. primary key (ID_)
  41. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
  42. create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_);
  43. create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_);
  44. create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL(TIME_);
  45. create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL(NAME_);
  46. insert into ACT_HI_DETAIL
  47. select * from ACT_HI_DETAIL_TMP;
  48. drop table ACT_HI_DETAIL_TMP;
  49. -- Add column PRIORITY_ to ACT_HI_TASKINST and set to default priority (ACT-484)
  50. alter table ACT_HI_TASKINST add PRIORITY_ integer;
  51. update ACT_HI_TASKINST set PRIORITY_ = 50;