-- 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			integer not null,
	ASAUDITLVL		smallint,
	BRSAUDITLVL		smallint,
	CMSAUDITLVL		smallint,
	CSAUDITLVL		smallint,
	DISPAUDITLVL		smallint,
	DSAUDITLVL		smallint,
	EMSAUDITLVL		smallint,
	JSAUDITLVL		smallint,
	MDSAUDITLVL		smallint,
	MMPDFSAUDITLVL		smallint,
	MMSAUDITLVL		smallint,
	MSAUDITLVL		smallint,
	MTEAUDITLVL		smallint,
	PSAUDITLVL		smallint,
	RSAUDITLVL		smallint,
	SSAUDITLVL		smallint,
	BRSAUDITNATIVEQRY	decimal(1,0),
	RSAUDITNATIVEQRY	decimal(1,0),
	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