Fixed several Oracle related problems with upgrade ccm-cms-6.6.0-6.6.1

git-svn-id: https://svn.libreccm.org/ccm/trunk@3040 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-12-12 14:21:33 +00:00
parent 4943b6a3eb
commit 65405f1f7d
10 changed files with 51 additions and 16 deletions

View File

@ -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;

View File

@ -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 ;

View File

@ -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;

View File

@ -35,14 +35,11 @@ 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
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 '

View File

@ -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;

View File

@ -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 ;

View File

@ -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

View File

@ -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

View File

@ -1,2 +1,2 @@
-- Make volume_of_series alpha numerical
ALTER TABLE ct_publications_volume_in_series ALTER COLUMN volumeofseries TYPE VARCHAR(128);
ALTER TABLE ct_publications_volume_in_series ALTER volumeofseries TYPE VARCHAR(128);

View File

@ -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;
ALTER TABLE ct_publications ALTER abstract TYPE text;
ALTER TABLE ct_publications ALTER misc TYPE text;