-- 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 CMOBJPROPS31 (
	CMID			number(10) not null,
	ASAUDITLVL		number(3) null,
	BRSAUDITLVL		number(3) null,
	CMSAUDITLVL		number(3) null,
	CSAUDITLVL		number(3) null,
	DISPAUDITLVL		number(3) null,
	DSAUDITLVL		number(3) null,
	EMSAUDITLVL		number(3) null,
	JSAUDITLVL		number(3) null,
	MDSAUDITLVL		number(3) null,
	MMPDFSAUDITLVL		number(3) null,
	MMSAUDITLVL		number(3) null,
	MSAUDITLVL		number(3) null,
	MTEAUDITLVL		number(3) null,
	PSAUDITLVL		number(3) null,
	RSAUDITLVL		number(3) null,
	SSAUDITLVL		number(3) null,
	BRSAUDITNATIVEQRY	number(1) null,
	RSAUDITNATIVEQRY	number(1) null,
	constraint PK_CMOBJPROPS31 primary key (CMID)
)

INSERT INTO CMOBJPROPS31(CMID) SELECT CMID FROM CMOBJECTS WHERE (CLASSID = 4)  OR (CLASSID = 14) OR (CLASSID = 34) OR (CLASSID = 83) OR (CLASSID = 65) OR (CLASSID = 47) OR (CLASSID = 74) OR (CLASSID = 84) OR (CLASSID = 79) OR (CLASSID = 88) OR (CLASSID = 70) OR (CLASSID = 100) OR (CLASSID = 99) OR (CLASSID = 92) OR (CLASSID = 101) OR (CLASSID = 59) OR (CLASSID = 25) OR (CLASSID = 24)

!MigrateAuditLevels

!RunCMScript CMUpgradeScript_configuration_update_1.xml