[CalendarServer-changes] [11735] CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/common/ datastore/sql_schema

source_changes at macosforge.org source_changes at macosforge.org
Tue Sep 17 17:07:03 PDT 2013


Revision: 11735
          http://trac.calendarserver.org//changeset/11735
Author:   gaya at apple.com
Date:     2013-09-17 17:07:03 -0700 (Tue, 17 Sep 2013)
Log Message:
-----------
Fix db upgrade

Modified Paths:
--------------
    CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/common/datastore/sql_schema/current-oracle-dialect.sql
    CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_24_to_25.sql
    CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_24_to_25.sql

Modified: CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/common/datastore/sql_schema/current-oracle-dialect.sql
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/common/datastore/sql_schema/current-oracle-dialect.sql	2013-09-17 23:41:33 UTC (rev 11734)
+++ CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/common/datastore/sql_schema/current-oracle-dialect.sql	2013-09-18 00:07:03 UTC (rev 11735)
@@ -257,7 +257,7 @@
     "MEMBER_ID" integer not null,
     "REVISION" integer not null,
     "REMOVED" integer default 0 not null, 
-    primary key("GROUP_ID", "MEMBER_ID")
+    primary key("GROUP_ID", "MEMBER_ID", "REVISION")
 );
 
 create table ABO_FOREIGN_MEMBERS (
@@ -292,6 +292,7 @@
     "ADDRESSBOOK_HOME_RESOURCE_ID" integer not null references ADDRESSBOOK_HOME,
     "OWNER_ADDRESSBOOK_HOME_RESOURCE_ID" integer references ADDRESSBOOK_HOME,
     "ADDRESSBOOK_NAME" nvarchar2(255) default null,
+    "OBJECT_RESOURCE_ID" integer default 0,
     "RESOURCE_NAME" nvarchar2(255),
     "REVISION" integer not null,
     "DELETED" integer not null

Modified: CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_24_to_25.sql
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_24_to_25.sql	2013-09-17 23:41:33 UTC (rev 11734)
+++ CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_24_to_25.sql	2013-09-18 00:07:03 UTC (rev 11735)
@@ -30,7 +30,18 @@
 	add ("REVISION" integer default nextval('REVISION_SEQ') not null);
 alter table ABO_MEMBERS
 	add ("REMOVED" boolean default false not null);
-		
+alter table ABO_MEMBERS
+	 drop ("abo_members_pkey");
+alter table ABO_MEMBERS
+	 add ("abo_members_pkey" primary key ("GROUP_ID", "MEMBER_ID", "REVISION"));
+
+------------------------------------------
+-- Change Address Book Object Revisions --
+------------------------------------------
+	
+alter table ADDRESSBOOK_OBJECT_REVISIONS
+	add ("OBJECT_RESOURCE_ID" integer default 0);
+
 --------------------
 -- Update version --
 --------------------

Modified: CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_24_to_25.sql
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_24_to_25.sql	2013-09-17 23:41:33 UTC (rev 11734)
+++ CalendarServer/branches/users/gaya/sharedgroupfixes/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_24_to_25.sql	2013-09-18 00:07:03 UTC (rev 11735)
@@ -26,8 +26,17 @@
 	drop constraint	abo_members_member_id_fkey,
 	drop constraint	abo_members_group_id_fkey,
 	add column	REVISION		integer      default nextval('REVISION_SEQ') not null,
-	add column	REMOVED         boolean      default false not null;
-		
+	add column	REMOVED         boolean      default false not null,
+	drop constraint abo_members_pkey,
+	add constraint abo_members_pkey primary key(GROUP_ID, MEMBER_ID, REVISION);
+
+------------------------------------------
+-- Change Address Book Object Revisions --
+------------------------------------------
+	
+alter table ADDRESSBOOK_OBJECT_REVISIONS
+	add column OBJECT_RESOURCE_ID integer default 0;
+	
 --------------------
 -- Update version --
 --------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130917/f8fba909/attachment.html>


More information about the calendarserver-changes mailing list