activiti.mssql.create.identity.sql 1003 B

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