[CalendarServer-changes] [11847] CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/ postgres-dialect/upgrade_from_13_to_14.sql
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:21:38 PDT 2014
Revision: 11847
http://trac.calendarserver.org//changeset/11847
Author: cdaboo at apple.com
Date: 2013-10-30 09:44:52 -0700 (Wed, 30 Oct 2013)
Log Message:
-----------
Merge constraint fix from -5.1-dev branch.
Modified Paths:
--------------
CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_13_to_14.sql
Modified: CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_13_to_14.sql
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_13_to_14.sql 2013-10-30 16:42:16 UTC (rev 11846)
+++ CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_13_to_14.sql 2013-10-30 16:44:52 UTC (rev 11847)
@@ -26,6 +26,11 @@
drop column SEEN_BY_OWNER;
alter table CALENDAR_BIND
drop column SEEN_BY_SHAREE;
+
+-- Don't allow nulls in the column we are about to constrain
+update CALENDAR_BIND
+ set CALENDAR_RESOURCE_NAME = 'Shared_' || CALENDAR_RESOURCE_ID || '_' || CALENDAR_HOME_RESOURCE_ID
+ where CALENDAR_RESOURCE_NAME is null;
alter table CALENDAR_BIND
alter column CALENDAR_RESOURCE_NAME
set not null;
@@ -34,6 +39,11 @@
drop column SEEN_BY_OWNER;
alter table ADDRESSBOOK_BIND
drop column SEEN_BY_SHAREE;
+
+-- Don't allow nulls in the column we are about to constrain
+update ADDRESSBOOK_BIND
+ set ADDRESSBOOK_RESOURCE_NAME = 'Shared_' || ADDRESSBOOK_RESOURCE_ID || '_' || ADDRESSBOOK_HOME_RESOURCE_ID
+ where ADDRESSBOOK_RESOURCE_NAME is null;
alter table ADDRESSBOOK_BIND
alter column ADDRESSBOOK_RESOURCE_NAME
set not null;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/704417b7/attachment.html>
More information about the calendarserver-changes
mailing list