diff --git a/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql b/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql new file mode 100644 index 000000000..0a37a2a4c --- /dev/null +++ b/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql @@ -0,0 +1,66 @@ +-- +-- Copyright (C) 2011 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: upd_system_tables.sql pboy $ + +-- adjust various system tables to the new name of application + +alter table init_requirements drop constraint init_requirements_init_f_cmmdn ; + +update inits + set class_name=replace(class_name,'london.portal', 'portalworkspace') + where class_name like '%london.portal%' ; + +update init_requirements + set init=replace(init,'london.portal', 'portalworkspace') + where init like '%london.portal%' ; + +update init_requirements + set required_init=replace(required_init,'london.portal', 'portalworkspace') + where required_init like '%london.portal%' ; + +ALTER TABLE ONLY init_requirements + ADD CONSTRAINT init_requirements_init_f_cmmdn FOREIGN KEY (init) + REFERENCES inits (class_name) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; + +ALTER TABLE init_requirements + ADD CONSTRAINT init_require_requ_init_f_i6rgg FOREIGN KEY (required_init) + REFERENCES inits (class_name) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; + + +update application_types + set object_type=replace(object_type,'london.portal', 'portalworkspace') + where object_type like '%london.portal%' ; + +-- table applications doesn't require an update + +update apm_package_types + set package_key=replace(package_key,'workspace', 'portalworkspace') + where package_key like 'workspace' ; + +-- table apm_packages doesn't require an update either +-- table site_nodes doesn't require an update either + + +-- update application type in acs_objects +update acs_objects + set (object_type,default_domain_class) = + (replace(object_type,'london.portal', 'portalworkspace') , + replace(default_domain_class,'london.portal', 'portalworkspace') ) + where object_type like '%london.portal%' ; diff --git a/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.3.0-6.3.1.sql b/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.3.0-6.3.1.sql deleted file mode 100755 index 82249885b..000000000 --- a/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/oracle-se-6.3.0-6.3.1.sql +++ /dev/null @@ -1,3 +0,0 @@ -@@ ../oracle-se/upgrade/add-workspace-themes.sql -@@ ../oracle-se/upgrade/add-workspace-owner.sql -@@ ../oracle-se/upgrade/add-workspace_workspace_map.sql diff --git a/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.6.0-6.6.1.sql b/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.6.0-6.6.1.sql index 4d8cb4749..91c103a1e 100755 --- a/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.6.0-6.6.1.sql +++ b/ccm-portalworkspace/sql/ccm-portalworkspace/upgrade/postgres-6.6.0-6.6.1.sql @@ -30,4 +30,6 @@ begin; \i default/6.6.0-6.6.1/add_constraints.sql +\i default/6.6.0-6.6.1/upd_system_tables.sql + commit;