-- 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 	 		VARCHAR2(1024) NULL,
	ITEMID	 		VARCHAR2(50) NOT NULL,
	QUEUEID			VARCHAR2(50) NOT NULL,
	WORKFLOW 		VARCHAR2(50) NOT NULL,
	CONSUMERNAME	VARCHAR2(50) NULL,
	STATE			NUMBER(10),
	INSERTIONTIME 	TIMESTAMP NOT NULL,
	INDEXACTION		VARCHAR2(50) NOT NULL,
	INDEXCLASS		VARCHAR2(255) NOT NULL,
	INDEXPROPS		CLOB NULL,
	CONSTRAINT PK_CMINDEXQUEUE PRIMARY KEY (ITEMID)
);

CREATE INDEX IDX_CMINDEXQUEUE on CMINDEXQUEUE(STATE, QUEUEID);