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

CREATE TABLE CMARCHIVEQUEUE (
	OBJID 	 	VARCHAR(512) DEFAULT NULL,
	ITEMID	 	VARCHAR(255) NOT NULL,
	QUEUEID		VARCHAR(255) NOT NULL,
	WORKFLOW 	VARCHAR(255) NOT NULL,
	CONSUMERNAME	VARCHAR(255) DEFAULT NULL,
	STATE		INTEGER,
	INSERTIONTIME 	TIMESTAMP NOT NULL,
	CONSTRAINT PK_CMARCHIVEQUEUE  PRIMARY KEY (ITEMID)
)

CREATE TABLE CMDELETEQUEUE (
	OBJID 	 	VARCHAR(512) DEFAULT NULL,
	ITEMID	 	VARCHAR(255) NOT NULL,
	QUEUEID		VARCHAR(255) NOT NULL,
	WORKFLOW 	VARCHAR(255) NOT NULL,
	CONSUMERNAME	VARCHAR(255) DEFAULT NULL,
	STATE		INTEGER,
	INSERTIONTIME 	TIMESTAMP NOT NULL,
	CONSTRAINT PK_CMDELETEQUEUE PRIMARY KEY (ITEMID)
)

CREATE TABLE CMQUEUELOCK (
	QUEUEID		VARCHAR(255) NOT NULL,
	CONSTRAINT PK_CMQUEUELOCK PRIMARY KEY (QUEUEID)
)