Nachtrag Upgrade Script zu ccm-ldn-types-contact.

git-svn-id: https://svn.libreccm.org/ccm/trunk@1641 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2012-05-04 11:37:19 +00:00
parent c4605f82fa
commit b45290cbed
6 changed files with 228 additions and 26 deletions

View File

@ -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;

View File

@ -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%';

View File

@ -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
@@ default/6.6.0-6.6.1/ren_contact_tables.sql
@@ default/6.6.0-6.6.1/upd_system_tables.sql

View File

@ -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;

View File

@ -4,30 +4,30 @@
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
<ctd:content-type
label="LDN Contact"
label="LDN Contact"
description="A London Contact person in CMS"
objectType="com.arsdigita.london.contenttypes.Contact"
classname="com.arsdigita.london.contenttypes.Contact">
objectType="com.arsdigita.london.contenttypes.Contact"
classname="com.arsdigita.london.contenttypes.Contact">
<ctd:authoring-kit createComponent="com.arsdigita.london.contenttypes.ui.ContactCreate">
<ctd:authoring-step
label="Contact Properties"
description="Edit the basic contact properties"
descriptionBundle="com.arsdigita.cms.contenttypes.ContactResources"
component="com.arsdigita.london.contenttypes.ui.ContactPropertiesStep"/>
label="Contact Properties"
description="Edit the basic contact properties"
descriptionBundle="com.arsdigita.london.contenttypes.ContactResources"
component="com.arsdigita.london.contenttypes.ui.ContactPropertiesStep"/>
<ctd:authoring-step
label="Contact Address Properties"
description="Edit the basic contact properties"
label="Contact Address Properties"
description="Edit the basic contact properties"
descriptionBundle="com.arsdigita.london.contenttypes.ContactResources"
component="com.arsdigita.london.contenttypes.ui.ContactAddressProperties"/>
component="com.arsdigita.london.contenttypes.ui.ContactAddressProperties"/>
<ctd:authoring-step
label="Contact Phones"
description="Edit the Phones associated with contact"
label="Contact Phones"
description="Edit the Phones associated with contact"
descriptionBundle="com.arsdigita.london.contenttypes.ContactResources"
component="com.arsdigita.london.contenttypes.ui.ContactPhonesPanel"/>
component="com.arsdigita.london.contenttypes.ui.ContactPhonesPanel"/>
</ctd:authoring-kit>
</ctd:content-type>

View File

@ -2,4 +2,7 @@
<version from="6.5.0" to="6.5.1">
<script sql="ccm-ldn-types-contact/upgrade/::database::-6.5.0-6.5.1.sql"/>
</version>
<version from="6.6.0" to="6.6.1">
<script sql="ccm-ldn-types-contact/upgrade/::database::-6.6.0-6.6.1.sql"/>
</version>
</upgrade>