Patch to make APLAWS/CCM work with PostgreSQL 8.3, does not affect Oracle.

PostgreSQL 8.3 does no longer accept a mixture of integer and numeric fields in references/constrains. The modification 
eliminates a long standing performance complain by the analyze utility as well.

Update script provided, the Oracle version doesn't do anything at all. Postgres 8.x required for the update script to
work. If you use a 7.x version the upgrade isn't requirred and can savely be omitted.  


git-svn-id: https://svn.libreccm.org/ccm/trunk@66 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2008-12-25 23:39:20 +00:00
parent 712e43d266
commit a9e6b82350
8 changed files with 184 additions and 59 deletions

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project" <ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-cms" name="ccm-cms"
prettyName="Red Hat CCM Content Management System" prettyName="Red Hat CCM Content Management System"
version="6.5.3" version="6.5.4"
release="1" release="1"
webapp="ROOT"> webapp="ROOT">
<ccm:dependencies> <ccm:dependencies>

View File

@ -0,0 +1,38 @@
//
// Copyright (C) 2003-2004 Red Hat Inc. 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
//
// $Id: UserHomeFolderMap.pg.pdl 287 2008-12-24 00:29:02Z pboy $
// $DateTime: 2004/08/17 23:15:09 $
model com.arsdigita.cms;
import com.arsdigita.kernel.*;
// PostgreSQL 8.3 requires that user_id and section_id are INTEGER as in
// the referenced tables "content_sections" and "users". Without specification
// they are created as numeric here. Oracle doesn't seem to care about.
object type UserHomeFolderMap extends ACSObject {
BigDecimal userID = cms_user_home_folder_map.user_id INTEGER;
BigDecimal sectionID = cms_user_home_folder_map.section_id INTEGER;
Folder[1..1] homeFolder = join cms_user_home_folder_map.folder_id to cms_folders.folder_id;
ContentSection[1..1] homeSection = join cms_user_home_folder_map.section_id to content_sections.section_id;
User[1..1] homeFolderUser = join cms_user_home_folder_map.user_id to users.user_id;
reference key(cms_user_home_folder_map.map_id);
}

View File

@ -0,0 +1,7 @@
--
-- Peter Boy
-- nothing to do here (Oracle)

View File

@ -0,0 +1,30 @@
--
-- Copyright (C) 2008 Peter Boy 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
--
-- $Id: cms_user_home_folder_map.sql, 2008/12/25 12:09:59 pboy Exp $
-- $DateTime: 2004/08/17 23:15:09 $
-- in postgresql 8.3 a mixture of numeric and integer for reference keys
-- is no longer accepted-
ALTER TABLE cms_user_home_folder_map
ALTER COLUMN user_id TYPE INTEGER ,
ALTER COLUMN section_id TYPE INTEGER;

View File

@ -0,0 +1,25 @@
--
-- Copyright (C) 2007 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
--
-- $Id: oracle-se-6.5.2-6.5.3.sql 293 2005-02-22 15:10:39Z cgilbert $
-- $DateTime: 2004/08/16 18:10:38 $
PROMPT Red Hat Enterprise CMS 6.5.3 -> 6.5.4 Upgrade Script (Oracle)
-- do nothing - postgresql update only

View File

@ -0,0 +1,26 @@
--
-- Copyright (C) 2008 Peter Boy 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
--
-- $DateTime: 2004/08/17 23:15:09 $
\echo Red Hat Enterprise CMS 6.5.3 -> 6.5.4 Upgrade Script (PostgreSQL)
begin;
\i ../postgres/upgrade/6.5.3-6.5.4/cms_user_home_folder_map.sql
commit;

View File

@ -15,64 +15,63 @@ init com.arsdigita.cms.installer.xml.ContentTypeInitializer {
}; };
} }
// Test: temporarly deactivate publishToFile init com.arsdigita.cms.publishToFile.Initializer {
// init com.arsdigita.cms.publishToFile.Initializer { // List of publish destinations for content types
// // List of publish destinations for content types // Each element is a four-element list in the format
// // Each element is a four-element list in the format // '{ "content type", "root directory", "shared storage",
// // '{ "content type", "root directory", "shared storage", // "url stub" }'.
// // "url stub" }'. // "Content type" is the object type of the content type.
// // "Content type" is the object type of the content type. // "Root directory" must be a path to a writable directory, relative
// // "Root directory" must be a path to a writable directory, relative // to the file-system root. "Shared storage" must be _true_ if the root
// // to the file-system root. "Shared storage" must be _true_ if the root // directory is shared NFS storage, _false_ otherwise. "URL stub"
// // directory is shared NFS storage, _false_ otherwise. "URL stub" // must be the path component of the URL from which the live server
// // must be the path component of the URL from which the live server // will serve from this directory.
// // will serve from this directory. destination = {
// destination = { { "com.arsdigita.cms.ContentItem",
// { "com.arsdigita.cms.ContentItem", "data/p2fs",
// "data/p2fs", false,
// false, "/p2fs" },
// "/p2fs" }, { "com.arsdigita.cms.Template",
// { "com.arsdigita.cms.Template", "webapps/ROOT/packages/content-section/templates",
// "webapps/ROOT/packages/content-section/templates", false,
// false, "/templates" }
// "/templates" } };
// };
// // Class which implements PublishToFileListener used to perform
// // Class which implements PublishToFileListener used to perform // additional actions when publishing or unpublishing to the file system.
// // additional actions when publishing or unpublishing to the file system. publishListener = "com.arsdigita.cms.publishToFile.PublishToFile";
// publishListener = "com.arsdigita.cms.publishToFile.PublishToFile";
// // Queue management parameters.
// // Queue management parameters.
// // Set startupDelay to 0 to disable the processing of the queue
// // Set startupDelay to 0 to disable the processing of the queue // Time (seconds) before starting to monitor the
// // Time (seconds) before starting to monitor the // queue after a server start
// // queue after a server start startupDelay = 30;
// startupDelay = 30;
// // Time (in seconds) between checking if there are entries in the
// // Time (in seconds) between checking if there are entries in the // publishToFile queue.
// // publishToFile queue. // A value <= 0 disables processing the queue on this server.
// // A value <= 0 disables processing the queue on this server. pollDelay = 5;
// pollDelay = 5;
// // Time to wait (seconds) before retrying
// // Time to wait (seconds) before retrying // to process a failed entry
// // to process a failed entry retryDelay = 120;
// retryDelay = 120;
// // Number of queue entries to process at once.
// // Number of queue entries to process at once. blockSize = 40;
// blockSize = 40; // Number of times a failed queue entry will be
// // Number of times a failed queue entry will be // reprocessed. If processing has failed more than
// // reprocessed. If processing has failed more than // that number of times, the entry will be
// // that number of times, the entry will be // ignored.
// // ignored. maximumFailCount = 10;
// maximumFailCount = 10;
// // Method used to select entries for processing.
// // Method used to select entries for processing. // 'QueuedOrder'-in queued order.
// // 'QueuedOrder'-in queued order. // 'GroupByParent'-group entries according to parent when selecting items
// // 'GroupByParent'-group entries according to parent when selecting items // (allows optimizations if a listener task required for all elements in a folder
// // (allows optimizations if a listener task required for all elements in a folder // can be done only once for the folder).
// // can be done only once for the folder). blockSelectMethod = "GroupByParent";
// blockSelectMethod = "GroupByParent"; }
// }
init com.arsdigita.cms.installer.SectionInitializer { init com.arsdigita.cms.installer.SectionInitializer {