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

CREATE TABLE CMOBJPROPS92 (
	CMID        integer NOT NULL,
	CONTYPE     varchar(64),
	URI         clob(4000),
	SPEC        clob(64k),
	CONSTRAINT PK_CMOBJPROPS92 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS92 ON CMOBJPROPS92 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB137
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML137
   STORES CMOBJPROPS92
   COLUMN URI;

CREATE UNIQUE INDEX CMIDX137 ON CMATB137 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB138
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML138
   STORES CMOBJPROPS92
   COLUMN SPEC;

CREATE UNIQUE INDEX CMIDX138 ON CMATB138 USING STOGROUP CMSCRIPT_STOGROUP;

alter table CMOBJPROPS5 add DETAILTYPE varchar(64), INFO clob(64K);

CREATE AUXILIARY TABLE CMATB139
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML139
   STORES CMOBJPROPS5
   COLUMN INFO;

CREATE UNIQUE INDEX CMIDX139 ON CMATB139 USING STOGROUP CMSCRIPT_STOGROUP;

!RunCMScript CMUpgradeScript_resourceFolders_add.xml