activiti.oracle.upgradestep.52.to.53.history.sql 2.3 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_ NVARCHAR2(64) not null,
  5. TYPE_ NVARCHAR2(255) not null,
  6. PROC_INST_ID_ NVARCHAR2(64),
  7. EXECUTION_ID_ NVARCHAR2(64),
  8. TASK_ID_ NVARCHAR2(64),
  9. ACT_INST_ID_ NVARCHAR2(64),
  10. NAME_ NVARCHAR2(255),
  11. VAR_TYPE_ NVARCHAR2(64),
  12. REV_ INTEGER,
  13. TIME_ TIMESTAMP(6) not null,
  14. BYTEARRAY_ID_ NVARCHAR2(64),
  15. DOUBLE_ NUMBER(*,10),
  16. LONG_ NUMBER(19,0),
  17. TEXT_ NVARCHAR2(255),
  18. TEXT2_ NVARCHAR2(255),
  19. primary key (ID_)
  20. );
  21. insert into ACT_HI_DETAIL_TMP (ID_,TYPE_,PROC_INST_ID_,EXECUTION_ID_,TASK_ID_,ACT_INST_ID_,NAME_,VAR_TYPE_,REV_,TIME_,BYTEARRAY_ID_,DOUBLE_,LONG_,TEXT_,TEXT2_)
  22. select ID_,TYPE_,PROC_INST_ID_,EXECUTION_ID_,TASK_ID_,ACT_INST_ID_,NAME_,VAR_TYPE_,REV_,TIME_,BYTEARRAY_ID_,DOUBLE_,LONG_,TEXT_,TEXT2_ from ACT_HI_DETAIL;
  23. drop table ACT_HI_DETAIL;
  24. create table ACT_HI_DETAIL (
  25. ID_ NVARCHAR2(64) not null,
  26. TYPE_ NVARCHAR2(255) not null,
  27. PROC_INST_ID_ NVARCHAR2(64),
  28. EXECUTION_ID_ NVARCHAR2(64),
  29. TASK_ID_ NVARCHAR2(64),
  30. ACT_INST_ID_ NVARCHAR2(64),
  31. NAME_ NVARCHAR2(255),
  32. VAR_TYPE_ NVARCHAR2(64),
  33. REV_ INTEGER,
  34. TIME_ TIMESTAMP(6) not null,
  35. BYTEARRAY_ID_ NVARCHAR2(64),
  36. DOUBLE_ NUMBER(*,10),
  37. LONG_ NUMBER(19,0),
  38. TEXT_ NVARCHAR2(255),
  39. TEXT2_ NVARCHAR2(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 (ID_,TYPE_,PROC_INST_ID_,EXECUTION_ID_,TASK_ID_,ACT_INST_ID_,NAME_,VAR_TYPE_,REV_,TIME_,BYTEARRAY_ID_,DOUBLE_,LONG_,TEXT_,TEXT2_)
  47. select ID_,TYPE_,PROC_INST_ID_,EXECUTION_ID_,TASK_ID_,ACT_INST_ID_,NAME_,VAR_TYPE_,REV_,TIME_,BYTEARRAY_ID_,DOUBLE_,LONG_,TEXT_,TEXT2_ 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;