diff --git a/ccm-cms-publicpersonalprofile/sql/ccm-cms-publicpersonalprofile/postgres/upgrade/6.6.5-6.6.6/ren_tables_cms_publicpersonalprofile.sql b/ccm-cms-publicpersonalprofile/sql/ccm-cms-publicpersonalprofile/postgres/upgrade/6.6.5-6.6.6/ren_tables_cms_publicpersonalprofile.sql
index c396b9e5b..1446ae548 100644
--- a/ccm-cms-publicpersonalprofile/sql/ccm-cms-publicpersonalprofile/postgres/upgrade/6.6.5-6.6.6/ren_tables_cms_publicpersonalprofile.sql
+++ b/ccm-cms-publicpersonalprofile/sql/ccm-cms-publicpersonalprofile/postgres/upgrade/6.6.5-6.6.6/ren_tables_cms_publicpersonalprofile.sql
@@ -29,20 +29,76 @@
-- * (6.6.7-6.6.8/add_personsstr_column.sql)
--- Difficult to recreate constraints, leave it as is
--- ALTER TABLE ct_public_personal_profiles
--- DROP CONSTRAINT cms_organiz_organiz_id_p_kk8qt;
-
+-- Drop contraints with old names
ALTER TABLE ct_public_personal_profiles
- RENAME TO ct_ppp ;
+ DROP CONSTRAINT ct_pub_per_prof_pro_id_p__8_1d;
+
+ALTER TABLE ct_public_personal_profile
+ DROP CONSTRAINT ct_pub_per_prof_pro_id_f_4akoj
ALTER TABLE ct_public_personal_profiles_bundles
- RENAME TO ct_ppp_bundles ;
+ DROP CONSTRAINT ct_pub_per_pro_bun_bun_p_zhc9i;
+
+ALTER TABLE ct_public_personal_profiles_bundles
+ DROP CONSTRAINT ct_pub_per_pro_bun_bun_f__jr2_;
ALTER TABLE ct_public_personal_profiles_owner_map
- RENAME TO ct_ppp_owner_map ;
+ DROP CONSTRAINT ct_pub_per_pro_own_map_p_rr7ie;
+
+ALTER TABLE ct_public_personal_profiles_owner_map
+ DROP CONSTRAINT ct_pub_per_pro_own_map_f_cd7_1;
+
+ALTER TABLE ct_public_personal_profiles_owner_map
+ DROP CONSTRAINT ct_pub_per_pro_own_map_f_ugs15;
ALTER TABLE ct_public_personal_profiles_nav_items
- RENAME TO ct_ppp_nav_items ;
+ DROP CONSTRAINT ct_pub_per_pro_nav_ite_p_ijb6c;
+ALTER TABLE ct_public_personal_profiles_nav_items
+ DROP CONSTRAINT ct_pub_per_pro_nav_ite_u_cqkdo;
+-- Rename tables
+ALTER TABLE ct_public_personal_profiles
+ RENAME TO ct_ppp ;
+
+ALTER TABLE ct_public_personal_profiles_bundles
+ RENAME TO ct_ppp_bundles ;
+
+ALTER TABLE ct_public_personal_profiles_owner_map
+ RENAME TO ct_ppp_owner_map ;
+
+ALTER TABLE ct_public_personal_profiles_nav_items
+ RENAME TO ct_ppp_nav_items ;
+
+-- Recreate contstraints with new names (copied from generated DDL files)
+ALTER TABLE ct_ppp
+ ADD CONSTRAINT ct_ppp_profile_id_p_ejt_j PRIMARY KEY (profile_id);
+
+ALTER TABLE ct_ppp
+ ADD CONSTRAINT ct_ppp_profile_id_f_7znuj
+ FOREIGN KEY (profile_id)REFERENCES cms_pages(item_id);
+
+ALTER TABLE ct_ppp_bundles
+ ADD CONSTRAINT ct_ppp_bundle_bundl_id_p_eeszn PRIMARY KEY(bundle_id);
+
+ALTER TABLE ct_ppp_bundles
+ ADD CONSTRAINT ct_ppp_bundle_bundl_id_f_1u4im
+ FOREIGN KEY (bundle_id) REFERENCES cms_bundles(bundle_id);
+
+ALTER TABLE ct_ppp_onwer_map
+ ADD CONSTRAINT ct_ppp_own_map_own_id__p_rqs7q
+ PRIMARY KEY(owner_id, profile_id);
+
+ALTER TABLE ct_ppp_owner_map
+ ADD CONSTRAINT ct_ppp_own_map_owne_id_f_ouqqr
+ FOREIGN KEY (owner_id) REFERENCES cms_person_bundles(bundle_id);
+
+ALTER TABLE ct_ppp_owner_map
+ ADD CONSTRAINT ct_ppp_own_map_prof_id_f_tnfpj
+ FOREIGN KEY (profile_id) REFERENCES ct_ppp_bundles(bundle_id);
+
+ALTER TABLE ct_ppp_nav_items
+ ADD CONSTRAINT ct_ppp_nav_ite_obje_id_p_r7ipd PRIMARY KEY(object_id)
+
+ALTER TABLE ct_ppp_nav_items
+ ADD CONSTRAINT CONSTRAINT ct_ppp_nav_ite_key_lab_u_ecekv UNIQUE("key", lang, label)
\ No newline at end of file
diff --git a/ccm-cms-publicpersonalprofile/sql/ccm-cms-publicpersonalprofile/upgrade/postgres-6.6.5-6.6.6.sql b/ccm-cms-publicpersonalprofile/sql/ccm-cms-publicpersonalprofile/upgrade/postgres-6.6.5-6.6.6.sql
index c039d1c6b..011b216ea 100644
--- a/ccm-cms-publicpersonalprofile/sql/ccm-cms-publicpersonalprofile/upgrade/postgres-6.6.5-6.6.6.sql
+++ b/ccm-cms-publicpersonalprofile/sql/ccm-cms-publicpersonalprofile/upgrade/postgres-6.6.5-6.6.6.sql
@@ -28,7 +28,7 @@
-- Don't use for the APLAWS tree. APLAWS is updated from 1.0.4
-- directly to 2.3.x (6.6.12)!
-\echo LibreCCM PublicPersonalProfile 6.6.4 -> 6.6.5 Upgrade Script (PostgreSQL)
+\echo LibreCCM PublicPersonalProfile 6.6.5 -> 6.6.6 Upgrade Script (PostgreSQL)
begin;
diff --git a/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/postgres-6.6.0-6.6.1.sql b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/postgres-6.6.0-6.6.1.sql
index 3e4536df0..754b429b3 100644
--- a/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/postgres-6.6.0-6.6.1.sql
+++ b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/postgres-6.6.0-6.6.1.sql
@@ -25,11 +25,9 @@
-- --> ct_decisiontree_section_opts.option_id
-- * ct_decisiontree_section_options.option_id
-- --> ct_decisiontree_section_opts.option_id
--- Actually no update script is provided because no installation should use
--- this content type yet, all changes are prerelease.
--- begin;
+begin;
--- \i postgres/6.6.0-6.6.1/upd_decisiontree_tables.sql
+\i postgres/6.6.0-6.6.1/upd_decisiontree_tables.sql
--- commit;
+commit;
diff --git a/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/postgres/6.6.0-6.6.1/upd_decisiontree_tables.sql b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/postgres/6.6.0-6.6.1/upd_decisiontree_tables.sql
new file mode 100644
index 000000000..f537d4b9c
--- /dev/null
+++ b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/postgres/6.6.0-6.6.1/upd_decisiontree_tables.sql
@@ -0,0 +1,40 @@
+--
+-- 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
+--
+
+ALTER TABLE ONLY ct_decisiontree_section_options
+ DROP CONSTRAINT ct_deci_sec_opt_opt_id_p_0p52e;
+
+ALTER TABLE ONLY ct_decisiontree_section_options
+ DROP CONSTRAINT ct_deci_sec_opt_opt_id_f_ysyhm;
+
+ALTER TABLE ONLY ct_decisiontree_section_options
+ DROP CONSTRAINT ct_deci_sec_opt_sec_id_f_129bc;
+
+ALTER TABLE ONLY ct_decisiontree_section_options
+ RENAME TO ct_decisiontree_section_opts;
+
+ALTER TABLE ct_decisiontree_section_opts
+ ADD CONSTRAINT ct_deci_sec_opt_opt_id_p_5od37 PRIMARY KEY (option_id)
+
+ALTER TABLE ct_decisiontree_section_opts
+ ADD CONSTRAINT ct_deci_sec_opt_opt_id_f_hb7ct
+ FOREIGN KEY (option_id) REFERENCES cms_items(item_id);
+
+ALTER TABLE ct_decisiontree_section_opts
+ ADD CONSTRAINT ct_deci_sec_opt_sec_id_f_fczee
+ FOREIGN KEY (section_id) REFERENCES ct_decisiontree_sections(section_id);
diff --git a/ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.upgrade b/ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.upgrade
index 0bea21e0b..88cef883a 100644
--- a/ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.upgrade
+++ b/ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.upgrade
@@ -1,7 +1,14 @@
-
-
-
+
+
+
+
+
+
+
diff --git a/ccm-cms/sql/ccm-cms/default/upgrade/6.6.5-6.6.6/remove_legacy_entries.sql b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.5-6.6.6/remove_legacy_entries.sql
index 494cf47dd..16f2d8562 100644
--- a/ccm-cms/sql/ccm-cms/default/upgrade/6.6.5-6.6.6/remove_legacy_entries.sql
+++ b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.5-6.6.6/remove_legacy_entries.sql
@@ -35,7 +35,10 @@ delete from object_context
);
-- delete from acs_objects all entries referring to node_id in site_nodes
-alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
+-- no necssary for upgrading a 1.0.4 installation to 2.x.y because site_nodes will be removed
+-- completly in the process and the constraint is removed earlier in the process by
+-- ccm-themedirector-6.6.1-6.6.2
+-- alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
delete from acs_objects
where object_id in
@@ -55,9 +58,10 @@ delete from site_nodes
where object_type
like '%cms.ContentSection%')
);
-alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
- FOREIGN KEY (node_id)
- REFERENCES acs_objects (object_id);
+-- No needed anymore, see above and ccm-themedirector-6.6.1-6.6.2
+-- alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
+-- FOREIGN KEY (node_id)
+-- REFERENCES acs_objects (object_id);
diff --git a/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.11-6.6.12/ren_tables_cms_organisation.sql b/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.11-6.6.12/ren_tables_cms_organisation.sql
index b17201ee3..b6927fbc2 100644
--- a/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.11-6.6.12/ren_tables_cms_organisation.sql
+++ b/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.11-6.6.12/ren_tables_cms_organisation.sql
@@ -27,119 +27,93 @@
-- * 6.6.3-6.6.4/create_orgaunit_hierarchy_table.sql
-- * 6.6.4-6.6.5/create_orgaunit_bundle.sql
-- * (6.6.7-6.6.8/add_personsstr_column.sql)
+--
+-- We rename also the constraint where possible. We can't rename the primary key constraint of
+-- cms_organizationalunits/cms_orgaunits table
+-- (old name: cms_organiz_organiz_id_p_kk8qt, new name: cms_orgauni_orgauni_id_p_ycjef) because
+-- some other modules which provide content types which extending GenericOrganizatialUnit are
+-- depending on this constraint.
-ALTER TABLE cms_organizationalunits
- DROP CONSTRAINT cms_organiz_organiz_id_p_kk8qt;
+
+-- ALTER TABLE cms_organizationalunits
+-- DROP CONSTRAINT cms_organiz_organiz_id_p_kk8qt;
+
+ALTER TABLE cms_organizationalunits
+ DROP CONSTRAINT cms_organiz_organiz_id_f_ubliq;
ALTER TABLE cms_organizationalunits_contact_map
- DROP CONSTRAINT cms_org_con_map_con_id_p_1rc4y;
+ DROP CONSTRAINT cms_org_con_map_con_id_p_1rc4y;
ALTER TABLE cms_organizationalunits_person_map
- DROP CONSTRAINT cms_org_per_map_org_id_p_km6_m;
+ DROP CONSTRAINT cms_org_per_map_org_id_p_km6_m;
ALTER TABLE cms_organizationalunits_hierarchy_map
- DROP CONSTRAINT cms_org_hie_map_sub_or_p_nykpq;
+ DROP CONSTRAINT cms_org_hie_map_sub_or_p_nykpq;
ALTER TABLE cms_organizationalunits
- RENAME TO cms_orgaunits ;
+ RENAME TO cms_orgaunits ;
+
ALTER TABLE cms_orgaunits
- RENAME column organizationalunit_id TO orgaunit_id ;
+ RENAME column organizationalunit_id TO orgaunit_id ;
ALTER TABLE cms_organizationalunits_contact_map
- RENAME TO cms_orgaunits_contact_map ;
+ RENAME TO cms_orgaunits_contact_map ;
+
ALTER TABLE cms_orgaunits_contact_map
- RENAME column organizationalunit_id TO orgaunit_id ;
+ RENAME column organizationalunit_id TO orgaunit_id ;
ALTER TABLE cms_organizationalunits_person_map
- RENAME TO cms_orgaunits_person_map ;
+ RENAME TO cms_orgaunits_person_map ;
+
ALTER TABLE cms_orgaunits_person_map
- RENAME column organizationalunit_id TO orgaunit_id ;
+ RENAME column organizationalunit_id TO orgaunit_id ;
ALTER TABLE cms_organizationalunits_hierarchy_map
- RENAME TO cms_orgaunits_hierarchy_map ;
-
--- create table cms_orgaunits (
--- orgaunit_id integer NOT NULL,
--- addendum character varying(512)
--- );
-
--- create table cms_orgaunits_contact_map (
--- orgaunit_id integer NOT NULL,
--- contact_id integer NOT NULL,
--- contact_type character varying(100),
--- map_order integer
--- );
-
--- create table cms_orgaunits_person_map (
--- orgaunit_id integer NOT NULL,
--- person_id integer NOT NULL,
--- role_name character varying(100),
--- status character varying(100)
--- );
-
--- CREATE TABLE cms_orgaunits_hierarchy_map (
--- superior_orgaunit_id integer NOT NULL,
--- subordinate_orgaunit_id integer NOT NULL,
--- assoc_type character varying(128),
--- superior_orgaunit_order integer,
--- subordinate_orgaunit_order integer
--- );
+ RENAME TO cms_orgaunits_hierarchy_map ;
ALTER TABLE ONLY cms_orgaunits_contact_map
- ADD CONSTRAINT cms_org_con_map_con_id_p_1rc4y
- -- PRIMARY KEY (contact_id, orgaunit_id)
- ;
+ ADD CONSTRAINT cms_org_con_map_con_id_p_pazb1
+ PRIMARY KEY (contact_id, orgaunit_id);
-ALTER TABLE ONLY cms_orgaunits_person_map
- ADD CONSTRAINT cms_org_per_map_org_id_p_km6_m
- -- PRIMARY KEY (person_id, orgaunit_id)
- ;
-
-ALTER TABLE ONLY cms_orgaunits
- ADD CONSTRAINT cms_organiz_organiz_id_p_kk8qt
- -- PRIMARY KEY (orgaunit_id)
- ;
+-- ALTER TABLE ONLY cms_orgaunits
+-- ADD CONSTRAINT cms_orgauni_orgauni_id_p_ycjef
+-- PRIMARY KEY (orgaunit_id);
+ALTER TABLE cms_orgaunits
+ ADD CONSTRAINT cms_orgauni_orgauni_id_f_qxnsg
+ FOREIGN KEY (orgaunit_id) REFERENCES cms_pages(item_id);
ALTER TABLE ONLY cms_orgaunits_contact_map
- ADD CONSTRAINT cms_org_con_map_con_id_f_9tm3c
- FOREIGN KEY (contact_id) REFERENCES cms_contacts(contact_id);
+ ADD CONSTRAINT cms_org_con_map_con_id_f_i7nai
+ FOREIGN KEY (contact_id) REFERENCES cms_contact_bundles(bundle_id);
ALTER TABLE ONLY cms_orgaunits_contact_map
- ADD CONSTRAINT cms_org_con_map_org_id_f_vdrnx
- FOREIGN KEY (orgaunit_id)
- REFERENCES cms_orgaunits(orgaunit_id);
-
+ ADD CONSTRAINT cms_org_con_map_org_id_f_li14a
+ FOREIGN KEY (orgaunit_id) REFERENCES cms_orgaunit_bundles(bundle_id);
ALTER TABLE ONLY cms_orgaunits_person_map
- ADD CONSTRAINT cms_org_per_map_org_id_f_ducb2
- FOREIGN KEY (orgaunit_id)
- REFERENCES cms_orgaunits(orgaunit_id);
+ ADD CONSTRAINT cms_org_per_map_org_id_p_7t2yy
+ PRIMARY KEY (person_id, orgaunit_id);
-ALTER TABLE ONLY cms_orgaunits_person_map
- ADD CONSTRAINT cms_org_per_map_per_id_f_hrpzh
- FOREIGN KEY (person_id) REFERENCES cms_persons(person_id);
+ALTER TABLE cms_orgaunits_person_map
+ ADD CONSTRAINT cms_org_per_map_org_id_f_5gx18
+ FOREIGN KEY (orgaunit_id) REFERENCES cms_orgaunit_bundles(bundle_id);
+ALTER TABLE cms_orgaunits_person_map
+ ADD CONSTRAINT cms_org_per_map_per_id_f_q2eog
+ FOREIGN KEY (person_id) REFERENCES cms_person_bundles(bundle_id);
ALTER TABLE ONLY cms_orgaunits_hierarchy_map
- ADD CONSTRAINT cms_org_hie_map_sub_or_p_nykpq
+ ADD CONSTRAINT cms_org_hie_map_sub_or_p_62tce
PRIMARY KEY (subordinate_orgaunit_id, superior_orgaunit_id);
-ALTER TABLE ONLY cms_orgaunits_hierarchy_map
- ADD CONSTRAINT cms_org_hie_map_sub_or_f_xq5is
- FOREIGN KEY (subordinate_orgaunit_id)
- REFERENCES cms_orgaunits(orgaunit_id);
+ALTER TABLE cms_orgaunits_hierarchy_map
+ ADD CONSTRAINT cms_org_hie_map_sub_or_f_r7s1i
+ FOREIGN KEY (subordinate_orgaunit_id) REFERENCES cms_orgaunit_bundles(bundle_id);
-ALTER TABLE ONLY cms_orgaunits_hierarchy_map
- ADD CONSTRAINT cms_org_hie_map_sup_or_f_qchkn
- FOREIGN KEY (superior_orgaunit_id)
- REFERENCES cms_orgaunits(orgaunit_id);
+ALTER TABLE cms_orgaunits_hierarchy_map
+ ADD CONSTRAINT cms_org_hie_map_sup_or_f_8klhh
+ FOREIGN KEY (superior_orgaunit_id) REFERENCES cms_orgaunit_bundles(bundle_id);
-ALTER TABLE ONLY cms_orgaunits
- ADD CONSTRAINT cms_organiz_organiz_id_f_ubliq
- FOREIGN KEY (orgaunit_id) REFERENCES cms_pages(item_id);
-
---
--- Check: 6.6.7-6.6.8/create_orgaunit_bundle for additional constraints
\ No newline at end of file
diff --git a/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.11-6.6.12/upd_table_content_types.sql b/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.11-6.6.12/upd_table_content_types.sql
index 1d874fd2e..21890b18e 100644
--- a/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.11-6.6.12/upd_table_content_types.sql
+++ b/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.11-6.6.12/upd_table_content_types.sql
@@ -25,14 +25,14 @@
-- Don't use for the APLAWS tree! APLAWS is update just from 1.0.4 to 2.3.x
ALTER TABLE content_types
- drop constraint content_types_mode_ck ;
+ DROP CONSTRAINT content_types_mode_ck ;
ALTER TABLE content_types
- rename COLUMN mode TO type_mode;
+ RENAME COLUMN mode TO type_mode;
ALTER TABLE content_types
- add constraint content_types_mode_ck CHECK
- (("type_mode" = ANY (ARRAY['D'::bpchar, 'H'::bpchar, 'I'::bpchar]))) ;
+ ADD CONSTRAINT content_types_mode_ck
+ CHECK ( type_mode in ('D', 'H', 'I') );
-- Should not be necessary, rename shouldn't modify this
-- ALTER TABLE content_types
diff --git a/ccm-cms/sql/ccm-cms/upgrade/postgres-6.6.11-6.6.12.sql b/ccm-cms/sql/ccm-cms/upgrade/postgres-6.6.11-6.6.12.sql
index e845ae98e..b06dbc503 100644
--- a/ccm-cms/sql/ccm-cms/upgrade/postgres-6.6.11-6.6.12.sql
+++ b/ccm-cms/sql/ccm-cms/upgrade/postgres-6.6.11-6.6.12.sql
@@ -28,6 +28,6 @@
begin;
\i ../postgres/upgrade/6.6.11-6.6.12/upd_table_content_types.sql
-\i ../postgres/upgrade/6.6.11-6.6.12/upd_tables_cms_organisation.sql
+\i ../postgres/upgrade/6.6.11-6.6.12/ren_tables_cms_organisation.sql
commit;
diff --git a/ccm-cms/src/ccm-cms.upgrade b/ccm-cms/src/ccm-cms.upgrade
index 2b0d2b434..0b8aded58 100755
--- a/ccm-cms/src/ccm-cms.upgrade
+++ b/ccm-cms/src/ccm-cms.upgrade
@@ -84,4 +84,10 @@
similar assocs -->
+
+
+
+
diff --git a/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_admin_legacy_entries.sql b/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_admin_legacy_entries.sql
index d12c9c9c5..c8ab7679b 100644
--- a/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_admin_legacy_entries.sql
+++ b/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_admin_legacy_entries.sql
@@ -35,7 +35,8 @@ delete from object_context
);
-- delete from acs_objects all entries referring to node_id in site_nodes
-alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
+-- Not needed anymore, see ccm-themedirector-6.6.1-6.6.2
+-- alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
delete from acs_objects
where object_id in
(select node_id from site_nodes where object_id in
@@ -54,7 +55,8 @@ delete from site_nodes
where object_type
like '%admin.Admin%')
);
-alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
+-- Not needed anymore, see ccm-themedirector-6.6.1-6.6.2
+-- alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
FOREIGN KEY (node_id)
REFERENCES acs_objects (object_id);
diff --git a/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_ds_legacy_entries.sql b/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_ds_legacy_entries.sql
index 82f571896..cfb8ebebf 100644
--- a/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_ds_legacy_entries.sql
+++ b/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_ds_legacy_entries.sql
@@ -36,7 +36,8 @@ delete from object_context
);
-- delete from acs_objects all entries referring to DS node_id in site_nodes
-alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
+-- Not needed anymore, see ccm-themedirector-6.6.1-6.6.2
+-- alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
delete from acs_objects
where object_id in
(select node_id from site_nodes where object_id in
@@ -53,7 +54,8 @@ delete from site_nodes
(select package_type_id from apm_package_types
where package_key like 'webdev-support')
);
-alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
+-- Not needed anymore, see ccm-themedirector-6.6.1-6.6.2
+-- alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
FOREIGN KEY (node_id)
REFERENCES acs_objects (object_id);
diff --git a/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_permissions_legacy_entries.sql b/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_permissions_legacy_entries.sql
index 3778ff844..02d8ffd49 100644
--- a/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_permissions_legacy_entries.sql
+++ b/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_permissions_legacy_entries.sql
@@ -36,7 +36,8 @@ delete from object_context
);
-- delete from acs_objects all entries referring to DS node_id in site_nodes
-alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
+-- Not needed anymore, see ccm-themedirector-6.6.1-6.6.2
+-- alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
delete from acs_objects
where object_id in
(select node_id from site_nodes where object_id in
@@ -53,9 +54,10 @@ delete from site_nodes
(select package_type_id from apm_package_types
where package_key like 'acs-permissions')
);
-alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
- FOREIGN KEY (node_id)
- REFERENCES acs_objects (object_id);
+-- Not needed anymore, see ccm-themedirector-6.6.1-6.6.2
+-- alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
+-- FOREIGN KEY (node_id)
+-- REFERENCES acs_objects (object_id);
diff --git a/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_sitemap_legacy_entries.sql b/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_sitemap_legacy_entries.sql
index 48a3aa2d5..c57f41c14 100644
--- a/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_sitemap_legacy_entries.sql
+++ b/ccm-core/sql/ccm-core/upgrade/default/6.6.3-6.6.4/remove_sitemap_legacy_entries.sql
@@ -36,7 +36,8 @@ delete from object_context
);
-- delete from acs_objects all entries referring to node_id in site_nodes
-alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
+-- Not needed anymore, see ccm-themedirector-6.6.1-6.6.2
+-- alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
delete from acs_objects
where object_id in
(select node_id from site_nodes where object_id in
@@ -55,9 +56,10 @@ delete from site_nodes
where object_type
like '%sitemap.SiteMap%')
);
-alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
- FOREIGN KEY (node_id)
- REFERENCES acs_objects (object_id);
+-- Not needed anymore, see ccm-themedirector-6.6.1-6.6.2
+-- alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
+-- FOREIGN KEY (node_id)
+-- REFERENCES acs_objects (object_id);
diff --git a/ccm-core/sql/ccm-core/upgrade/oracle-se-6.6.0-6.6.1.sql b/ccm-core/sql/ccm-core/upgrade/oracle-se-6.6.0-6.6.1.sql
index f0827b820..ed3e78fad 100644
--- a/ccm-core/sql/ccm-core/upgrade/oracle-se-6.6.0-6.6.1.sql
+++ b/ccm-core/sql/ccm-core/upgrade/oracle-se-6.6.0-6.6.1.sql
@@ -26,4 +26,4 @@ PROMPT Red Hat Enterprise CORE 6.6.0 -> 6.6.1 Upgrade Script (Oracle)
-- Once while updated postgres database required, not needed for oracle, it
-- is still/already there (during tests with Camden database).
--- oracle-se/6.6.0-6.6.1/recreate_users_index.sql
\ No newline at end of file
+-- oracle-se/6.6.0-6.6.1/recreate_users_index.sql
diff --git a/ccm-navigation/sql/ccm-navigation/upgrade/default/6.6.1-6.6.2/remove_legacy_entries.sql b/ccm-navigation/sql/ccm-navigation/upgrade/default/6.6.1-6.6.2/remove_legacy_entries.sql
index 8341f4860..d1f2418cd 100644
--- a/ccm-navigation/sql/ccm-navigation/upgrade/default/6.6.1-6.6.2/remove_legacy_entries.sql
+++ b/ccm-navigation/sql/ccm-navigation/upgrade/default/6.6.1-6.6.2/remove_legacy_entries.sql
@@ -35,7 +35,8 @@ delete from object_context
);
-- delete from acs_objects all entries referring to node_id in site_nodes
-alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
+-- Not needed anymore, see ccm-themedirector-6.6.1-6.6.2
+-- alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
delete from acs_objects
where object_id in
(select node_id from site_nodes where object_id in
@@ -54,9 +55,10 @@ delete from site_nodes
where object_type
like 'com.arsdigita.london.navigation.Navigation')
);
-alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
- FOREIGN KEY (node_id)
- REFERENCES acs_objects (object_id);
+-- Not needed anymore, see ccm-themedirector-6.6.1-6.6.2
+-- alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
+-- FOREIGN KEY (node_id)
+-- REFERENCES acs_objects (object_id);
diff --git a/ccm-themedirector/sql/ccm-themedirector/upgrade/default/6.6.1-6.6.2/upd_system_tables.sql b/ccm-themedirector/sql/ccm-themedirector/upgrade/default/6.6.1-6.6.2/upd_system_tables.sql
index 9e6d24f7e..7b7c8684f 100644
--- a/ccm-themedirector/sql/ccm-themedirector/upgrade/default/6.6.1-6.6.2/upd_system_tables.sql
+++ b/ccm-themedirector/sql/ccm-themedirector/upgrade/default/6.6.1-6.6.2/upd_system_tables.sql
@@ -81,14 +81,18 @@ delete from acs_objects
where object_type like '%com.arsdigita.kernel%'
AND display_name like '%hemes%' ;
-alter table site_nodes add
- constraint site_nodes_parent_id_f_sacav foreign key (parent_id)
- references site_nodes(node_id);
+-- Do not recreate the constraint for site_nodes. During the upgrade from 1.0.4 to 2.x.y site_nodes
+-- will be removed completly, therefore we don't need the constraints. ccm-themedirector-6.6.1-6.6.2
+-- is the first upgrade in the process which deals with the site_nodes, therefore it removes the
+-- constraints.
+-- alter table site_nodes add
+-- constraint site_nodes_parent_id_f_sacav foreign key (parent_id)
+-- references site_nodes(node_id);
-alter table site_nodes add
- constraint site_nodes_node_id_f_n1m2y foreign key (node_id)
- references acs_objects(object_id);
+-- alter table site_nodes add
+-- constraint site_nodes_node_id_f_n1m2y foreign key (node_id)
+-- references acs_objects(object_id);
-alter table site_nodes add
- constraint site_nodes_object_id_f_ked74 foreign key (object_id)
- references apm_packages(package_id);
\ No newline at end of file
+-- alter table site_nodes add
+-- constraint site_nodes_object_id_f_ked74 foreign key (object_id)
+-- references apm_packages(package_id);
\ No newline at end of file