diff --git a/ccm-cms/application.xml b/ccm-cms/application.xml index a42d7b8ea..0491f9bf2 100755 --- a/ccm-cms/application.xml +++ b/ccm-cms/application.xml @@ -2,8 +2,8 @@ diff --git a/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_table_cms_addresses.sql b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_table_cms_addresses.sql new file mode 100644 index 000000000..fb648d46d --- /dev/null +++ b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_table_cms_addresses.sql @@ -0,0 +1,32 @@ +-- +-- 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: add_table_cms_addresses.sql pboy $ + +create table cms_addresses ( + address_id integer NOT NULL, + address character varying(1000), + postalcode character varying(20), + city character varying(200), + state character varying(200), + isocountrycode character varying(2) +); + +ALTER TABLE ONLY cms_addresses + ADD CONSTRAINT cms_addresse_addres_id_p_ggx2i PRIMARY KEY (address_id); + +ALTER TABLE ONLY cms_addresses + ADD CONSTRAINT cms_addresse_addres_id_f_2ebau + FOREIGN KEY (address_id) REFERENCES cms_pages(item_id); \ No newline at end of file diff --git a/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_table_cms_rel_attr.sql b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_table_cms_rel_attr.sql new file mode 100644 index 000000000..c4e534725 --- /dev/null +++ b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_table_cms_rel_attr.sql @@ -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: add_table_cms_rel_attr.sql pboy $ + +create table cms_relation_attribute ( + object_id integer NOT NULL, + attribute character varying(100) NOT NULL, + attr_key character varying(100) NOT NULL, + lang character varying(2) NOT NULL, + name character varying(100) NOT NULL, + description character varying(500) +); + +ALTER TABLE ONLY cms_relation_attribute + ADD CONSTRAINT cms_rel_att_att_key_at_u_nh3g1 UNIQUE (attribute, attr_key, lang); + +ALTER TABLE ONLY cms_relation_attribute + ADD CONSTRAINT cms_rela_attrib_obj_id_p_qdgsr PRIMARY KEY (object_id); \ No newline at end of file diff --git a/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_tables_cms_contacts.sql b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_tables_cms_contacts.sql new file mode 100644 index 000000000..c667e9445 --- /dev/null +++ b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_tables_cms_contacts.sql @@ -0,0 +1,54 @@ +-- +-- 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: add_tables_cms_contacts.sql pboy $ + +-- File has to be processed AFTER add_table_addresses! + +create table cms_contacts ( + contact_id integer NOT NULL, + address_id integer +); + +create table cms_contactentries ( + contactentry_id integer NOT NULL, + contact_id integer, + "key" character varying(100) NOT NULL, + description character varying(100), + value character varying(100) NOT NULL +); + +ALTER TABLE ONLY cms_contacts + ADD CONSTRAINT cms_contact_contact_id_p_kusfp PRIMARY KEY (contact_id); + +ALTER TABLE ONLY cms_contactentries + ADD CONSTRAINT cms_contacte_contac_id_p_wo_wi PRIMARY KEY (contactentry_id); + +ALTER TABLE ONLY cms_contacts + ADD CONSTRAINT cms_contact_address_id_f_wyexp + FOREIGN KEY (address_id) REFERENCES cms_addresses(address_id); + +ALTER TABLE ONLY cms_contacts + ADD CONSTRAINT cms_contact_contact_id_f_30c_4 + FOREIGN KEY (contact_id) REFERENCES cms_pages(item_id); + +ALTER TABLE ONLY cms_contactentries + ADD CONSTRAINT cms_contacte_contac_id_f_7eg_y + FOREIGN KEY (contactentry_id) REFERENCES cms_items(item_id); + +ALTER TABLE ONLY cms_contactentries + ADD CONSTRAINT cms_contactent_cont_id_f_2_5m8 + FOREIGN KEY (contact_id) REFERENCES cms_contacts(contact_id); + diff --git a/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_tables_cms_organisation.sql b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_tables_cms_organisation.sql new file mode 100644 index 000000000..70d1c8f38 --- /dev/null +++ b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_tables_cms_organisation.sql @@ -0,0 +1,71 @@ +-- +-- 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: add_tables_cms_organisation.sql pboy $ + +-- File has to be processed AFTER add_table_cms_contacts! +-- File has to be processed AFTER add_table_cms_persons! + +create table cms_organizationalunits ( + organizationalunit_id integer NOT NULL, + addendum character varying(512) +); + +create table cms_organizationalunits_contact_map ( + organizationalunit_id integer NOT NULL, + contact_id integer NOT NULL, + contact_type character varying(100), + map_order integer +); + +create table cms_organizationalunits_person_map ( + organizationalunit_id integer NOT NULL, + person_id integer NOT NULL, + role_name character varying(100) +); + +ALTER TABLE ONLY cms_organizationalunits_contact_map + ADD CONSTRAINT cms_org_con_map_con_id_p_1rc4y + PRIMARY KEY (contact_id, organizationalunit_id); + +ALTER TABLE ONLY cms_organizationalunits_person_map + ADD CONSTRAINT cms_org_per_map_org_id_p_km6_m + PRIMARY KEY (person_id, organizationalunit_id); + +ALTER TABLE ONLY cms_organizationalunits + ADD CONSTRAINT cms_organiz_organiz_id_p_kk8qt + PRIMARY KEY (organizationalunit_id); + +ALTER TABLE ONLY cms_organizationalunits_contact_map + ADD CONSTRAINT cms_org_con_map_con_id_f_9tm3c + FOREIGN KEY (contact_id) REFERENCES cms_contacts(contact_id); + +ALTER TABLE ONLY cms_organizationalunits_contact_map + ADD CONSTRAINT cms_org_con_map_org_id_f_vdrnx + FOREIGN KEY (organizationalunit_id) + REFERENCES cms_organizationalunits(organizationalunit_id); + +ALTER TABLE ONLY cms_organizationalunits_person_map + ADD CONSTRAINT cms_org_per_map_org_id_f_ducb2 + FOREIGN KEY (organizationalunit_id) + REFERENCES cms_organizationalunits(organizationalunit_id); + +ALTER TABLE ONLY cms_organizationalunits_person_map + ADD CONSTRAINT cms_org_per_map_per_id_f_hrpzh + FOREIGN KEY (person_id) REFERENCES cms_persons(person_id); + +ALTER TABLE ONLY cms_organizationalunits + ADD CONSTRAINT cms_organiz_organiz_id_f_ubliq + FOREIGN KEY (organizationalunit_id) REFERENCES cms_pages(item_id); \ No newline at end of file diff --git a/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_tables_cms_persons.sql b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_tables_cms_persons.sql new file mode 100644 index 000000000..4fc514c3f --- /dev/null +++ b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/add_tables_cms_persons.sql @@ -0,0 +1,55 @@ +-- +-- 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: add_tables_cms_person.sql pboy $ + +-- File has to be processed AFTER add_table_cms_contacts! + + + +create table cms_persons ( + person_id integer NOT NULL, + surname character varying(512), + givenname character varying(512), + titlepre character varying(256), + titlepost character varying(256), + birthdate date, + gender character(1) +); + +create table cms_person_contact_map ( + person_id integer NOT NULL, + contact_id integer NOT NULL, + link_order integer, + link_key character varying(100) +); + +ALTER TABLE ONLY cms_person_contact_map + ADD CONSTRAINT cms_per_con_map_con_id_p_g1cii PRIMARY KEY (contact_id, person_id); + +ALTER TABLE ONLY cms_persons + ADD CONSTRAINT cms_persons_person_id_p_8z087 PRIMARY KEY (person_id); + +ALTER TABLE ONLY cms_person_contact_map + ADD CONSTRAINT cms_per_con_map_con_id_f_peoc2 + FOREIGN KEY (contact_id) REFERENCES cms_contacts(contact_id); + +ALTER TABLE ONLY cms_person_contact_map + ADD CONSTRAINT cms_per_con_map_per_id_f_g82jn + FOREIGN KEY (person_id) REFERENCES cms_persons(person_id); + +ALTER TABLE ONLY cms_persons + ADD CONSTRAINT cms_persons_person_id_f_r24km + FOREIGN KEY (person_id) REFERENCES cms_pages(item_id); \ No newline at end of file diff --git a/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/upd_table_cms_publ_links.sql b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/upd_table_cms_publ_links.sql new file mode 100644 index 000000000..d97c13368 --- /dev/null +++ b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/upd_table_cms_publ_links.sql @@ -0,0 +1,19 @@ +-- +-- 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_cms_publ_links.sql pboy $ + +alter table cms_published_links + add column link_attributes bytea; diff --git a/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/upd_table_cms_rel_links.sql b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/upd_table_cms_rel_links.sql new file mode 100644 index 000000000..04c508ef5 --- /dev/null +++ b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/upd_table_cms_rel_links.sql @@ -0,0 +1,19 @@ +-- +-- 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_cms_tel_links.sql pboy $ + +alter table cms_related_links + add column link__list_name varchar(100); diff --git a/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/upd_table_content_types.sql b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/upd_table_content_types.sql new file mode 100644 index 000000000..ed18eaf3e --- /dev/null +++ b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/upd_table_content_types.sql @@ -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: upd_table_content_types.sql pboy $ + +alter table content_types + add column ancestors character varying(2000), + add column siblings character varying(2000) ; diff --git a/ccm-cms/sql/ccm-cms/upgrade/postgres-6.6.0-6.6.1.sql b/ccm-cms/sql/ccm-cms/upgrade/postgres-6.6.0-6.6.1.sql new file mode 100644 index 000000000..2fad61c24 --- /dev/null +++ b/ccm-cms/sql/ccm-cms/upgrade/postgres-6.6.0-6.6.1.sql @@ -0,0 +1,33 @@ +-- +-- 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 CMS 6.6.0 -> 6.6.1 Upgrade Script (PostgreSQL) + +begin; + +\i ../default/upgrade/6.6.0-6.6.1/add_table_cms_addresses.sql +\i ../default/upgrade/6.6.0-6.6.1/add_tables_cms_contacts.sql +\i ../default/upgrade/6.6.0-6.6.1/add_tables_cms_persons.sql +\i ../default/upgrade/6.6.0-6.6.1/add_tables_cms_organisation.sql +\i ../default/upgrade/6.6.0-6.6.1/add_table_cms_rel_attr.sql +\i ../default/upgrade/6.6.0-6.6.1/upd_table_cms_publ_links.sql +\i ../default/upgrade/6.6.0-6.6.1/upd_table_cms_rel_links.sql +\i ../default/upgrade/6.6.0-6.6.1/upd_table_content_types.sql + +commit; diff --git a/ccm-cms/src/ccm-cms.upgrade b/ccm-cms/src/ccm-cms.upgrade index ffa759a07..9c6fee834 100755 --- a/ccm-cms/src/ccm-cms.upgrade +++ b/ccm-cms/src/ccm-cms.upgrade @@ -30,11 +30,18 @@