activiti.postgres.create.identity.sql 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. create table ACT_ID_GROUP (
  2. ID_ varchar(64),
  3. REV_ integer,
  4. NAME_ varchar(255),
  5. TYPE_ varchar(255),
  6. primary key (ID_)
  7. );
  8. create table ACT_ID_MEMBERSHIP (
  9. USER_ID_ varchar(64),
  10. GROUP_ID_ varchar(64),
  11. primary key (USER_ID_, GROUP_ID_)
  12. );
  13. create table ACT_ID_USER (
  14. ID_ varchar(64),
  15. REV_ integer,
  16. FIRST_ varchar(255),
  17. LAST_ varchar(255),
  18. EMAIL_ varchar(255),
  19. PWD_ varchar(255),
  20. PICTURE_ID_ varchar(64),
  21. primary key (ID_)
  22. );
  23. create table ACT_ID_INFO (
  24. ID_ varchar(64),
  25. REV_ integer,
  26. USER_ID_ varchar(64),
  27. TYPE_ varchar(64),
  28. KEY_ varchar(255),
  29. VALUE_ varchar(255),
  30. PASSWORD_ bytea,
  31. PARENT_ID_ varchar(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_);