activiti.mssql.upgradestep.510.to.511.engine.sql 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. alter table ACT_RE_PROCDEF drop constraint ACT_UNIQ_PROCDEF;
  2. alter table ACT_RE_PROCDEF alter column KEY_ nvarchar(255) not null;
  3. alter table ACT_RE_PROCDEF alter column VERSION_ int not null;
  4. alter table ACT_RE_PROCDEF
  5. add constraint ACT_UNIQ_PROCDEF
  6. unique (KEY_,VERSION_);
  7. alter table ACT_RE_DEPLOYMENT add CATEGORY_ nvarchar(255);
  8. alter table ACT_RE_PROCDEF
  9. add DESCRIPTION_ nvarchar(4000);
  10. alter table ACT_RU_TASK
  11. add SUSPENSION_STATE_ int;
  12. update ACT_RU_TASK set SUSPENSION_STATE_ = 1;
  13. alter table ACT_RU_EXECUTION
  14. add constraint ACT_FK_EXE_PROCDEF
  15. foreign key (PROC_DEF_ID_)
  16. references ACT_RE_PROCDEF (ID_);
  17. create table ACT_RE_MODEL (
  18. ID_ nvarchar(64) not null,
  19. REV_ int,
  20. NAME_ nvarchar(255),
  21. KEY_ nvarchar(255),
  22. CATEGORY_ nvarchar(255),
  23. CREATE_TIME_ datetime,
  24. LAST_UPDATE_TIME_ datetime,
  25. VERSION_ int,
  26. META_INFO_ nvarchar(4000),
  27. DEPLOYMENT_ID_ nvarchar(64),
  28. EDITOR_SOURCE_VALUE_ID_ nvarchar(64),
  29. EDITOR_SOURCE_EXTRA_VALUE_ID_ nvarchar(64),
  30. primary key (ID_)
  31. );
  32. alter table ACT_RE_MODEL
  33. add constraint ACT_FK_MODEL_SOURCE
  34. foreign key (EDITOR_SOURCE_VALUE_ID_)
  35. references ACT_GE_BYTEARRAY (ID_);
  36. alter table ACT_RE_MODEL
  37. add constraint ACT_FK_MODEL_SOURCE_EXTRA
  38. foreign key (EDITOR_SOURCE_EXTRA_VALUE_ID_)
  39. references ACT_GE_BYTEARRAY (ID_);
  40. alter table ACT_RE_MODEL
  41. add constraint ACT_FK_MODEL_DEPLOYMENT
  42. foreign key (DEPLOYMENT_ID_)
  43. references ACT_RE_DEPLOYMENT (ID_);
  44. delete from ACT_GE_PROPERTY where NAME_ = 'historyLevel';
  45. alter table ACT_RU_JOB
  46. add PROC_DEF_ID_ nvarchar(64);
  47. update ACT_GE_PROPERTY set VALUE_ = '5.11' where NAME_ = 'schema.version';