From 43c87f5a6c0138ab2d496a06471abfa9b0ebd76d Mon Sep 17 00:00:00 2001 From: jensp Date: Tue, 12 Aug 2014 13:18:01 +0000 Subject: [PATCH] Part 1 of reanaming ccm-cms-types-organization to ccm-ldn-types-organization git-svn-id: https://svn.libreccm.org/ccm/trunk@2801 8810af33-2d31-482b-a856-94f89814c4df --- ccm-cms-types-organization/application.xml | 4 +- ...rganization.pdl => SimpleOrganization.pdl} | 12 ++-- .../6.6.0-6.6.1/rename_to_ldn_orga.sql | 68 +++++++++++++++++++ .../upgrade/oracle-se-6.6.0-6.6.1.sql | 21 ++++++ .../upgrade/postgres-6.6.0-6.6.1.sql | 26 +++++++ ...nfig => ccm-ldn-types-organization.config} | 0 ...n.load => ccm-ldn-types-organization.load} | 0 .../src/ccm-ldn-types-organization.upgrade | 7 ++ 8 files changed, 130 insertions(+), 8 deletions(-) rename ccm-cms-types-organization/pdl/com/arsdigita/content-types/{Organization.pdl => SimpleOrganization.pdl} (70%) create mode 100644 ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/default/6.6.0-6.6.1/rename_to_ldn_orga.sql create mode 100644 ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/oracle-se-6.6.0-6.6.1.sql create mode 100644 ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/postgres-6.6.0-6.6.1.sql rename ccm-cms-types-organization/src/{ccm-cms-types-organization.config => ccm-ldn-types-organization.config} (100%) rename ccm-cms-types-organization/src/{ccm-cms-types-organization.load => ccm-ldn-types-organization.load} (100%) create mode 100644 ccm-cms-types-organization/src/ccm-ldn-types-organization.upgrade diff --git a/ccm-cms-types-organization/application.xml b/ccm-cms-types-organization/application.xml index 64507a2f3..7a23d238d 100755 --- a/ccm-cms-types-organization/application.xml +++ b/ccm-cms-types-organization/application.xml @@ -1,8 +1,8 @@ diff --git a/ccm-cms-types-organization/pdl/com/arsdigita/content-types/Organization.pdl b/ccm-cms-types-organization/pdl/com/arsdigita/content-types/SimpleOrganization.pdl similarity index 70% rename from ccm-cms-types-organization/pdl/com/arsdigita/content-types/Organization.pdl rename to ccm-cms-types-organization/pdl/com/arsdigita/content-types/SimpleOrganization.pdl index e33b264a0..78a7e8efc 100755 --- a/ccm-cms-types-organization/pdl/com/arsdigita/content-types/Organization.pdl +++ b/ccm-cms-types-organization/pdl/com/arsdigita/content-types/SimpleOrganization.pdl @@ -21,12 +21,12 @@ model com.arsdigita.cms.contenttypes; import com.arsdigita.cms.*; -object type Organization extends ContentPage { - String [0..1] link = ct_organization.link VARCHAR(1000); - String [0..1] contact = ct_organization.contact VARCHAR(2000); +object type SimpleOrganization extends ContentPage { + String [0..1] link = ct_ldn_organization.link VARCHAR(1000); + String [0..1] contact = ct_ldn_organization.contact VARCHAR(2000); -// BigDecimal[0..1] imageID = ct_organization.image_id; - composite ImageAsset[0..1] image = join ct_organization.image_id to cms_images.image_id; +// BigDecimal[0..1] imageID = ct_ldn_organization.image_id; + composite ImageAsset[0..1] image = join ct_ldn_organization.image_id to cms_images.image_id; - reference key (ct_organization.organization_item_id); + reference key (ct_ldn_organization.organization_item_id); } diff --git a/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/default/6.6.0-6.6.1/rename_to_ldn_orga.sql b/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/default/6.6.0-6.6.1/rename_to_ldn_orga.sql new file mode 100644 index 000000000..cb5288319 --- /dev/null +++ b/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/default/6.6.0-6.6.1/rename_to_ldn_orga.sql @@ -0,0 +1,68 @@ +-- +-- 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 +-- + +-- Rename table to ct_ldn_organization to avoid name collision + +ALTER TABLE init_requirements DROP CONSTRAINT init_requirements_init_f_cmmdn ; + +UPDATE inits + SET classname='com.arsdigita.cms.contenttypes.ldn.Organization' + WHERE classname='com.arsdigita.cms.contenttypes.Organization' + +update init_requirements + set init='com.arsdigita.cms.contenttypes.ldn.SimpleAddressInitializer' + where init='com.arsdigita.cms.contenttypes.AddressInitializer' ; + +ALTER TABLE 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; + +UPDATE content_types + SET object_type='com.arsdigita.cms.contenttypes.ldn.Organization', + classname='com.arsdigita.cms.contenttypes.ldn.Organization' + WHERE classname='com.arsdigita.cms.contenttypes.Organization'; + +UPDATE authoring_steps + SET label_bundle='com.arsdigita.cms.contenttypes.ldn.OrganizationResources', + description_bundle='com.arsdigita.cms.contenttypes.ldn.OrganizationResources', + component='com.arsdigita.cms.contenttypes.ldn.ui.OrganizationPropertiesStep' + WHERE component='com.arsdigita.cms.contenttypes.ui.OrganizationPropertiesStep' + +UPDATE acs_objects + SET (object_type,default_domain_class) = + ('com.arsdigita.cms.contenttypes.ldn.Organization', + 'com.arsdigita.cms.contenttypes.ldn.Organization') + WHERE default_domain_class = 'com.arsdigita.cms.contenttypes.Organization'; + +UPDATE lucene_docs + SET type='com.arsdigita.cms.contenttypes.ldn.Organization' + WHERE type='com.arsdigita.cms.contenttypes.Organization'; + +UPDATE vcx_generic_operations +SET value=REPLACE(value,'contenttypes.Organization', 'contenttypes.ldn.Organization') +WHERE value LIKE '%contenttypes.Organization%'; + +UPDATE vcx_obj_changes +SET obj_id=REPLACE(obj_id,'contenttypes.Organization', 'contenttypes.ldn.Organization') + WHERE obj_id LIKE '%contenttypes.Organization%'; + +UPDATE vcx_tags + SET tagged_oid=REPLACE(tagged_oid,'contenttypes.Organization', 'contenttypes.ldn.Organization') + WHERE tagged_oid LIKE '%contenttypes.Organization%'; + + +ALTER TABLE ct_organization to ct_ldn_organization; \ No newline at end of file diff --git a/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/oracle-se-6.6.0-6.6.1.sql b/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/oracle-se-6.6.0-6.6.1.sql new file mode 100644 index 000000000..8da4cf08c --- /dev/null +++ b/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/oracle-se-6.6.0-6.6.1.sql @@ -0,0 +1,21 @@ +-- +-- Copyright (C) 2014 Jens Pelzetter 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 +-- + +PROMPT "APLAWS+ CT Organization 6.6.0 -> 6.6.1 Upgrade Script (Oracle)" + +@@ default/6.6.0-6.6.1/rename_to_ldn_orga.sql \ No newline at end of file diff --git a/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/postgres-6.6.0-6.6.1.sql b/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/postgres-6.6.0-6.6.1.sql new file mode 100644 index 000000000..859f69dcb --- /dev/null +++ b/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/postgres-6.6.0-6.6.1.sql @@ -0,0 +1,26 @@ +-- +-- Copyright (C) 2014 Jens Pelzetter 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: postgres-6.6.0-6.6.1.sql 293 2011-01-07 15:10:39Z pboy $ + +\echo APLAWS+ CT Organization 6.6.0 -> 6.6.1 Upgrade Script (PostgreSQL) + +begin; + +\i default/6.6.0-6.6.1/rename_to_ldn_orga.sql + +commit; diff --git a/ccm-cms-types-organization/src/ccm-cms-types-organization.config b/ccm-cms-types-organization/src/ccm-ldn-types-organization.config similarity index 100% rename from ccm-cms-types-organization/src/ccm-cms-types-organization.config rename to ccm-cms-types-organization/src/ccm-ldn-types-organization.config diff --git a/ccm-cms-types-organization/src/ccm-cms-types-organization.load b/ccm-cms-types-organization/src/ccm-ldn-types-organization.load similarity index 100% rename from ccm-cms-types-organization/src/ccm-cms-types-organization.load rename to ccm-cms-types-organization/src/ccm-ldn-types-organization.load diff --git a/ccm-cms-types-organization/src/ccm-ldn-types-organization.upgrade b/ccm-cms-types-organization/src/ccm-ldn-types-organization.upgrade new file mode 100644 index 000000000..9521045d2 --- /dev/null +++ b/ccm-cms-types-organization/src/ccm-ldn-types-organization.upgrade @@ -0,0 +1,7 @@ + + + +