-- Licensed Materials - Property of IBM
--
-- BI and PM: CM
--
-- (C) Copyright IBM Corp. 2008, 2009
--
-- US Government Users Restricted Rights - Use, duplication or disclosure
-- restricted by GSA ADP Schedule Contract with IBM Corp.

-- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
-- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).


CREATE TABLE CMOBJPROPS60 (
	CMID            number(10) NOT NULL ,
	CONTEXT         clob NULL,
	CONTEXTCOUNT	number(10) NULL,
	LASTPAGE	varchar2(768) NULL,
	constraint PK_CMOBJPROPS60 primary key (CMID) 
);

CREATE TABLE CMOBJPROPS61 (
	CMID            number(10) NOT NULL ,
	BURSTKEY	varchar2 (4000) NULL,
	BURSTID		clob NULL,
	constraint PK_CMOBJPROPS61 primary key (CMID) 
);


alter table CMOBJPROPS28 add (SPEC clob NULL);

alter table CMOBJPROPS20 drop column EXECPAGEDEF;

alter table CMOBJPROPS20 add (ALLOWSUBSCRIBE number(1) null);

UPDATE CMOBJPROPS20 set ALLOWSUBSCRIBE=0 WHERE CMID IN (SELECT CMID FROM CMOBJECTS WHERE CLASSID IN (10,19,37,80,139));

insert into CMOBJPROPS60(CMID) SELECT CMID FROM CMOBJECTS WHERE CLASSID=179;

insert into CMOBJPROPS61(CMID, BURSTKEY, BURSTID) SELECT CMID, BURSTKEY, NULL FROM CMOBJPROPS6 WHERE CMID in (SELECT CMID FROM CMOBJECTS WHERE CLASSID in (27,179));

delete from CMOBJPROPS6 where CMID in (select CMID from CMOBJECTS where CLASSID IN (27,179));

alter table CMOBJPROPS6 drop column BURSTKEY
;
