Fixed some more syntax differences between Oracle and PostgreSQL in ccm-cms-6.6.0-6.6.1

git-svn-id: https://svn.libreccm.org/ccm/trunk@3039 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-12-12 11:19:40 +00:00
parent a44f30fef8
commit 4943b6a3eb
4 changed files with 67 additions and 5 deletions

View File

@ -0,0 +1,63 @@
--
-- 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
drop constraint content_types_is_internal_ck ;
alter table content_types add ancestors character varying(2000);
alter table content_types add descendants character varying(2000) ;
update content_types
set is_internal = 'D' where is_internal like '0' ;
update content_types
set is_internal = 'I' where is_internal like '1' ;
alter table content_types
modify is_internal default null;
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
modify type_mode set default '0'::bpchar ;
alter table content_types
modify type_mode set NOT NULL ;
COMMENT ON
COLUMN content_types.type_mode IS '
Saves the mode of the content type: I = internal, H = hidden, D = default (a
content type used in its normal way)
An internal content type is one that is not user-defined and maintained
internally. A content type should be made internal under the following
two conditions:
1) The object type needs to take advantage of content type services
(i.e., versioning, categorization, lifecycle, workflow) that are already
implemented in CMS.
2) The content type cannot be explicitly registered to a content section.
The Template content type is one such internal content type.
A hidden content type is one that cannot be used directly but other content
types can extend from it. Also, it is a legit parent for UDCTs.
';

View File

@ -18,9 +18,8 @@
alter table content_types alter table content_types
drop constraint content_types_is_internal_ck ; drop constraint content_types_is_internal_ck ;
alter table content_types alter table content_types add ancestors character varying(2000);
add ancestors character varying(2000), alter table content_types add descendants character varying(2000) ;
add descendants character varying(2000) ;
update content_types update content_types

View File

@ -26,7 +26,7 @@ PROMPT Red Hat Enterprise CMS 6.6.0 -> 6.6.1 Upgrade Script (Oracle)
@@ ../default/upgrade/6.6.0-6.6.1/add_table_cms_rel_attr.sql @@ ../default/upgrade/6.6.0-6.6.1/add_table_cms_rel_attr.sql
@@ ../oracle-se/upgrade/6.6.0-6.6.1/upd_table_cms_publ_links.sql @@ ../oracle-se/upgrade/6.6.0-6.6.1/upd_table_cms_publ_links.sql
@@ ../default/upgrade/6.6.0-6.6.1/upd_table_cms_rel_links.sql @@ ../default/upgrade/6.6.0-6.6.1/upd_table_cms_rel_links.sql
@@ ../default/upgrade/6.6.0-6.6.1/upd_table_content_types.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 @@ ../default/upgrade/6.6.0-6.6.1/drop_table_cms_article_image_map.sql
@@ ../default/upgrade/6.6.0-6.6.1/upd_table_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 @@ ../default/upgrade/6.6.0-6.6.1/upd_table_authoring_steps.sql

View File

@ -28,7 +28,7 @@ begin;
\i ../default/upgrade/6.6.0-6.6.1/add_table_cms_rel_attr.sql \i ../default/upgrade/6.6.0-6.6.1/add_table_cms_rel_attr.sql
\i ../postgres/upgrade/6.6.0-6.6.1/upd_table_cms_publ_links.sql \i ../postgres/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_cms_rel_links.sql
\i ../default/upgrade/6.6.0-6.6.1/upd_table_content_types.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 ../default/upgrade/6.6.0-6.6.1/drop_table_cms_article_image_map.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_cms_articles.sql
\i ../default/upgrade/6.6.0-6.6.1/upd_table_authoring_steps.sql \i ../default/upgrade/6.6.0-6.6.1/upd_table_authoring_steps.sql