Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
No Format
-----------------------------------------------------------------------------
-- CONTENT_ENTITY
-----------------------------------------------------------------------------

CREATE TABLE CONTENT_ENTITY 
(
	ENTITY_UUID VARCHAR (36) NOT NULL,
	VERSION SMALLINT,
	ENTITY_ID VARCHAR (255) NOT NULL,
	ENTITY_PATH VARCHAR (4096) NOT NULL,
	IN_COLLECTION VARCHAR (25536),
	RESOURCE_TYPE VARCHAR (99),
	-- DISPLAY_NAME VARCHAR (1024),	
	CREATED_TIME TIMESTAMP,
	CREATED_BY VARCHAR (99),
	MODIFIED_TIME TIMESTAMP,
	MODIFIED_BY VARCHAR (99),
	ACCESS_MODE VARCHAR (16),
	HIDDEN BOOLEAN,
	RELEASE_DATE DATETIME (0),
	RETRACT_DATE DATETIME (0),
	HAS_PRIORITY_SORT BOOLEAN,
	PRIORITY_SORT_ORDER SMALLINT,
	CHANGES VARCHAR (1024),
	
	CONSTRAINT CONTENT_ENTITY_INDEX UNIQUE (ENTITY_ID)
);

-----------------------------------------------------------------------------
-- CONTENT_ENTITY_VERSIONS
-----------------------------------------------------------------------------

CREATE TABLE CONTENT_ENTITY_VERSIONS 
(
	ENTITY_UUID VARCHAR (36) NOT NULL,
	VERSION SMALLINT,
	IN_COLLECTION VARCHAR (36),
	RESOURCE_TYPE VARCHAR (99),
	-- DISPLAY_NAME VARCHAR (1024),	
	-- CREATED_TIME TIMESTAMP,
	-- CREATED_BY VARCHAR (99),
	MODIFIED_TIME TIMESTAMP,
	MODIFIED_BY VARCHAR (99),
	ACCESS_MODE VARCHAR (16),
	HIDDEN BOOLEAN,
	RELEASE_DATE DATETIME (0),
	RETRACT_DATE DATETIME (0),
	HAS_PRIORITY_SORT BOOLEAN,
	PRIORITY_SORT_ORDER SMALLINT,
	CHANGES VARCHAR (1024),
	
	CONSTRAINT CONTENT_ENTITY_INDEX UNIQUE (ENTITY_ID)
);

-----------------------------------------------------------------------------
-- CONTENT_ENTITY_GROUPS
-----------------------------------------------------------------------------

CREATE TABLE CONTENT_ENTITY_GROUPS 
(
	ENTITY_UUID VARCHAR (36),
	VERSION SMALLINT,
	GROUP_ID VARCHAR (99)
);

-----------------------------------------------------------------------------
-- CONTENT_ENTITY_PROPERTIES
-----------------------------------------------------------------------------

CREATE TABLE CONTENT_ENTITY_PROPERTIES 
(
	ENTITY_UUID VARCHAR (36),
	VERSION SMALLINT,
	ORDER_IN_LIST TINYINT,
	PROPERTY_ID VARCHAR (255),
	PROPERTY_VALUE LONGVARCHAR
);

-----------------------------------------------------------------------------
-- CONTENT_ENTITY_BODY_FILE
-----------------------------------------------------------------------------

CREATE TABLE CONTENT_ENTITY_BODY_FILE 
(
	ENTITY_UUID VARCHAR (36),
	VERSION SMALLINT,
	FILE_PATH VARCHAR (128)
);

-----------------------------------------------------------------------------
-- CONTENT_ENTITY_BODY_BINARY
-----------------------------------------------------------------------------

CREATE TABLE CONTENT_ENTITY_BODY_BINARY
(
    	ENTITY_KEY BIGINT NOT NULL,
	VERSION SMALLINT,
    	BODY BINARY
);