[CalendarServer-changes] [15171] CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades

source_changes at macosforge.org source_changes at macosforge.org
Wed Oct 7 12:37:54 PDT 2015


Revision: 15171
          http://trac.calendarserver.org//changeset/15171
Author:   cdaboo at apple.com
Date:     2015-10-07 12:37:53 -0700 (Wed, 07 Oct 2015)
Log Message:
-----------
Fix for empty PERUSER.USER_ID column data.

Modified Paths:
--------------
    CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_47_to_48.sql
    CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_47_to_48.sql
    CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_58_to_59.sql

Modified: CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_47_to_48.sql
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_47_to_48.sql	2015-10-07 16:31:40 UTC (rev 15170)
+++ CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_47_to_48.sql	2015-10-07 19:37:53 UTC (rev 15171)
@@ -21,6 +21,7 @@
 
 
 -- Add pkey to PERUSER and remove old index
+update PERUSER set USER_ID = '.' where USER_ID = '';
 alter table PERUSER add primary key (TIME_RANGE_INSTANCE_ID, USER_ID);
 drop index PERUSER_TIME_RANGE_IN_5468a226;
 

Modified: CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_47_to_48.sql
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_47_to_48.sql	2015-10-07 16:31:40 UTC (rev 15170)
+++ CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_47_to_48.sql	2015-10-07 19:37:53 UTC (rev 15171)
@@ -21,6 +21,7 @@
 
 
 -- Add pkey to PERUSER and remove old index
+update PERUSER set USER_ID = '.' where USER_ID = '';
 alter table PERUSER add primary key (TIME_RANGE_INSTANCE_ID, USER_ID);
 drop index PERUSER_TIME_RANGE_INSTANCE_ID;
 

Modified: CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_58_to_59.sql
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_58_to_59.sql	2015-10-07 16:31:40 UTC (rev 15170)
+++ CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_58_to_59.sql	2015-10-07 19:37:53 UTC (rev 15171)
@@ -28,5 +28,8 @@
 create index JOB_ASSIGNED_OVERDUE on
   JOB(ASSIGNED, OVERDUE);
 
+-- Missing data upgrade that should have been in 47_to_48
+update PERUSER set USER_ID = '.' where USER_ID = '';
+
 -- update the version
 update CALENDARSERVER set VALUE = '59' where NAME = 'VERSION';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20151007/8b94b67a/attachment.html>


More information about the calendarserver-changes mailing list