[CalendarServer-changes] [9686] CalendarServer/branches/users/glyph/q

source_changes at macosforge.org source_changes at macosforge.org
Sat Aug 11 01:55:54 PDT 2012


Revision: 9686
          http://trac.macosforge.org/projects/calendarserver/changeset/9686
Author:   glyph at apple.com
Date:     2012-08-11 01:55:54 -0700 (Sat, 11 Aug 2012)
Log Message:
-----------
Schema upgrader to incorporate new table.

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/q/txdav/common/datastore/sql_schema/current.sql

Added Paths:
-----------
    CalendarServer/branches/users/glyph/q/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_11_to_12.sql
    CalendarServer/branches/users/glyph/q/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_11_to_12.sql

Property Changed:
----------------
    CalendarServer/branches/users/glyph/q/

Modified: CalendarServer/branches/users/glyph/q/txdav/common/datastore/sql_schema/current.sql
===================================================================
--- CalendarServer/branches/users/glyph/q/txdav/common/datastore/sql_schema/current.sql	2012-08-11 08:55:52 UTC (rev 9685)
+++ CalendarServer/branches/users/glyph/q/txdav/common/datastore/sql_schema/current.sql	2012-08-11 08:55:54 UTC (rev 9686)
@@ -513,6 +513,6 @@
   VALUE                         varchar(255)
 );
 
-insert into CALENDARSERVER values ('VERSION', '11');
+insert into CALENDARSERVER values ('VERSION', '12');
 insert into CALENDARSERVER values ('CALENDAR-DATAVERSION', '3');
 insert into CALENDARSERVER values ('ADDRESSBOOK-DATAVERSION', '1');

Added: CalendarServer/branches/users/glyph/q/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_11_to_12.sql
===================================================================
--- CalendarServer/branches/users/glyph/q/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_11_to_12.sql	                        (rev 0)
+++ CalendarServer/branches/users/glyph/q/txdav/common/datastore/sql_schema/upgrades/oracle-dialect/upgrade_from_11_to_12.sql	2012-08-11 08:55:54 UTC (rev 9686)
@@ -0,0 +1,31 @@
+----
+-- Copyright (c) 2012 Apple Inc. All rights reserved.
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+----
+
+---------------------------------------------------
+-- Upgrade database schema from VERSION 11 to 12 --
+---------------------------------------------------
+
+create table NODE_INFO (
+    "HOSTNAME" nvarchar2(255),
+    "PID" integer not null,
+    "PORT" integer not null,
+    "TIME" timestamp default CURRENT_TIMESTAMP at time zone 'UTC' not null,
+    primary key("HOSTNAME", "PORT")
+);
+
+-- Now update the version
+-- No data upgrades
+update CALENDARSERVER set VALUE = '12' where NAME = 'VERSION';

Added: CalendarServer/branches/users/glyph/q/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_11_to_12.sql
===================================================================
--- CalendarServer/branches/users/glyph/q/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_11_to_12.sql	                        (rev 0)
+++ CalendarServer/branches/users/glyph/q/txdav/common/datastore/sql_schema/upgrades/postgres-dialect/upgrade_from_11_to_12.sql	2012-08-11 08:55:54 UTC (rev 9686)
@@ -0,0 +1,31 @@
+----
+-- Copyright (c) 2012 Apple Inc. All rights reserved.
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+----
+
+---------------------------------------------------
+-- Upgrade database schema from VERSION 11 to 12 --
+---------------------------------------------------
+
+create table NODE_INFO (
+  HOSTNAME  varchar(255) not null,
+  PID       integer not null,
+  PORT      integer not null,
+  TIME      timestamp not null default timezone('UTC', CURRENT_TIMESTAMP),
+  primary key(HOSTNAME, PORT)
+);
+
+-- Now update the version
+-- No data upgrades
+update CALENDARSERVER set VALUE = '12' where NAME = 'VERSION';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120811/6e486615/attachment-0001.html>


More information about the calendarserver-changes mailing list