-- Licensed Materials - Property of IBM
--
-- BI and PM: CM
--
-- (C) Copyright IBM Corp. 2015
--
-- US Government Users Restricted Rights - Use, duplication or disclosure
-- restricted by GSA ADP Schedule Contract with IBM Corp.

CREATE TABLE CMOBJPROPS86 (
	CMID			integer not null,
	KSCHEMA			varchar (512),
	KCATALOG		varchar (512),
	CPHYSDEF		clob(10M),
	CPHYSANAL		clob(10M),
	CBASEDEF		clob(10M),
	CBASEANAL		clob(10M),
	STATUSID		smallint,
	SNAPSHOT       	clob(1M),
	HISTORY       	clob(10M),
	SNAPSHOTENBL	decimal(1, 0),
	DEPLOYREFS		clob(1M),
	ALIASROOT		varchar (512),
	CONSTRAINT PK_CMOBJPROPS86 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS86 ON CMOBJPROPS86 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB118
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML118
   STORES CMOBJPROPS86
   COLUMN CPHYSDEF;

CREATE  UNIQUE  INDEX CMIDX118 ON CMATB118 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB119
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML119
   STORES CMOBJPROPS86
   COLUMN CPHYSANAL;

CREATE  UNIQUE  INDEX CMIDX119 ON CMATB119 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB120
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML120
   STORES CMOBJPROPS86
   COLUMN CBASEDEF;

CREATE  UNIQUE  INDEX CMIDX120 ON CMATB120 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB121
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML121
   STORES CMOBJPROPS86
   COLUMN CBASEANAL;

CREATE  UNIQUE  INDEX CMIDX121 ON CMATB121 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB122
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML122
   STORES CMOBJPROPS86
   COLUMN SNAPSHOT;

CREATE  UNIQUE  INDEX CMIDX122 ON CMATB122 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB123
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML123
   STORES CMOBJPROPS86
   COLUMN HISTORY;

CREATE  UNIQUE  INDEX CMIDX123 ON CMATB123 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB124
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML124
   STORES CMOBJPROPS86
   COLUMN DEPLOYREFS;

CREATE  UNIQUE  INDEX CMIDX124 ON CMATB124 USING STOGROUP CMSCRIPT_STOGROUP;

ALTER TABLE CMOBJPROPS48 ADD column MAXSTORESZMB integer;

!RunCMScript CMUpgradeScript_capabilities_58.xml

!RunCMScript CMUpgradeScript_configuration_update_40.xml


