activiti.mssql.upgradestep.52.to.53.history.sql 1.7 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_ nvarchar(64) not null,
  5. TYPE_ nvarchar(255) not null,
  6. PROC_INST_ID_ nvarchar(64),
  7. EXECUTION_ID_ nvarchar(64),
  8. TASK_ID_ nvarchar(64),
  9. ACT_INST_ID_ nvarchar(64),
  10. NAME_ nvarchar(255),
  11. VAR_TYPE_ nvarchar(255),
  12. REV_ int,
  13. TIME_ datetime not null,
  14. BYTEARRAY_ID_ nvarchar(64),
  15. DOUBLE_ double precision,
  16. LONG_ numeric(19,0),
  17. TEXT_ nvarchar(255),
  18. TEXT2_ nvarchar(255),
  19. primary key (ID_)
  20. );
  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_ nvarchar(64) not null,
  26. TYPE_ nvarchar(255) not null,
  27. PROC_INST_ID_ nvarchar(64),
  28. EXECUTION_ID_ nvarchar(64),
  29. TASK_ID_ nvarchar(64),
  30. ACT_INST_ID_ nvarchar(64),
  31. NAME_ nvarchar(255),
  32. VAR_TYPE_ nvarchar(255),
  33. REV_ int,
  34. TIME_ datetime not null,
  35. BYTEARRAY_ID_ nvarchar(64),
  36. DOUBLE_ double precision,
  37. LONG_ numeric(19,0),
  38. TEXT_ nvarchar(255),
  39. TEXT2_ nvarchar(255),
  40. primary key (ID_)
  41. );
  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_ int;
  51. update ACT_HI_TASKINST set PRIORITY_ = 50;