activiti.oracle.create.identity.sql 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. create table ACT_ID_GROUP (
  2. ID_ NVARCHAR2(64),
  3. REV_ INTEGER,
  4. NAME_ NVARCHAR2(255),
  5. TYPE_ NVARCHAR2(255),
  6. primary key (ID_)
  7. );
  8. create table ACT_ID_MEMBERSHIP (
  9. USER_ID_ NVARCHAR2(64),
  10. GROUP_ID_ NVARCHAR2(64),
  11. primary key (USER_ID_, GROUP_ID_)
  12. );
  13. create table ACT_ID_USER (
  14. ID_ NVARCHAR2(64),
  15. REV_ INTEGER,
  16. FIRST_ NVARCHAR2(255),
  17. LAST_ NVARCHAR2(255),
  18. EMAIL_ NVARCHAR2(255),
  19. PWD_ NVARCHAR2(255),
  20. PICTURE_ID_ NVARCHAR2(64),
  21. primary key (ID_)
  22. );
  23. create table ACT_ID_INFO (
  24. ID_ NVARCHAR2(64),
  25. REV_ INTEGER,
  26. USER_ID_ NVARCHAR2(64),
  27. TYPE_ NVARCHAR2(64),
  28. KEY_ NVARCHAR2(255),
  29. VALUE_ NVARCHAR2(255),
  30. PASSWORD_ BLOB,
  31. PARENT_ID_ NVARCHAR2(255),
  32. primary key (ID_)
  33. );
  34. create index ACT_IDX_MEMB_GROUP on ACT_ID_MEMBERSHIP(GROUP_ID_);
  35. alter table ACT_ID_MEMBERSHIP
  36. add constraint ACT_FK_MEMB_GROUP
  37. foreign key (GROUP_ID_)
  38. references ACT_ID_GROUP (ID_);
  39. create index ACT_IDX_MEMB_USER on ACT_ID_MEMBERSHIP(USER_ID_);
  40. alter table ACT_ID_MEMBERSHIP
  41. add constraint ACT_FK_MEMB_USER
  42. foreign key (USER_ID_)
  43. references ACT_ID_USER (ID_);