diff --git a/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/drop_table_cms_article_image_map.sql b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/drop_table_cms_article_image_map.sql index 24ae32c4b..f56e27af0 100644 --- a/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/drop_table_cms_article_image_map.sql +++ b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/drop_table_cms_article_image_map.sql @@ -32,8 +32,8 @@ INSERT INTO cms_item_image_attachment ( attachment_id, item_id, image_id, captio SELECT map_id as attachment_id, article_id as item_id, image_id, - substring(caption, 0, 100) as caption, - substring(caption, 0, 200) as title, + substr(caption, 0, 99) as caption, + substr(caption, 0, 199) as title, caption as description FROM cms_article_image_map; diff --git a/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/upd_table_cms_articles.sql b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/upd_table_cms_articles.sql index ab82e6693..f6ffbd881 100644 --- a/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/upd_table_cms_articles.sql +++ b/ccm-cms/sql/ccm-cms/default/upgrade/6.6.0-6.6.1/upd_table_cms_articles.sql @@ -15,8 +15,7 @@ -- -- $Id: upd_table_cms_articles .sql pboy $ --- deletes constraints in all tables with references on cms_articles! -drop table cms_articles CASCADE ; + alter table cms_text_pages drop constraint cms_text_pages_item_id_f_kfox7 ; alter table cms_text_pages drop constraint cms_text_pages_text_id_f_uri55 ; diff --git a/ccm-cms/sql/ccm-cms/oracle-se/upgrade/6.6.0-6.6.1/drop_old_cms_articles.sql b/ccm-cms/sql/ccm-cms/oracle-se/upgrade/6.6.0-6.6.1/drop_old_cms_articles.sql new file mode 100644 index 000000000..15170b338 --- /dev/null +++ b/ccm-cms/sql/ccm-cms/oracle-se/upgrade/6.6.0-6.6.1/drop_old_cms_articles.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 +-- + +-- deletes constraints in all tables with references on cms_articles! + +drop table cms_articles CASCADE CONSTRAINTS; \ No newline at end of file diff --git a/ccm-cms/sql/ccm-cms/oracle-se/upgrade/6.6.0-6.6.1/upd_table_content_types.sql b/ccm-cms/sql/ccm-cms/oracle-se/upgrade/6.6.0-6.6.1/upd_table_content_types.sql index 5515dc037..e08f513b9 100644 --- a/ccm-cms/sql/ccm-cms/oracle-se/upgrade/6.6.0-6.6.1/upd_table_content_types.sql +++ b/ccm-cms/sql/ccm-cms/oracle-se/upgrade/6.6.0-6.6.1/upd_table_content_types.sql @@ -34,15 +34,12 @@ alter table content_types alter table content_types rename column is_internal TO type_mode; -alter table content_types - add constraint content_types_mode_ck CHECK - (("type_mode" = ANY (ARRAY['D'::bpchar, 'H'::bpchar, 'I'::bpchar]))) ; +alter table content_types + add constraint content_types_mode_ck CHECK ( type_mode in ('D', 'H', 'I') ); alter table content_types - modify type_mode set default '0'::bpchar ; + modify type_mode default 'D'; -alter table content_types - modify type_mode set NOT NULL ; COMMENT ON COLUMN content_types.type_mode IS ' diff --git a/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.0-6.6.1/drop_old_cms_articles.sql b/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.0-6.6.1/drop_old_cms_articles.sql new file mode 100644 index 000000000..b923802ff --- /dev/null +++ b/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.0-6.6.1/drop_old_cms_articles.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 +-- + +-- deletes constraints in all tables with references on cms_articles! + +drop table cms_articles CASCADE; \ No newline at end of file diff --git a/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.0-6.6.1/upd_table_content_types.sql b/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.0-6.6.1/upd_table_content_types.sql index 3b62825a7..432920b19 100644 --- a/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.0-6.6.1/upd_table_content_types.sql +++ b/ccm-cms/sql/ccm-cms/postgres/upgrade/6.6.0-6.6.1/upd_table_content_types.sql @@ -35,11 +35,10 @@ alter table content_types rename column is_internal 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') ) ; alter table content_types - alter type_mode set default '0'::bpchar ; + alter type_mode set default 'D'; alter table content_types alter type_mode set NOT NULL ; diff --git a/ccm-cms/sql/ccm-cms/upgrade/oracle-se-6.6.0-6.6.1.sql b/ccm-cms/sql/ccm-cms/upgrade/oracle-se-6.6.0-6.6.1.sql index 551f7fe5b..aaf800b6e 100644 --- a/ccm-cms/sql/ccm-cms/upgrade/oracle-se-6.6.0-6.6.1.sql +++ b/ccm-cms/sql/ccm-cms/upgrade/oracle-se-6.6.0-6.6.1.sql @@ -28,5 +28,6 @@ PROMPT Red Hat Enterprise CMS 6.6.0 -> 6.6.1 Upgrade Script (Oracle) @@ ../default/upgrade/6.6.0-6.6.1/upd_table_cms_rel_links.sql @@ ../oracle-se/upgrade/6.6.0-6.6.1/upd_table_content_types.sql @@ ../default/upgrade/6.6.0-6.6.1/drop_table_cms_article_image_map.sql +@@ ../oracle-se/upgrade/6.6.0-6.6.1/drop_old_cms_articles.sql @@ ../default/upgrade/6.6.0-6.6.1/upd_table_cms_articles.sql @@ ../default/upgrade/6.6.0-6.6.1/upd_table_authoring_steps.sql 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 index 8cf8a8815..271a0fdd8 100644 --- 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 @@ -30,6 +30,7 @@ begin; \i ../default/upgrade/6.6.0-6.6.1/upd_table_cms_rel_links.sql \i ../postgres/upgrade/6.6.0-6.6.1/upd_table_content_types.sql \i ../default/upgrade/6.6.0-6.6.1/drop_table_cms_article_image_map.sql +\i ../postgres/upgrade/6.6.0-6.6.1/drop_old_cms_articles.sql \i ../default/upgrade/6.6.0-6.6.1/upd_table_cms_articles.sql \i ../default/upgrade/6.6.0-6.6.1/upd_table_authoring_steps.sql diff --git a/ccm-sci-publications/sql/ccm-sci-publications/default/upgrade/6.6.4-6.6.5/vol_of_series_alphanum.sql b/ccm-sci-publications/sql/ccm-sci-publications/default/upgrade/6.6.4-6.6.5/vol_of_series_alphanum.sql index ba7429b28..a81017fec 100644 --- a/ccm-sci-publications/sql/ccm-sci-publications/default/upgrade/6.6.4-6.6.5/vol_of_series_alphanum.sql +++ b/ccm-sci-publications/sql/ccm-sci-publications/default/upgrade/6.6.4-6.6.5/vol_of_series_alphanum.sql @@ -1,2 +1,2 @@ -- Make volume_of_series alpha numerical -ALTER TABLE ct_publications_volume_in_series ALTER COLUMN volumeofseries TYPE VARCHAR(128); \ No newline at end of file +ALTER TABLE ct_publications_volume_in_series ALTER volumeofseries TYPE VARCHAR(128); \ No newline at end of file diff --git a/ccm-sci-publications/sql/ccm-sci-publications/default/upgrade/6.6.6-6.6.7/abstract_to_text.sql b/ccm-sci-publications/sql/ccm-sci-publications/default/upgrade/6.6.6-6.6.7/abstract_to_text.sql index 51a858d4c..ccde96f1b 100644 --- a/ccm-sci-publications/sql/ccm-sci-publications/default/upgrade/6.6.6-6.6.7/abstract_to_text.sql +++ b/ccm-sci-publications/sql/ccm-sci-publications/default/upgrade/6.6.6-6.6.7/abstract_to_text.sql @@ -1,3 +1,3 @@ -- Alter abstract and misc column type to text -ALTER TABLE ct_publications ALTER COLUMN abstract TYPE text; -ALTER TABLE ct_publications ALTER COLUMN misc TYPE text; \ No newline at end of file +ALTER TABLE ct_publications ALTER abstract TYPE text; +ALTER TABLE ct_publications ALTER misc TYPE text; \ No newline at end of file