[CalendarServer-changes] [12284] CalendarServer/trunk/txdav/common/datastore/sql_schema

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 12 11:18:52 PDT 2014


Revision: 12284
          http://trac.calendarserver.org//changeset/12284
Author:   cdaboo at apple.com
Date:     2014-01-10 10:01:59 -0800 (Fri, 10 Jan 2014)
Log Message:
-----------
Re-order SQL upgrades after non-sequential merge of an upgrade to -5.2-dev branch.

Modified Paths:
--------------
    CalendarServer/trunk/txdav/common/datastore/sql_schema/old/oracle-dialect/v28.sql
    CalendarServer/trunk/txdav/common/datastore/sql_schema/old/postgres-dialect/v28.sql
    CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_27_to_28.sql
    CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_28_to_29.sql
    CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_27_to_28.sql
    CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_28_to_29.sql

Modified: CalendarServer/trunk/txdav/common/datastore/sql_schema/old/oracle-dialect/v28.sql
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_schema/old/oracle-dialect/v28.sql	2014-01-10 17:56:24 UTC (rev 12283)
+++ CalendarServer/trunk/txdav/common/datastore/sql_schema/old/oracle-dialect/v28.sql	2014-01-10 18:01:59 UTC (rev 12284)
@@ -30,7 +30,6 @@
     "QUOTA_USED_BYTES" integer default 0 not null,
     "DEFAULT_EVENTS" integer default null references CALENDAR on delete set null,
     "DEFAULT_TASKS" integer default null references CALENDAR on delete set null,
-    "DEFAULT_POLLS" integer default null references CALENDAR on delete set null,
     "ALARM_VEVENT_TIMED" nclob default null,
     "ALARM_VEVENT_ALLDAY" nclob default null,
     "ALARM_VTODO_TIMED" nclob default null,
@@ -347,7 +346,8 @@
 create table PUSH_NOTIFICATION_WORK (
     "WORK_ID" integer primary key not null,
     "NOT_BEFORE" timestamp default CURRENT_TIMESTAMP at time zone 'UTC',
-    "PUSH_ID" nvarchar2(255)
+    "PUSH_ID" nvarchar2(255),
+    "PRIORITY" integer not null
 );
 
 create table GROUP_CACHER_POLLING_WORK (
@@ -377,10 +377,6 @@
     DEFAULT_TASKS
 );
 
-create index CALENDAR_HOME_METADAT_910264ce on CALENDAR_HOME_METADATA (
-    DEFAULT_POLLS
-);
-
 create index NOTIFICATION_NOTIFICA_f891f5f9 on NOTIFICATION (
     NOTIFICATION_HOME_RESOURCE_ID
 );

Modified: CalendarServer/trunk/txdav/common/datastore/sql_schema/old/postgres-dialect/v28.sql
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_schema/old/postgres-dialect/v28.sql	2014-01-10 17:56:24 UTC (rev 12283)
+++ CalendarServer/trunk/txdav/common/datastore/sql_schema/old/postgres-dialect/v28.sql	2014-01-10 18:01:59 UTC (rev 12284)
@@ -74,7 +74,6 @@
   QUOTA_USED_BYTES         integer     default 0 not null,
   DEFAULT_EVENTS           integer     default null references CALENDAR on delete set null,
   DEFAULT_TASKS            integer     default null references CALENDAR on delete set null,
-  DEFAULT_POLLS            integer     default null references CALENDAR on delete set null,
   ALARM_VEVENT_TIMED       text        default null,
   ALARM_VEVENT_ALLDAY      text        default null,
   ALARM_VTODO_TIMED        text        default null,
@@ -88,8 +87,6 @@
 	CALENDAR_HOME_METADATA(DEFAULT_EVENTS);
 create index CALENDAR_HOME_METADATA_DEFAULT_TASKS on
 	CALENDAR_HOME_METADATA(DEFAULT_TASKS);
-create index CALENDAR_HOME_METADATA_DEFAULT_POLLS on
-	CALENDAR_HOME_METADATA(DEFAULT_POLLS);
 
 -----------------------
 -- Calendar Metadata --
@@ -666,7 +663,8 @@
 create table PUSH_NOTIFICATION_WORK (
   WORK_ID                       integer      primary key default nextval('WORKITEM_SEQ') not null, -- implicit index
   NOT_BEFORE                    timestamp    default timezone('UTC', CURRENT_TIMESTAMP),
-  PUSH_ID                       varchar(255) not null
+  PUSH_ID                       varchar(255) not null,
+  PRIORITY                      integer      not null -- 1:low 5:medium 10:high
 );
 
 -----------------

Modified: CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_27_to_28.sql
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_27_to_28.sql	2014-01-10 17:56:24 UTC (rev 12283)
+++ CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_27_to_28.sql	2014-01-10 18:01:59 UTC (rev 12284)
@@ -18,16 +18,12 @@
 -- Upgrade database schema from VERSION 27 to 28 --
 ---------------------------------------------------
 
--- Calendar home related updates
+-- Push notification work related updates
 
-alter table CALENDAR_HOME_METADATA
- add ("DEFAULT_POLLS" integer default null references CALENDAR on delete set null);
+alter table PUSH_NOTIFICATION_WORK
+ add ("PRIORITY" integer default 10 not null);
 
-create index CALENDAR_HOME_METADAT_910264ce on CALENDAR_HOME_METADATA (
-    DEFAULT_POLLS
-);
+update PUSH_NOTIFICATION_WORK set PRIORITY = 10;
 
-
 -- Now update the version
--- No data upgrades
 update CALENDARSERVER set VALUE = '28' where NAME = 'VERSION';

Modified: CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_28_to_29.sql
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_28_to_29.sql	2014-01-10 17:56:24 UTC (rev 12283)
+++ CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_28_to_29.sql	2014-01-10 18:01:59 UTC (rev 12284)
@@ -18,12 +18,16 @@
 -- Upgrade database schema from VERSION 28 to 29 --
 ---------------------------------------------------
 
--- Push notification work related updates
+-- Calendar home related updates
 
-alter table PUSH_NOTIFICATION_WORK
- add ("PRIORITY" integer default 10 not null);
+alter table CALENDAR_HOME_METADATA
+ add ("DEFAULT_POLLS" integer default null references CALENDAR on delete set null);
 
-update PUSH_NOTIFICATION_WORK set PRIORITY = 10;
+create index CALENDAR_HOME_METADAT_910264ce on CALENDAR_HOME_METADATA (
+    DEFAULT_POLLS
+);
 
+
 -- Now update the version
+-- No data upgrades
 update CALENDARSERVER set VALUE = '29' where NAME = 'VERSION';

Modified: CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_27_to_28.sql
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_27_to_28.sql	2014-01-10 17:56:24 UTC (rev 12283)
+++ CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_27_to_28.sql	2014-01-10 18:01:59 UTC (rev 12284)
@@ -18,14 +18,12 @@
 -- Upgrade database schema from VERSION 27 to 28 --
 ---------------------------------------------------
 
--- Calendar home related updates
+-- Push notification work related updates
 
-alter table CALENDAR_HOME_METADATA
- add column DEFAULT_POLLS integer default null references CALENDAR on delete set null;
+alter table PUSH_NOTIFICATION_WORK
+ add column PRIORITY integer default 10 not null;
 
-create index CALENDAR_HOME_METADATA_DEFAULT_POLLS on
-	CALENDAR_HOME_METADATA(DEFAULT_POLLS);
+update PUSH_NOTIFICATION_WORK set PRIORITY = 10;
 
 -- Now update the version
--- No data upgrades
 update CALENDARSERVER set VALUE = '28' where NAME = 'VERSION';

Modified: CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_28_to_29.sql
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_28_to_29.sql	2014-01-10 17:56:24 UTC (rev 12283)
+++ CalendarServer/trunk/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_28_to_29.sql	2014-01-10 18:01:59 UTC (rev 12284)
@@ -18,12 +18,14 @@
 -- Upgrade database schema from VERSION 28 to 29 --
 ---------------------------------------------------
 
--- Push notification work related updates
+-- Calendar home related updates
 
-alter table PUSH_NOTIFICATION_WORK
- add column PRIORITY integer default 10 not null;
+alter table CALENDAR_HOME_METADATA
+ add column DEFAULT_POLLS integer default null references CALENDAR on delete set null;
 
-update PUSH_NOTIFICATION_WORK set PRIORITY = 10;
+create index CALENDAR_HOME_METADATA_DEFAULT_POLLS on
+	CALENDAR_HOME_METADATA(DEFAULT_POLLS);
 
 -- Now update the version
+-- No data upgrades
 update CALENDARSERVER set VALUE = '29' where NAME = 'VERSION';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/20a60965/attachment.html>


More information about the calendarserver-changes mailing list