-----------------------------------------------------------------------------
-- CONTENT_RESOURCE_DELETE
-----------------------------------------------------------------------------

CREATE TABLE CONTENT_RESOURCE_DELETE
(
    RESOURCE_ID VARCHAR (255) NOT NULL,
    RESOURCE_UUID VARCHAR (36),
	IN_COLLECTION VARCHAR (255),
	CONTEXT VARCHAR (99),
	FILE_PATH VARCHAR (128),
	FILE_SIZE BIGINT,
	RESOURCE_TYPE_ID VARCHAR (255),
	DELETE_DATE DATETIME,
	DELETE_USERID VARCHAR (36),
    XML LONGTEXT,
    BINARY_ENTITY BLOB
);

CREATE UNIQUE INDEX CONTENT_RESOURCE_UUID_DELETE_I ON CONTENT_RESOURCE_DELETE
(
	RESOURCE_UUID
);

CREATE INDEX CONTENT_RESOURCE_DELETE_INDEX ON CONTENT_RESOURCE_DELETE
(
	RESOURCE_ID
);

CREATE INDEX CONTENT_RESOURCE_DELETE_COLLECTION ON CONTENT_RESOURCE_DELETE
(
	IN_COLLECTION
);

-----------------------------------------------------------------------------
-- CONTENT_RESOURCE_BODY_BINARY
-----------------------------------------------------------------------------

CREATE TABLE CONTENT_RESOURCE_BB_DELETE
(
    RESOURCE_ID VARCHAR (255) NOT NULL,
    BODY LONGBLOB
);

CREATE UNIQUE INDEX CONTENT_RESOURCE_BB_DEL_INDEX ON CONTENT_RESOURCE_BB_DELETE
(
    RESOURCE_ID
);

