-- 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			int not null,
	ASAUDITLVL		tinyint null,
	BRSAUDITLVL		tinyint	null,
	CMSAUDITLVL		tinyint	null,
	CSAUDITLVL		tinyint null,
	DISPAUDITLVL		tinyint	null,
	DSAUDITLVL		tinyint	null,
	EMSAUDITLVL		tinyint	null,
	JSAUDITLVL		tinyint null,
	MDSAUDITLVL		tinyint	null,
	MMPDFSAUDITLVL		tinyint	null,
	MMSAUDITLVL		tinyint null,
	MSAUDITLVL		tinyint	null,
	MTEAUDITLVL		tinyint	null,
	PSAUDITLVL		tinyint null,
	RSAUDITLVL		tinyint	null,
	SSAUDITLVL		tinyint	null,
	BRSAUDITNATIVEQRY	bit null,
	RSAUDITNATIVEQRY	bit 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