diff --git a/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/default/6.6.0-6.6.1/ren_contact_tables.sql b/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/default/6.6.0-6.6.1/ren_contact_tables.sql new file mode 100644 index 000000000..bff428656 --- /dev/null +++ b/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/default/6.6.0-6.6.1/ren_contact_tables.sql @@ -0,0 +1,94 @@ +-- +-- Copyright (C) 2012 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: ren_domainprovider_table.sql pboy $ + +-- rename ct_contact_* tables to ct_ldn_contact_* tables following +-- ccm naming conventions to make maintenance tasks easier + + +-- if we could figure out the old names we could rename constraints too +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + +alter table ct_contacts RENAME TO ct_ldn_contacts ; + +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + + +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + +alter table ct_contact_address RENAME TO ct_ldn_contact_address ; + +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_p_y5yhy PRIMARY KEY (address_id) ; +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_f_bfcho FOREIGN KEY (address_id) +-- REFERENCES cms_items (item_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; + + +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + +alter table ct_contact_phones RENAME TO ct_ldn_contact_phones ; + +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_p_y5yhy PRIMARY KEY (address_id) ; +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_f_bfcho FOREIGN KEY (address_id) +-- REFERENCES cms_items (item_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; + + +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + +alter table ct_contact_types RENAME TO ct_ldn_contact_types ; + +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_p_y5yhy PRIMARY KEY (address_id) ; +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_f_bfcho FOREIGN KEY (address_id) +-- REFERENCES cms_items (item_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; + + +alter table contact_content_item_map drop constraint cont_con_ite_map_ite_i_p_scqe9 ; +alter table contact_content_item_map drop constraint cont_con_ite_map_con_i_f_lanid ; +alter table contact_content_item_map drop constraint cont_con_ite_map_ite_i_f_fr0po ; + +alter table contact_content_item_map RENAME TO ct_ldn_contact_content_item_map ; + +alter table ct_ldn_contact_content_item_map + add constraint ct_ldn_con_con_ite_map_p_nannu PRIMARY KEY(item_id) ; +alter table ct_ldn_contact_content_item_map + add constraint ct_ldn_con_con_ite_map_f_g9mgi foreign key (contact_id) + references ct_ldn_contacts (contact_id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; +alter table ct_ldn_contact_content_item_map + add constraint ct_ldn_con_con_ite_map_f_a0qiy foreign key (item_id) + references cms_items(item_id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; + diff --git a/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql b/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql new file mode 100644 index 000000000..221158b33 --- /dev/null +++ b/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/default/6.6.0-6.6.1/upd_system_tables.sql @@ -0,0 +1,97 @@ +-- +-- Copyright (C) 2012 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 $ + +-- rename ccm-cms-types-contact to ccm-ldn-types-contact +-- adjust various system tables to the new name of content type + +alter table init_requirements drop constraint init_requirements_init_f_cmmdn ; +alter table init_requirements drop constraint init_require_requ_init_f_i6rgg ; + +update inits + set class_name='com.arsdigita.london.contenttypes.ContactInitializer' + where class_name='com.arsdigita.cms.contenttypes.ContactInitializer' ; + +update init_requirements + set init='com.arsdigita.london.contenttypes.ContactInitializer' + where init='com.arsdigita.cms.contenttypes.ContactInitializer' ; + +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; +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 content_types + set object_type='com.arsdigita.london.contenttypes.Contact', + label='LDN Contact', + description='A London Contact person in CMS', + classname='com.arsdigita.london.contenttypes.Contact' + where classname='com.arsdigita.cms.contenttypes.Contact' ; + +update authoring_steps + set label_key='Contact Properties', + label_bundle='com.arsdigita.london.contenttypes.ContactResources', + description_key='Edit the basic contact properties', + description_bundle='com.arsdigita.london.contenttypes.ContactResources', + component='com.arsdigita.london.contenttypes.ui.ContactPropertiesStep' + where component='com.arsdigita.cms.contenttypes.ui.ContactPropertiesStep' ; + +update authoring_steps + set label_key='Contact Address Properties', + label_bundle='com.arsdigita.london.contenttypes.ContactResources', + description_key='Edit the Address associated with contact', + description_bundle='com.arsdigita.london.contenttypes.ContactResources', + component='com.arsdigita.london.contenttypes.ui.ContactAddressProperties' + where component='com.arsdigita.cms.contenttypes.ui.ContactAddressProperties' ; + +update authoring_steps + set label_key='Contact Phones Properties', + label_bundle='com.arsdigita.london.contenttypes.ContactResources', + description_key='Edit the Phones associated with contact', + description_bundle='com.arsdigita.london.contenttypes.ContactResources', + component='com.arsdigita.london.contenttypes.ui.ContactPhonesPanel' + where component='com.arsdigita.cms.contenttypes.ui.ContactPhonesPanel' ; + + +update acs_objects + set (object_type,default_domain_class) = + ('com.arsdigita.london.contenttypes.Contact' , + 'com.arsdigita.london.contenttypes.Contact' ) + where default_domain_class like 'com.arsdigita.cms.contenttypes.Contact' ; + +update lucene_docs + set type='com.arsdigita.london.contenttypes.Contact' + where type='com.arsdigita.cms.contenttypes.Contact' ; + +update vcx_generic_operations + set value=replace(value,'cms.contenttypes.Contact', 'london.contenttypes.Contact') + where value like '%cms.contenttypes.Contact%'; + +update vcx_obj_changes + set obj_id=replace(obj_id,'cms.contenttypes.Contact', 'london.contenttypes.Contact') + where obj_id like '%cms.contenttypes.Contact%'; + +update vcx_tags + set tagged_oid=replace(tagged_oid,'cms.contenttypes.Contact', 'london.contenttypes.Contact') + where tagged_oid like '%cms.contenttypes.Contact%'; + diff --git a/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/oracle-se-6.6.0-6.6.1.sql b/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/oracle-se-6.6.0-6.6.1.sql index 31b94438a..b3dceab2c 100644 --- a/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/oracle-se-6.6.0-6.6.1.sql +++ b/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/oracle-se-6.6.0-6.6.1.sql @@ -1,5 +1,5 @@ -- --- Copyright (C) 2007 Magpie. All Rights Reserved. +-- Copyright (C) 2012 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 @@ -15,5 +15,7 @@ -- 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.6.0-6.6.1.sql pboy $ -@@ default/6.5.0-6.5.1/contact_content_item_map_table.sql \ No newline at end of file +@@ default/6.6.0-6.6.1/ren_contact_tables.sql +@@ default/6.6.0-6.6.1/upd_system_tables.sql diff --git a/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/postgres-6.6.0-6.6.1.sql b/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/postgres-6.6.0-6.6.1.sql index e32f32d65..628664048 100644 --- a/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/postgres-6.6.0-6.6.1.sql +++ b/ccm-ldn-types-contact/sql/ccm-ldn-types-contact/upgrade/postgres-6.6.0-6.6.1.sql @@ -1,21 +1,27 @@ -- --- Copyright (C) 2007 Magpie. All Rights Reserved. +-- Copyright (C) 2012 Peter Boy All Rights Reserved. -- --- The contents of this file are subject to the CCM Public --- License (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.redhat.com/licenses/ccmpl.html. +-- 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. -- --- Software distributed under the License is distributed on an --- "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express --- or implied. See the License for the specific language governing --- rights and limitations under the License. +-- 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 pboy $ -\echo Red Hat Enterprise CMS 6.5.0 -> 6.5.1 Upgrade Script (PostgreSQL) +\echo APLAWS ldn contact 6.6.0 -> 6.6.1 Upgrade Script (PostgreSQL) begin; -\i default/6.5.0-6.5.1/contact_content_item_map_table.sql +\i default/6.6.0-6.6.1/ren_contact_tables.sql +\i default/6.6.0-6.6.1/upd_system_tables.sql commit; diff --git a/ccm-ldn-types-contact/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/Contact.xml b/ccm-ldn-types-contact/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/Contact.xml index 144cf7444..ef021de41 100755 --- a/ccm-ldn-types-contact/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/Contact.xml +++ b/ccm-ldn-types-contact/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/Contact.xml @@ -4,30 +4,30 @@ xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> + objectType="com.arsdigita.london.contenttypes.Contact" + classname="com.arsdigita.london.contenttypes.Contact"> + label="Contact Properties" + description="Edit the basic contact properties" + descriptionBundle="com.arsdigita.london.contenttypes.ContactResources" + component="com.arsdigita.london.contenttypes.ui.ContactPropertiesStep"/> + component="com.arsdigita.london.contenttypes.ui.ContactAddressProperties"/> + component="com.arsdigita.london.contenttypes.ui.ContactPhonesPanel"/> diff --git a/ccm-ldn-types-contact/src/ccm-ldn-types-contact.upgrade b/ccm-ldn-types-contact/src/ccm-ldn-types-contact.upgrade index ea7a901b2..c6630a3f3 100644 --- a/ccm-ldn-types-contact/src/ccm-ldn-types-contact.upgrade +++ b/ccm-ldn-types-contact/src/ccm-ldn-types-contact.upgrade @@ -2,4 +2,7 @@