os_groups_Store.migrations 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. :VERSION 1 # --------------------------
  2. BEGIN;
  3. CREATE TABLE `os_groups_groups` (
  4. `GroupID` char(36) 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` int(11) NOT NULL default '0',
  11. `OpenEnrollment` varchar(255) NOT NULL default '',
  12. `ShowInList` int(4) NOT NULL default '0',
  13. `AllowPublish` int(4) NOT NULL default '0',
  14. `MaturePublish` int(4) NOT NULL default '0',
  15. `OwnerRoleID` char(36) NOT NULL default '',
  16. PRIMARY KEY (`GroupID`),
  17. UNIQUE KEY `Name` (`Name`),
  18. FULLTEXT KEY `Name_2` (`Name`)
  19. ) ENGINE=MyISAM;
  20. CREATE TABLE `os_groups_membership` (
  21. `GroupID`char(36) NOT NULL default '',
  22. `PrincipalID` VARCHAR(255) NOT NULL default '',
  23. `SelectedRoleID` char(36) NOT NULL default '',
  24. `Contribution` int(11) NOT NULL default '0',
  25. `ListInProfile` int(4) NOT NULL default '1',
  26. `AcceptNotices` int(4) NOT NULL default '1',
  27. `AccessToken` char(36) NOT NULL default '',
  28. PRIMARY KEY (`GroupID`,`PrincipalID`),
  29. KEY `PrincipalID` (`PrincipalID`)
  30. ) ENGINE=MyISAM;
  31. CREATE TABLE `os_groups_roles` (
  32. `GroupID` char(36) NOT NULL default '',
  33. `RoleID` char(36) NOT NULL default '',
  34. `Name` varchar(255) NOT NULL default '',
  35. `Description` varchar(255) NOT NULL default '',
  36. `Title` varchar(255) NOT NULL default '',
  37. `Powers` bigint(20) unsigned NOT NULL default '0',
  38. PRIMARY KEY (`GroupID`,`RoleID`),
  39. KEY `GroupID` (`GroupID`)
  40. ) ENGINE=MyISAM;
  41. CREATE TABLE `os_groups_rolemembership` (
  42. `GroupID` char(36) NOT NULL default '',
  43. `RoleID` char(36) NOT NULL default '',
  44. `PrincipalID` VARCHAR(255) NOT NULL default '',
  45. PRIMARY KEY (`GroupID`,`RoleID`,`PrincipalID`),
  46. KEY `PrincipalID` (`PrincipalID`)
  47. ) ENGINE=MyISAM;
  48. CREATE TABLE `os_groups_invites` (
  49. `InviteID` char(36) NOT NULL default '',
  50. `GroupID` char(36) NOT NULL default '',
  51. `RoleID` char(36) NOT NULL default '',
  52. `PrincipalID` VARCHAR(255) NOT NULL default '',
  53. `TMStamp` timestamp NOT NULL,
  54. PRIMARY KEY (`InviteID`),
  55. UNIQUE KEY `PrincipalGroup` (`GroupID`,`PrincipalID`)
  56. ) ENGINE=MyISAM;
  57. CREATE TABLE `os_groups_notices` (
  58. `GroupID` char(36) NOT NULL default '',
  59. `NoticeID` char(36) NOT NULL default '',
  60. `TMStamp` int(10) unsigned NOT NULL default '0',
  61. `FromName` varchar(255) NOT NULL default '',
  62. `Subject` varchar(255) NOT NULL default '',
  63. `Message` text NOT NULL,
  64. `HasAttachment` int(4) NOT NULL default '0',
  65. `AttachmentType` int(4) NOT NULL default '0',
  66. `AttachmentName` varchar(128) NOT NULL default '',
  67. `AttachmentItemID` char(36) NOT NULL default '',
  68. `AttachmentOwnerID` varchar(255) NOT NULL default '',
  69. PRIMARY KEY (`NoticeID`),
  70. KEY `GroupID` (`GroupID`),
  71. KEY `TMStamp` (`TMStamp`)
  72. ) ENGINE=MyISAM;
  73. CREATE TABLE `os_groups_principals` (
  74. `PrincipalID` VARCHAR(255) NOT NULL default '',
  75. `ActiveGroupID` char(36) NOT NULL default '',
  76. PRIMARY KEY (`PrincipalID`)
  77. ) ENGINE=MyISAM;
  78. COMMIT;
  79. :VERSION 2 # --------------------------
  80. BEGIN;
  81. INSERT INTO `os_groups_groups` SELECT * from `diva_groups_groups`;
  82. DROP TABLE `diva_groups_groups`;
  83. INSERT INTO `os_groups_membership` SELECT * from `diva_groups_membership`;
  84. DROP TABLE `diva_groups_membership`;
  85. INSERT INTO `os_groups_roles` SELECT * from `diva_groups_roles`;
  86. DROP TABLE `diva_groups_roles`;
  87. INSERT INTO `os_groups_rolemembership` SELECT * from `diva_groups_rolemembership`;
  88. DROP TABLE `diva_groups_rolemembership`;
  89. INSERT INTO `os_groups_invites` SELECT * from `diva_groups_invites`;
  90. DROP TABLE `diva_groups_invites`;
  91. INSERT INTO `os_groups_notices` SELECT * from `diva_groups_notices`;
  92. DROP TABLE `diva_groups_notices`;
  93. INSERT INTO `os_groups_principals` SELECT * from `diva_groups_principals`;
  94. DROP TABLE `diva_groups_principals`;
  95. DELETE FROM `migrations` WHERE name='diva_im_Store';
  96. COMMIT;