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

create table CMOBJPROPS89 (
	CMID        integer not null,
	DOCTYPE     varchar(64) not null,
	DOCID       varchar(64) not null,
	CONTENT     clob(10M),
	CONSTRAINT PK_CMOBJPROPS89 PRIMARY KEY (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMOBJPROPS89 ON CMOBJPROPS89 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE INDEX IDX_CMPROPS89_1 on CMOBJPROPS89(DOCID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB131
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML131
   STORES CMOBJPROPS89
   COLUMN CONTENT;

CREATE UNIQUE INDEX CMIDX131 ON CMATB131 USING STOGROUP CMSCRIPT_STOGROUP;

ALTER TABLE CMOBJPROPS85 ADD column OBJREFS clob(1M);

CREATE AUXILIARY TABLE CMATB132
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML132
   STORES CMOBJPROPS85
   COLUMN OBJREFS;

CREATE UNIQUE INDEX CMIDX132 ON CMATB132 USING STOGROUP CMSCRIPT_STOGROUP;

!RunCMScript CMUpgradeScript_homeFolder_1.xml
