Ergaenzung des upgrade script um Änderungen in content_types, Spalte is_internal - mode.

git-svn-id: https://svn.libreccm.org/ccm/trunk@625 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2010-11-19 08:26:58 +00:00
parent 75bacac675
commit c2bd20b716
1 changed files with 43 additions and 0 deletions

View File

@ -15,6 +15,49 @@
--
-- $Id: upd_table_content_types.sql pboy $
alter table content_types
drop constraint content_types_is_internal_ck ;
alter table content_types
add column ancestors character varying(2000),
add column siblings 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
alter is_internal drop default ;
alter table content_types
rename column is_internal TO mode;
alter table content_types
add constraint content_types_mode_ck CHECK
(("mode" = ANY (ARRAY['D'::bpchar, 'H'::bpchar, 'I'::bpchar]))) ;
alter table content_types
alter mode set default '0'::bpchar
alter table content_types
alter mode set NOT NULL ;
COMMENT ON
COLUMN content_types.mode IS '
Saves the mode of the content type: I = internal, H = hidden
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.
';