[CalendarServer-changes] [12822] CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/ oracle-dialect/upgrade_from_30_to_31.sql
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 5 13:20:34 PST 2014
Revision: 12822
http://trac.calendarserver.org//changeset/12822
Author: gaya at apple.com
Date: 2014-03-05 13:20:34 -0800 (Wed, 05 Mar 2014)
Log Message:
-----------
Fix according to Dre's recommendations
Modified Paths:
--------------
CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_30_to_31.sql
Modified: CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_30_to_31.sql
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_30_to_31.sql 2014-03-05 19:44:20 UTC (rev 12821)
+++ CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_30_to_31.sql 2014-03-05 21:20:34 UTC (rev 12822)
@@ -23,10 +23,13 @@
----------------------------------------
begin
-for i in (select constraint_name from user_cons_columns where column_name = 'MEMBER_ID' or column_name = 'GROUP_ID')
-loop
-execute immediate 'alter table abo_members drop constraint' || i.constraint_name;
-end loop;
+ for i in (select constraint_name
+ from user_cons_columns
+ where table_name = 'ABO_MEMBERS'
+ and ( column_name = 'MEMBER_ID'
+ or column_name = 'GROUP_ID' )) loop
+ execute immediate 'alter table ABO_MEMBERS drop constraint '|| i.constraint_name;
+ end loop;
end;
alter table ABO_MEMBERS
@@ -34,8 +37,6 @@
alter table ABO_MEMBERS
add ("REMOVED" integer default 0 not null);
alter table ABO_MEMBERS
- drop primary key;
-alter table ABO_MEMBERS
add primary key ("GROUP_ID", "MEMBER_ID", "REVISION");
------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140305/5dfa265d/attachment-0001.html>
More information about the calendarserver-changes
mailing list