-- 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).


alter table CMCLASSES drop constraint PK_CMCLASSES

rename CMCLASSES to CMCLASSES_OLD

create table CMCLASSES (
	CLASSID			smallint NOT NULL,
	NAME			varchar(50) NOT NULL,
	USAGE			smallint,
	DEF				blob(100K),
	constraint PK_CMCLASSES primary key(CLASSID)
)

insert into CMCLASSES(CLASSID,NAME,USAGE,DEF) select CLASSID,NAME,USAGE,DEF from CMCLASSES_OLD

drop table CMCLASSES_OLD

alter table CMOBJPROPS31 add IDSAUDITLVL smallint

alter table CMOBJPROPS31 add ISSAUDITLVL smallint

alter table CMOBJPROPS31 add IUSAUDITLVL smallint

CREATE TABLE CMOBJPROPS43 (
	CMID			integer not null,
	SPEC			clob(1G),
	constraint PK_CMOBJPROPS43 primary key (CMID) 
)

!RunCMScript CMUpgradeScript_configuration_update_5.xml
