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 1446ae548..2b0335527 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 @@ -30,62 +30,64 @@ -- Drop contraints with old names -ALTER TABLE ct_public_personal_profiles - 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 +-- Can't delete primary key constraint because of depencies. +-- ALTER TABLE ct_public_personal_profiles +-- DROP CONSTRAINT ct_pub_per_prof_pro_id_p__8_1d; -ALTER TABLE ct_public_personal_profiles_bundles - DROP CONSTRAINT ct_pub_per_pro_bun_bun_p_zhc9i; +ALTER TABLE ct_public_personal_profiles + DROP CONSTRAINT ct_pub_per_prof_pro_id_f_4akoj; -ALTER TABLE ct_public_personal_profiles_bundles +--ALTER TABLE ct_public_personal_profile_bundles +-- DROP CONSTRAINT ct_pub_per_pro_bun_bun_p_zhc9i; + +ALTER TABLE ct_public_personal_profile_bundles DROP CONSTRAINT ct_pub_per_pro_bun_bun_f__jr2_; -ALTER TABLE ct_public_personal_profiles_owner_map +ALTER TABLE ct_public_personal_profile_owner_map DROP CONSTRAINT ct_pub_per_pro_own_map_p_rr7ie; -ALTER TABLE ct_public_personal_profiles_owner_map +ALTER TABLE ct_public_personal_profile_owner_map DROP CONSTRAINT ct_pub_per_pro_own_map_f_cd7_1; -ALTER TABLE ct_public_personal_profiles_owner_map +ALTER TABLE ct_public_personal_profile_owner_map DROP CONSTRAINT ct_pub_per_pro_own_map_f_ugs15; -ALTER TABLE ct_public_personal_profiles_nav_items +ALTER TABLE ct_public_personal_profile_nav_items DROP CONSTRAINT ct_pub_per_pro_nav_ite_p_ijb6c; -ALTER TABLE ct_public_personal_profiles_nav_items +ALTER TABLE ct_public_personal_profile_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 +ALTER TABLE ct_public_personal_profile_bundles RENAME TO ct_ppp_bundles ; -ALTER TABLE ct_public_personal_profiles_owner_map +ALTER TABLE ct_public_personal_profile_owner_map RENAME TO ct_ppp_owner_map ; -ALTER TABLE ct_public_personal_profiles_nav_items +ALTER TABLE ct_public_personal_profile_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_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_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 +ALTER TABLE ct_ppp_owner_map ADD CONSTRAINT ct_ppp_own_map_own_id__p_rqs7q PRIMARY KEY(owner_id, profile_id); @@ -98,7 +100,7 @@ ALTER TABLE ct_ppp_owner_map 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) + 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 + ADD CONSTRAINT ct_ppp_nav_ite_key_lab_u_ecekv UNIQUE("key", lang, label); 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 011b216ea..581a5a7a3 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 @@ -32,6 +32,6 @@ begin; -\i ../postgres/upgrade/6.6.5-6.6.6/fix_app_name.sql +\i ../postgres/upgrade/6.6.5-6.6.6/ren_tables_cms_publicpersonalprofile.sql 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 index f537d4b9c..50ddf273e 100644 --- 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 @@ -16,8 +16,9 @@ -- 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; +-- Can't delete primary key constraint because of dependcies. +-- 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; @@ -28,8 +29,8 @@ ALTER TABLE ONLY ct_decisiontree_section_options 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_p_5od37 PRIMARY KEY (option_id) ALTER TABLE ct_decisiontree_section_opts ADD CONSTRAINT ct_deci_sec_opt_opt_id_f_hb7ct