os_groups_Store.migrations 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. :VERSION 1 # --------------------------
  2. BEGIN;
  3. CREATE TABLE os_groups_groups (
  4. "GroupID" char(36) Primary Key NOT NULL default '',
  5. "Location" varchar(255) NOT NULL default '',
  6. "Name" varchar(255) NOT NULL default '',
  7. "Charter" text NOT NULL,
  8. "InsigniaID" char(36) NOT NULL default '',
  9. "FounderID" char(36) NOT NULL default '',
  10. "MembershipFee" integer NOT NULL default '0',
  11. "OpenEnrollment" varchar(255) NOT NULL default '',
  12. "ShowInList" integer NOT NULL default '0',
  13. "AllowPublish" integer NOT NULL default '0',
  14. "MaturePublish" integer NOT NULL default '0',
  15. "OwnerRoleID" char(36) NOT NULL default ''
  16. );
  17. CREATE TABLE os_groups_membership (
  18. "GroupID"char(36) NOT NULL default '',
  19. "PrincipalID" VARCHAR(255) NOT NULL default '',
  20. "SelectedRoleID" char(36) NOT NULL default '',
  21. "Contribution" integer NOT NULL default '0',
  22. "ListInProfile" integer NOT NULL default '1',
  23. "AcceptNotices" integer NOT NULL default '1',
  24. "AccessToken" char(36) NOT NULL default '',
  25. constraint os_groupmemberpk primary key ("GroupID", "PrincipalID")
  26. );
  27. CREATE TABLE os_groups_roles (
  28. "GroupID" char(36) NOT NULL default '',
  29. "RoleID" char(36) NOT NULL default '',
  30. "Name" varchar(255) NOT NULL default '',
  31. "Description" varchar(255) NOT NULL default '',
  32. "Title" varchar(255) NOT NULL default '',
  33. "Powers" bigint NOT NULL default 0,
  34. constraint os_grouprolepk PRIMARY KEY ("GroupID","RoleID")
  35. );
  36. CREATE TABLE os_groups_rolemembership (
  37. "GroupID" char(36) NOT NULL default '',
  38. "RoleID" char(36) NOT NULL default '',
  39. "PrincipalID" VARCHAR(255) NOT NULL default '',
  40. constraint os_grouprolememberpk PRIMARY KEY ("GroupID","RoleID","PrincipalID")
  41. );
  42. CREATE TABLE os_groups_invites (
  43. "InviteID" char(36) NOT NULL default '',
  44. "GroupID" char(36) NOT NULL default '',
  45. "RoleID" char(36) NOT NULL default '',
  46. "PrincipalID" VARCHAR(255) NOT NULL default '',
  47. "TMStamp" timestamp NOT NULL default now(),
  48. constraint os_groupinvitespk PRIMARY KEY ("InviteID")
  49. );
  50. -- UNIQUE KEY "PrincipalGroup" ("GroupID","PrincipalID")
  51. CREATE TABLE os_groups_notices (
  52. "GroupID" char(36) NOT NULL default '',
  53. "NoticeID" char(36) NOT NULL default '',
  54. "TMStamp" integer NOT NULL default '0',
  55. "FromName" varchar(255) NOT NULL default '',
  56. "Subject" varchar(255) NOT NULL default '',
  57. "Message" text NOT NULL,
  58. "HasAttachment" integer NOT NULL default '0',
  59. "AttachmentType" integer NOT NULL default '0',
  60. "AttachmentName" varchar(128) NOT NULL default '',
  61. "AttachmentItemID" char(36) NOT NULL default '',
  62. "AttachmentOwnerID" varchar(255) NOT NULL default '',
  63. constraint os_groupsnoticespk PRIMARY KEY ("NoticeID")
  64. );
  65. -- KEY "GroupID" ("GroupID"),
  66. -- KEY "TMStamp" ("TMStamp")
  67. CREATE TABLE os_groups_principals (
  68. "PrincipalID" VARCHAR(255) NOT NULL default '',
  69. "ActiveGroupID" char(36) NOT NULL default '',
  70. constraint os_groupprincpk PRIMARY KEY ("PrincipalID")
  71. );
  72. COMMIT;
  73. :VERSION 2 # --------------------------
  74. BEGIN;
  75. COMMIT;