From c2bd20b716cd97171114d293a42dc202a346d507 Mon Sep 17 00:00:00 2001 From: pb Date: Fri, 19 Nov 2010 08:26:58 +0000 Subject: [PATCH] =?UTF-8?q?Ergaenzung=20des=20upgrade=20script=20um=20?= =?UTF-8?q?=C3=84nderungen=20in=20content=5Ftypes,=20Spalte=20is=5Finterna?= =?UTF-8?q?l=20-=20mode.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@625 8810af33-2d31-482b-a856-94f89814c4df --- .../6.6.0-6.6.1/upd_table_content_types.sql | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) 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 index ed18eaf3e..2a210a9cc 100644 --- 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 @@ -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. +';