From 78965b7743c4cc72ba76499e395a20e8248bc7a5 Mon Sep 17 00:00:00 2001 From: pb Date: Sun, 8 Jun 2008 17:11:01 +0000 Subject: [PATCH] Integration of patch r1700 of vendor trunk: Addendum for r1633 to make the update script work for postgres: Split of the common update script in ~/sql/ccm-ldn-image-script/default/upgrade/ into separate scripts for Oracle and Postgresql to reflect syntax differences. (patch makes a contact item capable to be associated with any other content item) git-svn-id: https://svn.libreccm.org/ccm/trunk@47 8810af33-2d31-482b-a856-94f89814c4df --- .../upgrade/6.5.0-6.5.1/add_link_column.sql | 0 .../upgrade/6.5.0-6.5.1/add_link_column.sql | 25 +++++++++++++++++++ .../upgrade/oracle-se-6.5.0-6.5.1.sql | 2 +- .../upgrade/postgres-6.5.0-6.5.1.sql | 2 +- 4 files changed, 27 insertions(+), 2 deletions(-) rename ccm-ldn-image-step/sql/ccm-ldn-image-step/{default => oracle-se}/upgrade/6.5.0-6.5.1/add_link_column.sql (100%) create mode 100644 ccm-ldn-image-step/sql/ccm-ldn-image-step/postgres/upgrade/6.5.0-6.5.1/add_link_column.sql diff --git a/ccm-ldn-image-step/sql/ccm-ldn-image-step/default/upgrade/6.5.0-6.5.1/add_link_column.sql b/ccm-ldn-image-step/sql/ccm-ldn-image-step/oracle-se/upgrade/6.5.0-6.5.1/add_link_column.sql similarity index 100% rename from ccm-ldn-image-step/sql/ccm-ldn-image-step/default/upgrade/6.5.0-6.5.1/add_link_column.sql rename to ccm-ldn-image-step/sql/ccm-ldn-image-step/oracle-se/upgrade/6.5.0-6.5.1/add_link_column.sql diff --git a/ccm-ldn-image-step/sql/ccm-ldn-image-step/postgres/upgrade/6.5.0-6.5.1/add_link_column.sql b/ccm-ldn-image-step/sql/ccm-ldn-image-step/postgres/upgrade/6.5.0-6.5.1/add_link_column.sql new file mode 100644 index 000000000..876cd42aa --- /dev/null +++ b/ccm-ldn-image-step/sql/ccm-ldn-image-step/postgres/upgrade/6.5.0-6.5.1/add_link_column.sql @@ -0,0 +1,25 @@ +-- +-- Copyright (C) 2005 Chris Gilbert. All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- + +alter table cms_item_image_attachment add link_id INTEGER; + +alter table cms_item_image_attachment add + constraint cms_ite_ima_att_lin_id_f_eeymm foreign key (link_id) + references cms_links(link_id); + + diff --git a/ccm-ldn-image-step/sql/ccm-ldn-image-step/upgrade/oracle-se-6.5.0-6.5.1.sql b/ccm-ldn-image-step/sql/ccm-ldn-image-step/upgrade/oracle-se-6.5.0-6.5.1.sql index ae0414a6c..a8e45dfa5 100644 --- a/ccm-ldn-image-step/sql/ccm-ldn-image-step/upgrade/oracle-se-6.5.0-6.5.1.sql +++ b/ccm-ldn-image-step/sql/ccm-ldn-image-step/upgrade/oracle-se-6.5.0-6.5.1.sql @@ -1,4 +1,4 @@ PROMPT ImageStep 6.5.0 -> 6.5.1 Upgrade Script (Oracle) -@@ ../default/upgrade/6.5.0-6.5.1/add_link_column.sql +@@ ../oracle-se/upgrade/6.5.0-6.5.1/add_link_column.sql diff --git a/ccm-ldn-image-step/sql/ccm-ldn-image-step/upgrade/postgres-6.5.0-6.5.1.sql b/ccm-ldn-image-step/sql/ccm-ldn-image-step/upgrade/postgres-6.5.0-6.5.1.sql index 71553c545..bff18b237 100644 --- a/ccm-ldn-image-step/sql/ccm-ldn-image-step/upgrade/postgres-6.5.0-6.5.1.sql +++ b/ccm-ldn-image-step/sql/ccm-ldn-image-step/upgrade/postgres-6.5.0-6.5.1.sql @@ -2,6 +2,6 @@ begin; -\i ../default/upgrade/6.5.0-6.5.1/add_link_column.sql +\i ../postgres/upgrade/6.5.0-6.5.1/add_link_column.sql commit;