-- 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 CMINDEXQUEUE (
	OBJID 	 		VARCHAR(1024) DEFAULT NULL,
	ITEMID	 		VARCHAR(50) NOT NULL,
	QUEUEID			VARCHAR(50) NOT NULL,
	WORKFLOW 		VARCHAR(50) NOT NULL,
	CONSUMERNAME	VARCHAR(50) DEFAULT NULL,
	STATE			INTEGER,
	INSERTIONTIME 	TIMESTAMP NOT NULL,
	INDEXACTION		VARCHAR(50) NOT NULL,
	INDEXCLASS		VARCHAR(255) NOT NULL,
	INDEXPROPS		clob (10M),
	CONSTRAINT PK_CMINDEXQUEUE  PRIMARY KEY (ITEMID)
)

CREATE INDEX IDX_CMINDEXQUEUE on CMINDEXQUEUE(STATE, QUEUEID)