-----------------------------------------------------------------------------
-- CONTENT_ENTITY
-----------------------------------------------------------------------------
CREATE TABLE CONTENT_ENTITY
(
ENTITY_ID VARCHAR (1024) NOT NULL,
ENTITY_UUID VARCHAR (99),
ENTITY_KEY BIGINT NOT NULL,
IN_COLLECTION BIGINT,
RESOURCE_TYPE VARCHAR (99),
VERSION SMALLINT,
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,
CONSTRAINT CONTENT_ENTITY_INDEX UNIQUE (ENTITY_ID)
);
-----------------------------------------------------------------------------
-- CONTENT_ENTITY_GROUPS
-----------------------------------------------------------------------------
CREATE TABLE CONTENT_ENTITY_GROUPS
(
ENTITY_KEY BIGINT NOT NULL,
GROUP_ID VARCHAR (99)
);
-----------------------------------------------------------------------------
-- CONTENT_ENTITY_PROPERTIES
-----------------------------------------------------------------------------
CREATE TABLE CONTENT_ENTITY_PROPERTIES
(
ENTITY_KEY BIGINT NOT NULL,
ORDER_IN_LIST TINYINT,
PROPERTY_ID VARCHAR (255),
PROPERTY_VALUE LONGVARCHAR
);
-----------------------------------------------------------------------------
-- CONTENT_ENTITY_BODY_FILE
-----------------------------------------------------------------------------
CREATE TABLE CONTENT_ENTITY_BODY_FILE
(
ENTITY_KEY BIGINT NOT NULL,
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,
);
-----------------------------------------------------------------------------
-- CREATE ROOT COLLECTIONS
-----------------------------------------------------------------------------
INSERT INTO CONTENT_COLLECTION VALUES ('/','',1,0,'folder',0,'root','2002-04-01 00:00:00','admin','2002-04-01 00:00:00','admin','inherited',false,null,null,false,0);
INSERT INTO CONTENT_COLLECTION VALUES ('group','',2,1,'folder',0,'group','2002-04-01 00:00:00','admin','2002-04-01 00:00:00','admin','inherited',false,null,null,false,0);
INSERT INTO CONTENT_COLLECTION VALUES ('public','',3,1,'folder',0,'public','2002-04-01 00:00:00','admin','2002-04-01 00:00:00','admin','inherited',false,null,null,false,0);
INSERT INTO CONTENT_COLLECTION VALUES ('attachment','',4,1,'folder',0,'attachment','2002-04-01 00:00:00','admin','2002-04-01 00:00:00','admin','inherited',false,null,null,false,0);
INSERT INTO CONTENT_COLLECTION VALUES ('user','',5,1,'folder',0,'user','2002-04-01 00:00:00','admin','2002-04-01 00:00:00','admin','inherited',false,null,null,false,0);
INSERT INTO CONTENT_COLLECTION VALUES ('group-user','',6,1,'folder',0,'group-user','2002-04-01 00:00:00','admin','2002-04-01 00:00:00','admin','inherited',false,null,null,false,0);