Update script f. ccm-cms-types-simpleaddress ergänzt. Update from version 6.6.0 to-version 6.6.1

git-svn-id: https://svn.libreccm.org/ccm/trunk@799 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2011-03-27 08:58:09 +00:00
parent e65baec411
commit 54cc24ca81
7 changed files with 204 additions and 2 deletions

View File

@ -0,0 +1,20 @@
--
-- 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: drop_constraints_ct_addresses.sql pboy $
alter table ct_addresses drop constraint ct_addresse_address_id_p_y1u3b;
alter table ct_addresses drop constraint ct_addre_iso_coun_code_f_o8h8a ;
alter table ct_addresses drop constraint ct_addresse_address_id_f__qv8u ;

View File

@ -0,0 +1,72 @@
--
-- 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 content type
alter table init_requirements drop constraint init_requirements_init_f_cmmdn ;
update inits
set class_name='com.arsdigita.cms.contenttypes.SimpleAddressInitializer'
where class_name='com.arsdigita.cms.contenttypes.AddressInitializer' ;
update init_requirements
set init='com.arsdigita.cms.contenttypes.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.SimpleAddress',
label='Simple Address',
classname='com.arsdigita.cms.contenttypes.SimpleAddress'
where classname='com.arsdigita.cms.contenttypes.Address' ;
update authoring_steps
set label_key='simpleaddress.authoring.basic_properties.title',
label_bundle='com.arsdigita.cms.contenttypes.SimpleAddressResources',
description_key='simpleaddress.authoring.basic_properties.description',
description_bundle='com.arsdigita.cms.contenttypes.SimpleAddressResources',
component='com.arsdigita.cms.contenttypes.ui.SimpleAddressPropertiesStep'
where component='com.arsdigita.cms.contenttypes.ui.AddressPropertiesStep' ;
update acs_objects
set (object_type,default_domain_class) =
('com.arsdigita.cms.contenttypes.SimpleAddress' ,
'com.arsdigita.cms.contenttypes.SimpleAddress' )
where default_domain_class like 'com.arsdigita.cms.contenttypes.Address' ;
update lucene_docs
set type='com.arsdigita.cms.contenttypes.SimpleAddress'
where type='com.arsdigita.cms.contenttypes.Address' ;
update vcx_generic_operations
set value=replace(value,'contenttypes.Address', 'contenttypes.SimpleAddress')
where value like '%contenttypes.Address%';
update vcx_obj_changes
set obj_id=replace(obj_id,'contenttypes.Address', 'contenttypes.SimpleAddress')
where obj_id like '%contenttypes.Address%';
update vcx_tags
set tagged_oid=replace(tagged_oid,'contenttypes.Address', 'contenttypes.SimpleAddress')
where tagged_oid like '%contenttypes.Address%';

View File

@ -0,0 +1,31 @@
--
-- 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_table_ct_addresses.sql pboy $
alter table ct_addresses rename to ct_simpleaddr_addresses ;
ALTER TABLE ct_simpleaddr_addresses
ADD CONSTRAINT ct_simple_addre_add_id_p_gf2ww PRIMARY KEY(address_id);
ALTER TABLE ct_simpleaddr_addresses
ADD CONSTRAINT ct_sim_add_iso_cou_cod_f_7mojx FOREIGN KEY (iso_country_code)
REFERENCES ct_simpleaddr_iso_countries (iso_code) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION;
ALTER TABLE ct_simpleaddr_addresses
ADD CONSTRAINT ct_simple_addre_add_id_f_nrh2p FOREIGN KEY (address_id)
REFERENCES cms_pages (item_id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION;

View File

@ -0,0 +1,23 @@
--
-- 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_table_iso_countries.sql pboy $
alter table iso_countries drop constraint iso_countries_iso_code_p_zzr8y ;
alter table iso_countries rename to ct_simpleaddr_iso_countries ;
ALTER TABLE ct_simpleaddr_iso_countries
ADD CONSTRAINT ct_sim_iso_cou_iso_cod_p_kvyqe PRIMARY KEY(iso_code);

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
--
-- $Id: oracle-se-6.6.0-6.6.1.sql 293 2011-01-07 15:10:39Z pboy $
PROMPT Red Hat Enterprise types-addresses 6.6.0 -> 6.6.1 Upgrade Script (Oracle)
@@ ../default/upgrade/6.6.0-6.6.1/drop_constraints_ct_addresses.sql
@@ ../default/upgrade/6.6.0-6.6.1/upd_table_iso_countries.sql
@@ ../default/upgrade/6.6.0-6.6.1//upd_table_ct_addresses.sql
@@ ../default/upgrade/6.6.0-6.6.1//upd_system_tables.sql

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
--
-- $DateTime: 2010/11/10 23:15:09 $
\echo Red Hat Enterprise types-address 6.6.0 -> 6.6.1 Upgrade Script (PostgreSQL)
begin;
\i ../default/upgrade/6.6.0-6.6.1/drop_constraints_ct_addresses.sql
\i ../default/upgrade/6.6.0-6.6.1/upd_table_iso_countries.sql
\i ../default/upgrade/6.6.0-6.6.1/upd_table_ct_addresses.sql
\i ../default/upgrade/6.6.0-6.6.1/upd_system_tables.sql
commit;

View File

@ -33,9 +33,9 @@ public class SimpleAddressConfig extends AbstractConfig {
private static SimpleAddressConfig s_conf;
/**
* Gain a UIConfig object.
* Gain a SimpleAddressConfig object.
*
* Singelton pattern, don't instantiate a lifecacle object using the
* Singelton pattern, don't instantiate a config object using the
* constructor directly!
* @return
*/