-- 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			int NOT NULL ,
	CONTEXT         	ntext NULL,
	CONTEXTCOUNT		int NULL,
	LASTPAGE	nvarchar(256) null,
	CONSTRAINT PK_CMOBJPROPS60 PRIMARY KEY (CMID)
)

CREATE TABLE CMOBJPROPS61 (
	CMID			int NOT NULL ,
	BURSTKEY		nvarchar (4000) NULL,
	BURSTID			ntext NULL,
	CONSTRAINT PK_CMOBJPROPS61 PRIMARY KEY (CMID)
)

alter table CMOBJPROPS28 add SPEC ntext NULL

alter table CMOBJPROPS20 drop column EXECPAGEDEF

alter table CMOBJPROPS20 add ALLOWSUBSCRIBE bit 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) SELECT CMID, BURSTKEY 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