Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated some of SQL scripts

  • Loading branch information...
commit 3191018eb2099cc928d616c9e93857e0b6dec519 1 parent cd2223b
@goshoo authored
Showing with 2,012 additions and 40 deletions.
  1. +13 −0 webapp/setup/database/derby/create_tables.sql
  2. +3 −0  webapp/setup/database/derby/drop_tables.sql
  3. +376 −0 webapp/setup/database/empress/create_tables.sql
  4. +3 −0  webapp/setup/database/empress/drop_tables.sql
  5. +13 −0 webapp/setup/database/firebird/create_tables.sql
  6. +3 −0  webapp/setup/database/firebird/drop_tables.sql
  7. +377 −0 webapp/setup/database/h2/create_tables.sql
  8. +4 −1 webapp/setup/database/h2/drop_tables.sql
  9. +377 −0 webapp/setup/database/informix/create_tables.sql
  10. +4 −1 webapp/setup/database/informix/drop_tables.sql
  11. +6 −0 webapp/setup/database/ingres/create_tables.sql
  12. +4 −1 webapp/setup/database/ingres/drop_tables.sql
  13. +13 −0 webapp/setup/database/interbase/create_tables.sql
  14. +4 −1 webapp/setup/database/interbase/drop_tables.sql
  15. +377 −0 webapp/setup/database/intersystemscache/create_tables.sql
  16. +4 −1 webapp/setup/database/intersystemscache/drop_tables.sql
  17. +377 −0 webapp/setup/database/jdatastore/create_tables.sql
  18. +4 −1 webapp/setup/database/jdatastore/drop_tables.sql
  19. +13 −0 webapp/setup/database/sybase/create_tables.sql
  20. +37 −34 webapp/setup/database/sybase/drop_tables.sql
View
13 webapp/setup/database/derby/create_tables.sql
@@ -21,6 +21,19 @@ CREATE INDEX CMS_CONTENTS_04_IDX ON CMS_CONTENTS (PUBLISH_TAG_TO);
CREATE INDEX CMS_CONTENTS_05_IDX ON CMS_CONTENTS (RESOURCE_ID, ONLINE_FLAG);
-- -----------------------------------------------------------------------
+-- CMS_COUNTERS
+-- -----------------------------------------------------------------------
+
+CREATE TABLE CMS_COUNTERS
+(
+ NAME VARCHAR(255) NOT NULL,
+ COUNTER INTEGER NOT NULL,
+ PRIMARY KEY (NAME)
+);
+
+CREATE UNIQUE INDEX PK_COUNTERS ON CMS_COUNTERS (NAME);
+
+-- -----------------------------------------------------------------------
-- CMS_GROUPS
-- -----------------------------------------------------------------------
View
3  webapp/setup/database/derby/drop_tables.sql
@@ -32,3 +32,6 @@ DROP TABLE CMS_STATICEXPORT_LINKS ;
DROP TABLE CMS_SUBSCRIPTION;
DROP TABLE CMS_SUBSCRIPTION_VISIT;
DROP TABLE CMS_LOG;
+DROP TABLE CMS_COUNTERS;
+DROP TABLE CMS_OFFLINE_URLNAME_MAPPINGS;
+DROP TABLE CMS_ONLINE_URLNAME_MAPPINGS;
View
376 webapp/setup/database/empress/create_tables.sql
@@ -0,0 +1,376 @@
+CREATE TABLE CMS_CONTENTS (
+ PUBLISH_TAG_FROM INTEGER NOT NULL,
+ RESOURCE_ID CHARACTER(36) NOT NULL,
+ FILE_CONTENT BULK,
+ ONLINE_FLAG INTEGER,
+ PUBLISH_TAG_TO INTEGER,
+ PRIMARY KEY (PUBLISH_TAG_FROM, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_COUNTERS (
+ NAME CHARACTER(255) NOT NULL,
+ COUNTER INTEGER, PRIMARY KEY (NAME)
+);
+
+CREATE TABLE CMS_GROUPS (
+ GROUP_ID CHARACTER(36) NOT NULL,
+ GROUP_DESCRIPTION CHARACTER(255) NOT NULL,
+ GROUP_FLAGS INTEGER,
+ GROUP_NAME CHARACTER(128) NOT NULL,
+ GROUP_OU CHARACTER(128) NOT NULL,
+ PARENT_GROUP_ID CHARACTER(36) NOT NULL,
+ PRIMARY KEY (GROUP_ID),
+ CONSTRAINT UK_GROUPS UNIQUE (GROUP_NAME, GROUP_OU)
+);
+
+CREATE TABLE CMS_GROUPUSERS (
+ GROUP_ID CHARACTER(36) NOT NULL,
+ USER_ID CHARACTER(36) NOT NULL,
+ GROUPUSER_FLAGS INTEGER,
+ PRIMARY KEY (GROUP_ID, USER_ID)
+);
+
+CREATE TABLE CMS_HISTORY_PRINCIPALS (
+ PRINCIPAL_ID CHARACTER(36) NOT NULL,
+ PRINCIPAL_DATEDELETED DECIMAL(38),
+ PRINCIPAL_DESCRIPTION CHARACTER(255) NOT NULL,
+ PRINCIPAL_EMAIL CHARACTER(128) NOT NULL,
+ PRINCIPAL_NAME CHARACTER(128) NOT NULL,
+ PRINCIPAL_OU CHARACTER(128),
+ PRINCIPAL_TYPE CHARACTER(5) NOT NULL,
+ PRINCIPAL_USERDELETED CHARACTER(36) NOT NULL,
+ PRIMARY KEY (PRINCIPAL_ID)
+);
+
+CREATE TABLE CMS_HISTORY_PROJECTRESOURCES (
+ PROJECT_ID CHARACTER(36) NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_PATH CHARACTER(1024) NOT NULL,
+ PRIMARY KEY (PROJECT_ID, PUBLISH_TAG, RESOURCE_PATH)
+);
+
+CREATE TABLE CMS_HISTORY_PROJECTS (
+ PUBLISH_TAG INTEGER NOT NULL,
+ DATE_CREATED DECIMAL(38),
+ GROUP_ID CHARACTER(36) NOT NULL,
+ MANAGERGROUP_ID CHARACTER(36) NOT NULL,
+ PROJECT_DESCRIPTION CHARACTER(255) NOT NULL,
+ PROJECT_ID CHARACTER(36) NOT NULL,
+ PROJECT_NAME CHARACTER(255) NOT NULL,
+ PROJECT_OU CHARACTER(128) NOT NULL,
+ PROJECT_PUBLISHDATE DECIMAL(38),
+ PROJECT_PUBLISHED_BY CHARACTER(36) NOT NULL,
+ PROJECT_TYPE INTEGER, USER_ID CHARACTER(36) NOT NULL,
+ PRIMARY KEY (PUBLISH_TAG)
+);
+
+CREATE TABLE CMS_HISTORY_PROPERTIES (
+ PROPERTYDEF_ID CHARACTER(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ STRUCTURE_ID CHARACTER(36) NOT NULL,
+ PROPERTY_MAPPING_ID CHARACTER(36) NOT NULL,
+ PROPERTY_VALUE CHARACTER(2048) NOT NULL,
+ PRIMARY KEY (PROPERTYDEF_ID, PROPERTY_MAPPING_TYPE, PUBLISH_TAG, STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_HISTORY_PROPERTYDEF (
+ PROPERTYDEF_ID CHARACTER(36) NOT NULL,
+ PROPERTYDEF_NAME CHARACTER(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID)
+);
+
+CREATE TABLE CMS_HISTORY_RESOURCES (
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_ID CHARACTER(36) NOT NULL,
+ DATE_CONTENT DECIMAL(38),
+ DATE_CREATED DECIMAL(38),
+ DATE_LASTMODIFIED DECIMAL(38),
+ PROJECT_LASTMODIFIED CHARACTER(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED CHARACTER(36) NOT NULL,
+ USER_LASTMODIFIED CHARACTER(36) NOT NULL,
+ PRIMARY KEY (PUBLISH_TAG, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_HISTORY_STRUCTURE (
+ PUBLISH_TAG INTEGER NOT NULL,
+ STRUCTURE_ID CHARACTER(36) NOT NULL,
+ VERSION INTEGER NOT NULL,
+ DATE_EXPIRED DECIMAL(38),
+ DATE_RELEASED DECIMAL(38),
+ PARENT_ID CHARACTER(36) NOT NULL,
+ RESOURCE_ID CHARACTER(36) NOT NULL,
+ RESOURCE_PATH CHARACTER(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (PUBLISH_TAG, STRUCTURE_ID, VERSION)
+);
+
+CREATE TABLE CMS_LOG (
+ LOG_DATE DECIMAL(38) NOT NULL,
+ LOG_TYPE INTEGER NOT NULL,
+ USER_ID CHARACTER(36) NOT NULL,
+ LOG_DATA CHARACTER(1024),
+ STRUCTURE_ID CHARACTER(36),
+ PRIMARY KEY (LOG_DATE, LOG_TYPE, USER_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_ACCESSCONTROL (
+ PRINCIPAL_ID CHARACTER(36) NOT NULL,
+ RESOURCE_ID CHARACTER(36) NOT NULL,
+ ACCESS_ALLOWED INTEGER,
+ ACCESS_DENIED INTEGER,
+ ACCESS_FLAGS INTEGER,
+ PRIMARY KEY (PRINCIPAL_ID, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_CONTENTS (
+ RESOURCE_ID CHARACTER(36) NOT NULL,
+ FILE_CONTENT BULK,
+ PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_PROPERTIES (
+ PROPERTY_ID CHARACTER(36) NOT NULL,
+ PROPERTYDEF_ID CHARACTER(36) NOT NULL,
+ PROPERTY_MAPPING_ID CHARACTER(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER,
+ PROPERTY_VALUE CHARACTER(2048) NOT NULL,
+ PRIMARY KEY (PROPERTY_ID),
+ CONSTRAINT UK_OFFLINE_PROPERTIES UNIQUE (PROPERTYDEF_ID, PROPERTY_MAPPING_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_PROPERTYDEF (
+ PROPERTYDEF_ID CHARACTER(36) NOT NULL,
+ PROPERTYDEF_NAME CHARACTER(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID),
+ CONSTRAINT UK_OFFLINE_PROPERTYDEF UNIQUE (PROPERTYDEF_NAME)
+);
+
+CREATE TABLE CMS_OFFLINE_RESOURCES (
+ RESOURCE_ID CHARACTER(36) NOT NULL,
+ DATE_CONTENT DECIMAL(38),
+ DATE_CREATED DECIMAL(38),
+ DATE_LASTMODIFIED DECIMAL(38),
+ PROJECT_LASTMODIFIED CHARACTER(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED CHARACTER(36) NOT NULL,
+ USER_LASTMODIFIED CHARACTER(36) NOT NULL,
+ PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_RESOURCE_RELATIONS (
+ RELATION_SOURCE_ID CHARACTER(36) NOT NULL,
+ RELATION_SOURCE_PATH CHARACTER(1024) NOT NULL,
+ RELATION_TARGET_ID CHARACTER(36) NOT NULL,
+ RELATION_TARGET_PATH CHARACTER(1024) NOT NULL,
+ RELATION_TYPE INTEGER NOT NULL
+);
+
+CREATE TABLE CMS_OFFLINE_STRUCTURE (
+ STRUCTURE_ID CHARACTER(36) NOT NULL,
+ DATE_EXPIRED DECIMAL(38),
+ DATE_RELEASED DECIMAL(38),
+ PARENT_ID CHARACTER(36) NOT NULL,
+ RESOURCE_ID CHARACTER(36) NOT NULL,
+ RESOURCE_PATH CHARACTER(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_URLNAME_MAPPINGS (
+ DATE_CHANGED DECIMAL(38) NOT NULL,
+ NAME CHARACTER(255) NOT NULL,
+ STATE INTEGER NOT NULL,
+ STRUCTURE_ID CHARACTER(36) NOT NULL,
+ LOCALE CHARACTER(10),
+ PRIMARY KEY (DATE_CHANGED, NAME, STATE, STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_ONLINE_ACCESSCONTROL (
+ PRINCIPAL_ID CHARACTER(36) NOT NULL,
+ RESOURCE_ID CHARACTER(36) NOT NULL,
+ ACCESS_ALLOWED INTEGER,
+ ACCESS_DENIED INTEGER,
+ ACCESS_FLAGS INTEGER,
+ PRIMARY KEY (PRINCIPAL_ID, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_ONLINE_PROPERTIES (
+ PROPERTY_ID CHARACTER(36) NOT NULL,
+ PROPERTYDEF_ID CHARACTER(36) NOT NULL,
+ PROPERTY_MAPPING_ID CHARACTER(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER,
+ PROPERTY_VALUE CHARACTER(2048) NOT NULL,
+ PRIMARY KEY (PROPERTY_ID),
+ CONSTRAINT UK_ONLINE_PROPERTIES UNIQUE (PROPERTYDEF_ID, PROPERTY_MAPPING_ID)
+);
+
+CREATE TABLE CMS_ONLINE_PROPERTYDEF (
+ PROPERTYDEF_ID CHARACTER(36) NOT NULL,
+ PROPERTYDEF_NAME CHARACTER(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID),
+ CONSTRAINT UK_ONLINE_PROPERTYDEF UNIQUE (PROPERTYDEF_NAME)
+);
+
+CREATE TABLE CMS_ONLINE_RESOURCES (
+ RESOURCE_ID CHARACTER(36) NOT NULL,
+ DATE_CONTENT DECIMAL(38),
+ DATE_CREATED DECIMAL(38),
+ DATE_LASTMODIFIED DECIMAL(38),
+ PROJECT_LASTMODIFIED CHARACTER(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED CHARACTER(36) NOT NULL,
+ USER_LASTMODIFIED CHARACTER(36) NOT NULL,
+ PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE CMS_ONLINE_RESOURCE_RELATIONS (
+ RELATION_SOURCE_ID CHARACTER(36) NOT NULL,
+ RELATION_SOURCE_PATH CHARACTER(1024) NOT NULL,
+ RELATION_TARGET_ID CHARACTER(36) NOT NULL,
+ RELATION_TARGET_PATH CHARACTER(1024) NOT NULL,
+ RELATION_TYPE INTEGER NOT NULL
+);
+
+CREATE TABLE CMS_ONLINE_STRUCTURE (
+ STRUCTURE_ID CHARACTER(36) NOT NULL,
+ DATE_EXPIRED DECIMAL(38),
+ DATE_RELEASED DECIMAL(38),
+ PARENT_ID CHARACTER(36) NOT NULL,
+ RESOURCE_ID CHARACTER(36) NOT NULL,
+ RESOURCE_PATH CHARACTER(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_ONLINE_URLNAME_MAPPINGS (
+ DATE_CHANGED DECIMAL(38) NOT NULL,
+ NAME CHARACTER(255) NOT NULL,
+ STATE INTEGER NOT NULL,
+ STRUCTURE_ID CHARACTER(36) NOT NULL,
+ LOCALE CHARACTER(10)
+);
+
+CREATE TABLE CMS_PROJECTRESOURCES (
+ PROJECT_ID CHARACTER(36) NOT NULL,
+ RESOURCE_PATH CHARACTER(1024) NOT NULL,
+ PRIMARY KEY (PROJECT_ID, RESOURCE_PATH)
+);
+
+CREATE TABLE CMS_PROJECTS (
+ PROJECT_ID CHARACTER(36) NOT NULL,
+ DATE_CREATED DECIMAL(38),
+ GROUP_ID CHARACTER(36) NOT NULL,
+ MANAGERGROUP_ID CHARACTER(36) NOT NULL,
+ PROJECT_DESCRIPTION CHARACTER(255) NOT NULL,
+ PROJECT_FLAGS INTEGER,
+ PROJECT_NAME CHARACTER(200) NOT NULL,
+ PROJECT_OU CHARACTER(128) NOT NULL,
+ PROJECT_TYPE INTEGER,
+ USER_ID CHARACTER(36) NOT NULL,
+ PRIMARY KEY (PROJECT_ID),
+ CONSTRAINT uk_projects UNIQUE (PROJECT_OU, PROJECT_NAME, DATE_CREATED)
+);
+
+CREATE TABLE CMS_PUBLISH_HISTORY (
+ HISTORY_ID CHARACTER(36) NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_PATH CHARACTER(1024) NOT NULL,
+ STRUCTURE_ID CHARACTER(36) NOT NULL,
+ RESOURCE_ID CHARACTER(36) NOT NULL,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ SIBLING_COUNT INTEGER,
+ PRIMARY KEY (HISTORY_ID, PUBLISH_TAG, RESOURCE_PATH, STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_PUBLISH_JOBS (
+ HISTORY_ID CHARACTER(36) NOT NULL,
+ ENQUEUE_TIME DECIMAL(38),
+ FINISH_TIME DECIMAL(38),
+ PROJECT_ID CHARACTER(36) NOT NULL,
+ PROJECT_NAME CHARACTER(255) NOT NULL,
+ PUBLISH_FLAGS INTEGER,
+ PUBLISH_LIST BULK,
+ PUBLISH_LOCALE CHARACTER(16) NOT NULL,
+ PUBLISH_REPORT BULK,
+ RESOURCE_COUNT INTEGER,
+ START_TIME DECIMAL(38),
+ USER_ID CHARACTER(36) NOT NULL,
+ PRIMARY KEY (HISTORY_ID)
+);
+
+CREATE TABLE CMS_RESOURCE_LOCKS (
+ RESOURCE_PATH CHARACTER(1024) NOT NULL,
+ LOCK_TYPE INTEGER,
+ PROJECT_ID CHARACTER(36) NOT NULL,
+ USER_ID CHARACTER(36) NOT NULL
+);
+
+CREATE TABLE CMS_STATICEXPORT_LINKS (
+ LINK_ID CHARACTER(36) NOT NULL,
+ LINK_PARAMETER CHARACTER(1024),
+ LINK_RFS_PATH CHARACTER(1024),
+ LINK_TIMESTAMP DECIMAL(38),
+ LINK_TYPE INTEGER,
+ PRIMARY KEY (LINK_ID)
+);
+
+CREATE TABLE CMS_SUBSCRIPTION (
+ PRINCIPAL_ID CHARACTER(36) NOT NULL,
+ STRUCTURE_ID CHARACTER(36) NOT NULL,
+ DATE_DELETED DECIMAL(38),
+ PRIMARY KEY (PRINCIPAL_ID, STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_SUBSCRIPTION_VISIT (
+ USER_ID CHARACTER(36) NOT NULL,
+ VISIT_DATE DECIMAL(38) NOT NULL,
+ STRUCTURE_ID CHARACTER(36),
+ PRIMARY KEY (USER_ID, VISIT_DATE)
+);
+
+CREATE TABLE CMS_USERDATA (
+ DATA_KEY CHARACTER(255) NOT NULL,
+ USER_ID CHARACTER(36) NOT NULL,
+ DATA_TYPE CHARACTER(128) NOT NULL,
+ DATA_VALUE BULK,
+ PRIMARY KEY (DATA_KEY, USER_ID)
+);
+
+CREATE TABLE CMS_USERS (
+ USER_ID CHARACTER(36) NOT NULL,
+ USER_DATECREATED DECIMAL(38),
+ USER_EMAIL CHARACTER(128) NOT NULL,
+ USER_FIRSTNAME CHARACTER(128) NOT NULL,
+ USER_FLAGS INTEGER,
+ USER_LASTLOGIN DECIMAL(38),
+ USER_LASTNAME CHARACTER(128) NOT NULL,
+ USER_NAME CHARACTER(128) NOT NULL,
+ USER_OU CHARACTER(128) NOT NULL,
+ USER_PASSWORD CHARACTER(64) NOT NULL,
+ PRIMARY KEY (USER_ID),
+ CONSTRAINT UK_USERS UNIQUE (USER_NAME, USER_OU)
+);
View
3  webapp/setup/database/empress/drop_tables.sql
@@ -32,3 +32,6 @@ DROP TABLE CMS_STATICEXPORT_LINKS ;
DROP TABLE CMS_SUBSCRIPTION;
DROP TABLE CMS_SUBSCRIPTION_VISIT;
DROP TABLE CMS_LOG;
+DROP TABLE CMS_COUNTERS;
+DROP TABLE CMS_OFFLINE_URLNAME_MAPPINGS;
+DROP TABLE CMS_ONLINE_URLNAME_MAPPINGS;
View
13 webapp/setup/database/firebird/create_tables.sql
@@ -21,6 +21,19 @@ CREATE INDEX CMS_CONTENTS_04_IDX ON CMS_CONTENTS (PUBLISH_TAG_TO);
CREATE INDEX CMS_CONTENTS_05_IDX ON CMS_CONTENTS (RESOURCE_ID, ONLINE_FLAG);
/* ----------------------------------------------------------------------- */
+/* CMS_COUNTERS */
+/* ----------------------------------------------------------------------- */
+
+CREATE TABLE CMS_COUNTERS
+(
+ NAME VARCHAR(255) NOT NULL,
+ COUNTER INTEGER NOT NULL,
+ PRIMARY KEY (NAME)
+);
+
+CREATE UNIQUE INDEX PK_COUNTERS ON CMS_COUNTERS (NAME);
+
+/* ----------------------------------------------------------------------- */
/* cms_groups */
/* ----------------------------------------------------------------------- */
View
3  webapp/setup/database/firebird/drop_tables.sql
@@ -32,3 +32,6 @@ DROP TABLE CMS_STATICEXPORT_LINKS ;
DROP TABLE CMS_SUBSCRIPTION;
DROP TABLE CMS_SUBSCRIPTION_VISIT;
DROP TABLE CMS_LOG;
+DROP TABLE CMS_COUNTERS;
+DROP TABLE CMS_OFFLINE_URLNAME_MAPPINGS;
+DROP TABLE CMS_ONLINE_URLNAME_MAPPINGS;
View
377 webapp/setup/database/h2/create_tables.sql
@@ -0,0 +1,377 @@
+CREATE TABLE CMS_CONTENTS (
+ PUBLISH_TAG_FROM INTEGER NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ FILE_CONTENT BLOB,
+ ONLINE_FLAG INTEGER,
+ PUBLISH_TAG_TO INTEGER,
+ PRIMARY KEY (PUBLISH_TAG_FROM, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_COUNTERS (
+ NAME VARCHAR(255) NOT NULL,
+ COUNTER INTEGER,
+ PRIMARY KEY (NAME)
+);
+
+CREATE TABLE CMS_GROUPS (
+ GROUP_ID VARCHAR(36) NOT NULL,
+ GROUP_DESCRIPTION VARCHAR(255) NOT NULL,
+ GROUP_FLAGS INTEGER,
+ GROUP_NAME VARCHAR(128) NOT NULL,
+ GROUP_OU VARCHAR(128) NOT NULL,
+ PARENT_GROUP_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (GROUP_ID),
+ CONSTRAINT UK_GROUPS UNIQUE (GROUP_NAME, GROUP_OU)
+);
+
+CREATE TABLE CMS_GROUPUSERS (
+ GROUP_ID VARCHAR(36) NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL,
+ GROUPUSER_FLAGS INTEGER,
+ PRIMARY KEY (GROUP_ID, USER_ID)
+);
+
+CREATE TABLE CMS_HISTORY_PRINCIPALS (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ PRINCIPAL_DATEDELETED BIGINT,
+ PRINCIPAL_DESCRIPTION VARCHAR(255) NOT NULL,
+ PRINCIPAL_EMAIL VARCHAR(128) NOT NULL,
+ PRINCIPAL_NAME VARCHAR(128) NOT NULL,
+ PRINCIPAL_OU VARCHAR(128),
+ PRINCIPAL_TYPE VARCHAR(5) NOT NULL,
+ PRINCIPAL_USERDELETED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PRINCIPAL_ID)
+);
+
+CREATE TABLE CMS_HISTORY_PROJECTRESOURCES (
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_PATH VARCHAR(1024) NOT NULL,
+ PRIMARY KEY (PROJECT_ID, PUBLISH_TAG, RESOURCE_PATH)
+);
+
+CREATE TABLE CMS_HISTORY_PROJECTS (
+ PUBLISH_TAG INTEGER NOT NULL,
+ DATE_CREATED BIGINT,
+ GROUP_ID VARCHAR(36) NOT NULL,
+ MANAGERGROUP_ID VARCHAR(36) NOT NULL,
+ PROJECT_DESCRIPTION VARCHAR(255) NOT NULL,
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ PROJECT_NAME VARCHAR(255) NOT NULL,
+ PROJECT_OU VARCHAR(128) NOT NULL,
+ PROJECT_PUBLISHDATE BIGINT,
+ PROJECT_PUBLISHED_BY VARCHAR(36) NOT NULL,
+ PROJECT_TYPE INTEGER,
+ USER_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PUBLISH_TAG)
+);
+
+CREATE TABLE CMS_HISTORY_PROPERTIES (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_ID VARCHAR(36) NOT NULL,
+ PROPERTY_VALUE VARCHAR(2048) NOT NULL,
+ PRIMARY KEY (PROPERTYDEF_ID, PROPERTY_MAPPING_TYPE, PUBLISH_TAG, STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_HISTORY_PROPERTYDEF (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_NAME VARCHAR(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID)
+);
+
+CREATE TABLE CMS_HISTORY_RESOURCES (
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ DATE_CONTENT BIGINT,
+ DATE_CREATED BIGINT,
+ DATE_LASTMODIFIED BIGINT,
+ PROJECT_LASTMODIFIED VARCHAR(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED VARCHAR(36) NOT NULL,
+ USER_LASTMODIFIED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PUBLISH_TAG, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_HISTORY_STRUCTURE (
+ PUBLISH_TAG INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ VERSION INTEGER NOT NULL,
+ DATE_EXPIRED BIGINT,
+ DATE_RELEASED BIGINT,
+ PARENT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH VARCHAR(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (PUBLISH_TAG, STRUCTURE_ID, VERSION)
+);
+
+CREATE TABLE CMS_LOG (
+ LOG_DATE BIGINT NOT NULL,
+ LOG_TYPE INTEGER NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL,
+ LOG_DATA VARCHAR(1024),
+ STRUCTURE_ID VARCHAR(36),
+ PRIMARY KEY (LOG_DATE, LOG_TYPE, USER_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_ACCESSCONTROL (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ ACCESS_ALLOWED INTEGER,
+ ACCESS_DENIED INTEGER,
+ ACCESS_FLAGS INTEGER,
+ PRIMARY KEY (PRINCIPAL_ID, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_CONTENTS (
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ FILE_CONTENT BLOB,
+ PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_PROPERTIES (
+ PROPERTY_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER,
+ PROPERTY_VALUE VARCHAR(2048) NOT NULL,
+ PRIMARY KEY (PROPERTY_ID),
+ CONSTRAINT UK_OFFLINE_PROPERTIES UNIQUE (PROPERTYDEF_ID, PROPERTY_MAPPING_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_PROPERTYDEF (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_NAME VARCHAR(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID),
+ CONSTRAINT UK_OFFLINE_PROPERTYDEF UNIQUE (PROPERTYDEF_NAME)
+);
+
+CREATE TABLE CMS_OFFLINE_RESOURCES (
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ DATE_CONTENT BIGINT,
+ DATE_CREATED BIGINT,
+ DATE_LASTMODIFIED BIGINT,
+ PROJECT_LASTMODIFIED VARCHAR(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED VARCHAR(36) NOT NULL,
+ USER_LASTMODIFIED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_RESOURCE_RELATIONS (
+ RELATION_SOURCE_ID VARCHAR(36) NOT NULL,
+ RELATION_SOURCE_PATH VARCHAR(1024) NOT NULL,
+ RELATION_TARGET_ID VARCHAR(36) NOT NULL,
+ RELATION_TARGET_PATH VARCHAR(1024) NOT NULL,
+ RELATION_TYPE INTEGER NOT NULL
+);
+
+CREATE TABLE CMS_OFFLINE_STRUCTURE (
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ DATE_EXPIRED BIGINT,
+ DATE_RELEASED BIGINT,
+ PARENT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH VARCHAR(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_URLNAME_MAPPINGS (
+ DATE_CHANGED BIGINT NOT NULL,
+ NAME VARCHAR(255) NOT NULL,
+ STATE INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ LOCALE VARCHAR(10)
+);
+
+CREATE TABLE CMS_ONLINE_ACCESSCONTROL (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ ACCESS_ALLOWED INTEGER,
+ ACCESS_DENIED INTEGER,
+ ACCESS_FLAGS INTEGER,
+ PRIMARY KEY (PRINCIPAL_ID, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_ONLINE_PROPERTIES (
+ PROPERTY_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER,
+ PROPERTY_VALUE VARCHAR(2048) NOT NULL,
+ PRIMARY KEY (PROPERTY_ID),
+ CONSTRAINT UK_ONLINE_PROPERTIES UNIQUE (PROPERTYDEF_ID, PROPERTY_MAPPING_ID)
+);
+
+CREATE TABLE CMS_ONLINE_PROPERTYDEF (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_NAME VARCHAR(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID),
+ CONSTRAINT UK_ONLINE_PROPERTYDEF UNIQUE (PROPERTYDEF_NAME)
+);
+
+CREATE TABLE CMS_ONLINE_RESOURCES (
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ DATE_CONTENT BIGINT,
+ DATE_CREATED BIGINT,
+ DATE_LASTMODIFIED BIGINT,
+ PROJECT_LASTMODIFIED VARCHAR(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED VARCHAR(36) NOT NULL,
+ USER_LASTMODIFIED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE CMS_ONLINE_RESOURCE_RELATIONS (
+ RELATION_SOURCE_ID VARCHAR(36) NOT NULL,
+ RELATION_SOURCE_PATH VARCHAR(1024) NOT NULL,
+ RELATION_TARGET_ID VARCHAR(36) NOT NULL,
+ RELATION_TARGET_PATH VARCHAR(1024) NOT NULL,
+ RELATION_TYPE INTEGER NOT NULL
+);
+
+CREATE TABLE CMS_ONLINE_STRUCTURE (
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ DATE_EXPIRED BIGINT,
+ DATE_RELEASED BIGINT,
+ PARENT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH VARCHAR(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_ONLINE_URLNAME_MAPPINGS (
+ DATE_CHANGED BIGINT NOT NULL,
+ NAME VARCHAR(255) NOT NULL,
+ STATE INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ LOCALE VARCHAR(10)
+);
+
+CREATE TABLE CMS_PROJECTRESOURCES (
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH VARCHAR(1024) NOT NULL,
+ PRIMARY KEY (PROJECT_ID, RESOURCE_PATH)
+);
+
+CREATE TABLE CMS_PROJECTS (
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ DATE_CREATED BIGINT,
+ GROUP_ID VARCHAR(36) NOT NULL,
+ MANAGERGROUP_ID VARCHAR(36) NOT NULL,
+ PROJECT_DESCRIPTION VARCHAR(255) NOT NULL,
+ PROJECT_FLAGS INTEGER,
+ PROJECT_NAME VARCHAR(200) NOT NULL,
+ PROJECT_OU VARCHAR(128) NOT NULL,
+ PROJECT_TYPE INTEGER,
+ USER_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PROJECT_ID),
+ CONSTRAINT UK_PROJECTS UNIQUE (PROJECT_OU, PROJECT_NAME, DATE_CREATED)
+);
+
+CREATE TABLE CMS_PUBLISH_HISTORY (
+ HISTORY_ID VARCHAR(36) NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_PATH VARCHAR(1024) NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ SIBLING_COUNT INTEGER,
+ PRIMARY KEY (HISTORY_ID, PUBLISH_TAG, RESOURCE_PATH, STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_PUBLISH_JOBS (
+ HISTORY_ID VARCHAR(36) NOT NULL,
+ ENQUEUE_TIME BIGINT,
+ FINISH_TIME BIGINT,
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ PROJECT_NAME VARCHAR(255) NOT NULL,
+ PUBLISH_FLAGS INTEGER,
+ PUBLISH_LIST BLOB,
+ PUBLISH_LOCALE VARCHAR(16) NOT NULL,
+ PUBLISH_REPORT BLOB,
+ RESOURCE_COUNT INTEGER,
+ START_TIME BIGINT,
+ USER_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (HISTORY_ID)
+);
+
+CREATE TABLE CMS_RESOURCE_LOCKS (
+ RESOURCE_PATH VARCHAR(1024) NOT NULL,
+ LOCK_TYPE INTEGER,
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL
+);
+
+CREATE TABLE CMS_STATICEXPORT_LINKS (
+ LINK_ID VARCHAR(36) NOT NULL,
+ LINK_PARAMETER VARCHAR(1024),
+ LINK_RFS_PATH VARCHAR(1024),
+ LINK_TIMESTAMP BIGINT,
+ LINK_TYPE INTEGER,
+ PRIMARY KEY (LINK_ID)
+);
+
+CREATE TABLE CMS_SUBSCRIPTION (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ DATE_DELETED BIGINT,
+ PRIMARY KEY (PRINCIPAL_ID, STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_SUBSCRIPTION_VISIT (
+ USER_ID VARCHAR(36) NOT NULL,
+ VISIT_DATE BIGINT NOT NULL,
+ STRUCTURE_ID VARCHAR(36),
+ PRIMARY KEY (USER_ID, VISIT_DATE)
+);
+
+CREATE TABLE CMS_USERDATA (
+ DATA_KEY VARCHAR(255) NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL,
+ DATA_TYPE VARCHAR(128) NOT NULL,
+ DATA_VALUE BLOB,
+ PRIMARY KEY (DATA_KEY, USER_ID)
+);
+
+CREATE TABLE CMS_USERS (
+ USER_ID VARCHAR(36) NOT NULL,
+ USER_DATECREATED BIGINT,
+ USER_EMAIL VARCHAR(128) NOT NULL,
+ USER_FIRSTNAME VARCHAR(128) NOT NULL,
+ USER_FLAGS INTEGER,
+ USER_LASTLOGIN BIGINT,
+ USER_LASTNAME VARCHAR(128) NOT NULL,
+ USER_NAME VARCHAR(128) NOT NULL,
+ USER_OU VARCHAR(128) NOT NULL,
+ USER_PASSWORD VARCHAR(64) NOT NULL,
+ PRIMARY KEY (USER_ID),
+ CONSTRAINT UK_USERS UNIQUE (USER_NAME, USER_OU)
+);
View
5 webapp/setup/database/h2/drop_tables.sql
@@ -31,4 +31,7 @@ DROP TABLE CMS_CONTENTS;
DROP TABLE CMS_STATICEXPORT_LINKS ;
DROP TABLE CMS_SUBSCRIPTION;
DROP TABLE CMS_SUBSCRIPTION_VISIT;
-DROP TABLE CMS_LOG;
+DROP TABLE CMS_LOG;
+DROP TABLE CMS_COUNTERS;
+DROP TABLE CMS_OFFLINE_URLNAME_MAPPINGS;
+DROP TABLE CMS_ONLINE_URLNAME_MAPPINGS;
View
377 webapp/setup/database/informix/create_tables.sql
@@ -0,0 +1,377 @@
+CREATE TABLE CMS_CONTENTS (
+ PUBLISH_TAG_FROM INTEGER NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ FILE_CONTENT BYTE,
+ ONLINE_FLAG INTEGER,
+ PUBLISH_TAG_TO INTEGER,
+ PRIMARY KEY (PUBLISH_TAG_FROM, RESOURCE_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_COUNTERS (
+ NAME VARCHAR(255) NOT NULL,
+ COUNTER INTEGER,
+ PRIMARY KEY (NAME)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_GROUPS (
+ GROUP_ID VARCHAR(36) NOT NULL,
+ GROUP_DESCRIPTION VARCHAR(255) NOT NULL,
+ GROUP_FLAGS INTEGER,
+ GROUP_NAME VARCHAR(128) NOT NULL,
+ GROUP_OU VARCHAR(128) NOT NULL,
+ PARENT_GROUP_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (GROUP_ID),
+ UNIQUE (GROUP_NAME, GROUP_OU) CONSTRAINT UK_GROUPS
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_GROUPUSERS (
+ GROUP_ID VARCHAR(36) NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL,
+ GROUPUSER_FLAGS INTEGER,
+ PRIMARY KEY (GROUP_ID, USER_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_HISTORY_PRINCIPALS (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ PRINCIPAL_DATEDELETED NUMERIC(32,0),
+ PRINCIPAL_DESCRIPTION VARCHAR(255) NOT NULL,
+ PRINCIPAL_EMAIL VARCHAR(128) NOT NULL,
+ PRINCIPAL_NAME VARCHAR(128) NOT NULL,
+ PRINCIPAL_OU VARCHAR(128),
+ PRINCIPAL_TYPE VARCHAR(5) NOT NULL,
+ PRINCIPAL_USERDELETED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PRINCIPAL_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_HISTORY_PROJECTRESOURCES (
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_PATH LVARCHAR(1024) NOT NULL,
+ PRIMARY KEY (PROJECT_ID, PUBLISH_TAG, RESOURCE_PATH)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_HISTORY_PROJECTS (
+ PUBLISH_TAG INTEGER NOT NULL,
+ DATE_CREATED NUMERIC(32,0),
+ GROUP_ID VARCHAR(36) NOT NULL,
+ MANAGERGROUP_ID VARCHAR(36) NOT NULL,
+ PROJECT_DESCRIPTION VARCHAR(255) NOT NULL,
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ PROJECT_NAME VARCHAR(255) NOT NULL,
+ PROJECT_OU VARCHAR(128) NOT NULL,
+ PROJECT_PUBLISHDATE NUMERIC(32,0),
+ PROJECT_PUBLISHED_BY VARCHAR(36) NOT NULL,
+ PROJECT_TYPE INTEGER,
+ USER_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PUBLISH_TAG)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_HISTORY_PROPERTIES (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_ID VARCHAR(36) NOT NULL,
+ PROPERTY_VALUE LVARCHAR(2048) NOT NULL,
+ PRIMARY KEY (PROPERTYDEF_ID, PROPERTY_MAPPING_TYPE, PUBLISH_TAG, STRUCTURE_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_HISTORY_PROPERTYDEF (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_NAME VARCHAR(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_HISTORY_RESOURCES (
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ DATE_CONTENT NUMERIC(32,0),
+ DATE_CREATED NUMERIC(32,0),
+ DATE_LASTMODIFIED NUMERIC(32,0),
+ PROJECT_LASTMODIFIED VARCHAR(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED VARCHAR(36) NOT NULL,
+ USER_LASTMODIFIED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PUBLISH_TAG, RESOURCE_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_HISTORY_STRUCTURE (
+ PUBLISH_TAG INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ VERSION INTEGER NOT NULL,
+ DATE_EXPIRED NUMERIC(32,0),
+ DATE_RELEASED NUMERIC(32,0),
+ PARENT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH LVARCHAR(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (PUBLISH_TAG, STRUCTURE_ID, VERSION)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_LOG (
+ LOG_DATE NUMERIC(32,0) NOT NULL,
+ LOG_TYPE INTEGER NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL,
+ LOG_DATA LVARCHAR(1024),
+ STRUCTURE_ID VARCHAR(36),
+ PRIMARY KEY (LOG_DATE, LOG_TYPE, USER_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_OFFLINE_ACCESSCONTROL (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ ACCESS_ALLOWED INTEGER,
+ ACCESS_DENIED INTEGER,
+ ACCESS_FLAGS INTEGER,
+ PRIMARY KEY (PRINCIPAL_ID, RESOURCE_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_OFFLINE_CONTENTS (
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ FILE_CONTENT BYTE,
+ PRIMARY KEY (RESOURCE_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_OFFLINE_PROPERTIES (
+ PROPERTY_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER,
+ PROPERTY_VALUE LVARCHAR(2048) NOT NULL,
+ PRIMARY KEY (PROPERTY_ID),
+ UNIQUE (PROPERTYDEF_ID, PROPERTY_MAPPING_ID) CONSTRAINT UK_OFFLINE_PROPERTIES
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_OFFLINE_PROPERTYDEF (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_NAME VARCHAR(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID),
+ UNIQUE (PROPERTYDEF_NAME) CONSTRAINT UK_OFFLINE_PROPERTYDEF
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_OFFLINE_RESOURCES (
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ DATE_CONTENT NUMERIC(32,0),
+ DATE_CREATED NUMERIC(32,0),
+ DATE_LASTMODIFIED NUMERIC(32,0),
+ PROJECT_LASTMODIFIED VARCHAR(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED VARCHAR(36) NOT NULL,
+ USER_LASTMODIFIED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (RESOURCE_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_OFFLINE_RESOURCE_RELATIONS (
+ RELATION_SOURCE_ID VARCHAR(36) NOT NULL,
+ RELATION_SOURCE_PATH LVARCHAR(1024) NOT NULL,
+ RELATION_TARGET_ID VARCHAR(36) NOT NULL,
+ RELATION_TARGET_PATH LVARCHAR(1024) NOT NULL,
+ RELATION_TYPE INTEGER NOT NULL
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_OFFLINE_STRUCTURE (
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ DATE_EXPIRED NUMERIC(32,0),
+ DATE_RELEASED NUMERIC(32,0),
+ PARENT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH LVARCHAR(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (STRUCTURE_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_OFFLINE_URLNAME_MAPPINGS (
+ DATE_CHANGED NUMERIC(32,0) NOT NULL,
+ NAME VARCHAR(255) NOT NULL,
+ STATE INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ LOCALE VARCHAR(10)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_ONLINE_ACCESSCONTROL (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ ACCESS_ALLOWED INTEGER,
+ ACCESS_DENIED INTEGER,
+ ACCESS_FLAGS INTEGER,
+ PRIMARY KEY (PRINCIPAL_ID, RESOURCE_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_ONLINE_PROPERTIES (
+ PROPERTY_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER,
+ PROPERTY_VALUE LVARCHAR(2048) NOT NULL,
+ PRIMARY KEY (PROPERTY_ID),
+ UNIQUE (PROPERTYDEF_ID, PROPERTY_MAPPING_ID) CONSTRAINT UK_ONLINE_PROPERTIES
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_ONLINE_PROPERTYDEF (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_NAME VARCHAR(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID),
+ UNIQUE (PROPERTYDEF_NAME) CONSTRAINT UK_ONLINE_PROPERTYDEF
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_ONLINE_RESOURCES (
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ DATE_CONTENT NUMERIC(32,0),
+ DATE_CREATED NUMERIC(32,0),
+ DATE_LASTMODIFIED NUMERIC(32,0),
+ PROJECT_LASTMODIFIED VARCHAR(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED VARCHAR(36) NOT NULL,
+ USER_LASTMODIFIED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (RESOURCE_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_ONLINE_RESOURCE_RELATIONS (
+ RELATION_SOURCE_ID VARCHAR(36) NOT NULL,
+ RELATION_SOURCE_PATH LVARCHAR(1024) NOT NULL,
+ RELATION_TARGET_ID VARCHAR(36) NOT NULL,
+ RELATION_TARGET_PATH LVARCHAR(1024) NOT NULL,
+ RELATION_TYPE INTEGER NOT NULL
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_ONLINE_STRUCTURE (
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ DATE_EXPIRED NUMERIC(32,0),
+ DATE_RELEASED NUMERIC(32,0),
+ PARENT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH LVARCHAR(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (STRUCTURE_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_ONLINE_URLNAME_MAPPINGS (
+ DATE_CHANGED NUMERIC(32,0) NOT NULL,
+ NAME VARCHAR(255) NOT NULL,
+ STATE INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ LOCALE VARCHAR(10)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_PROJECTRESOURCES (
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH LVARCHAR(1024) NOT NULL,
+ PRIMARY KEY (PROJECT_ID, RESOURCE_PATH)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_PROJECTS (
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ DATE_CREATED NUMERIC(32,0),
+ GROUP_ID VARCHAR(36) NOT NULL,
+ MANAGERGROUP_ID VARCHAR(36) NOT NULL,
+ PROJECT_DESCRIPTION VARCHAR(255) NOT NULL,
+ PROJECT_FLAGS INTEGER,
+ PROJECT_NAME VARCHAR(200) NOT NULL,
+ PROJECT_OU VARCHAR(128) NOT NULL,
+ PROJECT_TYPE INTEGER,
+ USER_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PROJECT_ID),
+ UNIQUE (PROJECT_OU, PROJECT_NAME, DATE_CREATED) CONSTRAINT UK_PROJECTS
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_PUBLISH_HISTORY (
+ HISTORY_ID VARCHAR(36) NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_PATH LVARCHAR(1024) NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ SIBLING_COUNT INTEGER,
+ PRIMARY KEY (HISTORY_ID, PUBLISH_TAG, RESOURCE_PATH, STRUCTURE_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_PUBLISH_JOBS (
+ HISTORY_ID VARCHAR(36) NOT NULL,
+ ENQUEUE_TIME NUMERIC(32,0),
+ FINISH_TIME NUMERIC(32,0),
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ PROJECT_NAME VARCHAR(255) NOT NULL,
+ PUBLISH_FLAGS INTEGER,
+ PUBLISH_LIST BYTE,
+ PUBLISH_LOCALE VARCHAR(16) NOT NULL,
+ PUBLISH_REPORT BYTE,
+ RESOURCE_COUNT INTEGER,
+ START_TIME NUMERIC(32,0),
+ USER_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (HISTORY_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_RESOURCE_LOCKS (
+ RESOURCE_PATH LVARCHAR(1024) NOT NULL,
+ LOCK_TYPE INTEGER,
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_STATICEXPORT_LINKS (
+ LINK_ID VARCHAR(36) NOT NULL,
+ LINK_PARAMETER LVARCHAR(1024),
+ LINK_RFS_PATH LVARCHAR(1024),
+ LINK_TIMESTAMP NUMERIC(32,0),
+ LINK_TYPE INTEGER,
+ PRIMARY KEY (LINK_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_SUBSCRIPTION (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ DATE_DELETED NUMERIC(32,0),
+ PRIMARY KEY (PRINCIPAL_ID, STRUCTURE_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_SUBSCRIPTION_VISIT (
+ USER_ID VARCHAR(36) NOT NULL,
+ VISIT_DATE NUMERIC(32,0) NOT NULL,
+ STRUCTURE_ID VARCHAR(36),
+ PRIMARY KEY (USER_ID, VISIT_DATE)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_USERDATA (
+ DATA_KEY VARCHAR(255) NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL,
+ DATA_TYPE VARCHAR(128) NOT NULL,
+ DATA_VALUE BYTE,
+ PRIMARY KEY (DATA_KEY, USER_ID)
+) LOCK MODE ROW;
+
+CREATE TABLE CMS_USERS (
+ USER_ID VARCHAR(36) NOT NULL,
+ USER_DATECREATED NUMERIC(32,0),
+ USER_EMAIL VARCHAR(128) NOT NULL,
+ USER_FIRSTNAME VARCHAR(128) NOT NULL,
+ USER_FLAGS INTEGER,
+ USER_LASTLOGIN NUMERIC(32,0),
+ USER_LASTNAME VARCHAR(128) NOT NULL,
+ USER_NAME VARCHAR(128) NOT NULL,
+ USER_OU VARCHAR(128) NOT NULL,
+ USER_PASSWORD VARCHAR(64) NOT NULL,
+ PRIMARY KEY (USER_ID),
+ UNIQUE (USER_NAME, USER_OU) CONSTRAINT UK_USERS
+) LOCK MODE ROW;
View
5 webapp/setup/database/informix/drop_tables.sql
@@ -31,4 +31,7 @@ DROP TABLE CMS_CONTENTS;
DROP TABLE CMS_STATICEXPORT_LINKS ;
DROP TABLE CMS_SUBSCRIPTION;
DROP TABLE CMS_SUBSCRIPTION_VISIT;
-DROP TABLE CMS_LOG;
+DROP TABLE CMS_LOG;
+DROP TABLE CMS_COUNTERS;
+DROP TABLE CMS_OFFLINE_URLNAME_MAPPINGS;
+DROP TABLE CMS_ONLINE_URLNAME_MAPPINGS;
View
6 webapp/setup/database/ingres/create_tables.sql
@@ -7,6 +7,12 @@ CREATE TABLE CMS_CONTENTS (
PRIMARY KEY (PUBLISH_TAG_FROM, RESOURCE_ID)
);
+CREATE TABLE CMS_COUNTERS (
+ NAME VARCHAR(255) NOT NULL,
+ COUNTER INTEGER,
+ PRIMARY KEY (NAME)
+);
+
CREATE TABLE CMS_GROUPS (
GROUP_ID VARCHAR(36) NOT NULL,
GROUP_DESCRIPTION VARCHAR(255) NOT NULL,
View
5 webapp/setup/database/ingres/drop_tables.sql
@@ -31,4 +31,7 @@ DROP TABLE CMS_CONTENTS;
DROP TABLE CMS_STATICEXPORT_LINKS ;
DROP TABLE CMS_SUBSCRIPTION;
DROP TABLE CMS_SUBSCRIPTION_VISIT;
-DROP TABLE CMS_LOG;
+DROP TABLE CMS_LOG;
+DROP TABLE CMS_COUNTERS;
+DROP TABLE CMS_OFFLINE_URLNAME_MAPPINGS;
+DROP TABLE CMS_ONLINE_URLNAME_MAPPINGS;
View
13 webapp/setup/database/interbase/create_tables.sql
@@ -21,6 +21,19 @@ CREATE INDEX CMS_CONTENTS_04_IDX ON CMS_CONTENTS (PUBLISH_TAG_TO);
CREATE INDEX CMS_CONTENTS_05_IDX ON CMS_CONTENTS (RESOURCE_ID, ONLINE_FLAG);
/* ----------------------------------------------------------------------- */
+/* cms_counters */
+/* ----------------------------------------------------------------------- */
+
+CREATE TABLE CMS_COUNTERS
+(
+ NAME VARCHAR(255) NOT NULL,
+ COUNTER INTEGER NOT NULL,
+ PRIMARY KEY (NAME)
+);
+
+CREATE UNIQUE INDEX PK_COUNTERS ON CMS_COUNTERS (NAME);
+
+/* ----------------------------------------------------------------------- */
/* cms_groups */
/* ----------------------------------------------------------------------- */
View
5 webapp/setup/database/interbase/drop_tables.sql
@@ -31,4 +31,7 @@ DROP TABLE CMS_CONTENTS;
DROP TABLE CMS_STATICEXPORT_LINKS ;
DROP TABLE CMS_SUBSCRIPTION;
DROP TABLE CMS_SUBSCRIPTION_VISIT;
-DROP TABLE CMS_LOG;
+DROP TABLE CMS_LOG;
+DROP TABLE CMS_COUNTERS;
+DROP TABLE CMS_OFFLINE_URLNAME_MAPPINGS;
+DROP TABLE CMS_ONLINE_URLNAME_MAPPINGS;
View
377 webapp/setup/database/intersystemscache/create_tables.sql
@@ -0,0 +1,377 @@
+CREATE TABLE CMS_CONTENTS (
+ PUBLISH_TAG_FROM INTEGER NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ FILE_CONTENT LONGVARBINARY, O
+ NLINE_FLAG INTEGER,
+ PUBLISH_TAG_TO INTEGER,
+ PRIMARY KEY (PUBLISH_TAG_FROM, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_COUNTERS (
+ NAME VARCHAR(255) NOT NULL,
+ COUNTER INTEGER,
+ PRIMARY KEY (NAME)
+);
+
+CREATE TABLE CMS_GROUPS (
+ GROUP_ID VARCHAR(36) NOT NULL,
+ GROUP_DESCRIPTION VARCHAR(255) NOT NULL,
+ GROUP_FLAGS INTEGER,
+ GROUP_NAME VARCHAR(128) NOT NULL,
+ GROUP_OU VARCHAR(128) NOT NULL,
+ PARENT_GROUP_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (GROUP_ID),
+ CONSTRAINT UK_GROUPS UNIQUE (GROUP_NAME, GROUP_OU)
+);
+
+CREATE TABLE CMS_GROUPUSERS (
+ GROUP_ID VARCHAR(36) NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL,
+ GROUPUSER_FLAGS INTEGER,
+ PRIMARY KEY (GROUP_ID, USER_ID)
+);
+
+CREATE TABLE CMS_HISTORY_PRINCIPALS (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ PRINCIPAL_DATEDELETED NUMERIC,
+ PRINCIPAL_DESCRIPTION VARCHAR(255) NOT NULL,
+ PRINCIPAL_EMAIL VARCHAR(128) NOT NULL,
+ PRINCIPAL_NAME VARCHAR(128) NOT NULL,
+ PRINCIPAL_OU VARCHAR(128),
+ PRINCIPAL_TYPE VARCHAR(5) NOT NULL,
+ PRINCIPAL_USERDELETED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PRINCIPAL_ID)
+);
+
+CREATE TABLE CMS_HISTORY_PROJECTRESOURCES (
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_PATH VARCHAR(1024) NOT NULL,
+ PRIMARY KEY (PROJECT_ID, PUBLISH_TAG, RESOURCE_PATH)
+);
+
+CREATE TABLE CMS_HISTORY_PROJECTS (
+ PUBLISH_TAG INTEGER NOT NULL,
+ DATE_CREATED NUMERIC,
+ GROUP_ID VARCHAR(36) NOT NULL,
+ MANAGERGROUP_ID VARCHAR(36) NOT NULL,
+ PROJECT_DESCRIPTION VARCHAR(255) NOT NULL,
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ PROJECT_NAME VARCHAR(255) NOT NULL,
+ PROJECT_OU VARCHAR(128) NOT NULL,
+ PROJECT_PUBLISHDATE NUMERIC,
+ PROJECT_PUBLISHED_BY VARCHAR(36) NOT NULL,
+ PROJECT_TYPE INTEGER,
+ USER_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PUBLISH_TAG)
+);
+
+CREATE TABLE CMS_HISTORY_PROPERTIES (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_ID VARCHAR(36) NOT NULL,
+ PROPERTY_VALUE VARCHAR(2048) NOT NULL,
+ PRIMARY KEY (PROPERTYDEF_ID, PROPERTY_MAPPING_TYPE, PUBLISH_TAG, STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_HISTORY_PROPERTYDEF (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_NAME VARCHAR(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID)
+);
+
+CREATE TABLE CMS_HISTORY_RESOURCES (
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ DATE_CONTENT NUMERIC,
+ DATE_CREATED NUMERIC,
+ DATE_LASTMODIFIED NUMERIC,
+ PROJECT_LASTMODIFIED VARCHAR(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED VARCHAR(36) NOT NULL,
+ USER_LASTMODIFIED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PUBLISH_TAG, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_HISTORY_STRUCTURE (
+ PUBLISH_TAG INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ VERSION INTEGER NOT NULL,
+ DATE_EXPIRED NUMERIC,
+ DATE_RELEASED NUMERIC,
+ PARENT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH VARCHAR(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (PUBLISH_TAG, STRUCTURE_ID, VERSION)
+);
+
+CREATE TABLE CMS_LOG (
+ LOG_DATE NUMERIC NOT NULL,
+ LOG_TYPE INTEGER NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL,
+ LOG_DATA VARCHAR(1024),
+ STRUCTURE_ID VARCHAR(36),
+ PRIMARY KEY (LOG_DATE, LOG_TYPE, USER_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_ACCESSCONTROL (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ ACCESS_ALLOWED INTEGER,
+ ACCESS_DENIED INTEGER,
+ ACCESS_FLAGS INTEGER,
+ PRIMARY KEY (PRINCIPAL_ID, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_CONTENTS (
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ FILE_CONTENT LONGVARBINARY,
+ PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_PROPERTIES (
+ PROPERTY_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER,
+ PROPERTY_VALUE VARCHAR(2048) NOT NULL,
+ PRIMARY KEY (PROPERTY_ID),
+ CONSTRAINT UK_OFFLINE_PROPERTIES UNIQUE (PROPERTYDEF_ID, PROPERTY_MAPPING_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_PROPERTYDEF (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_NAME VARCHAR(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID),
+ CONSTRAINT UK_OFFLINE_PROPERTYDEF UNIQUE (PROPERTYDEF_NAME)
+);
+
+CREATE TABLE CMS_OFFLINE_RESOURCES (
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ DATE_CONTENT NUMERIC,
+ DATE_CREATED NUMERIC,
+ DATE_LASTMODIFIED NUMERIC,
+ PROJECT_LASTMODIFIED VARCHAR(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED VARCHAR(36) NOT NULL,
+ USER_LASTMODIFIED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_RESOURCE_RELATIONS (
+ RELATION_SOURCE_ID VARCHAR(36) NOT NULL,
+ RELATION_SOURCE_PATH VARCHAR(1024) NOT NULL,
+ RELATION_TARGET_ID VARCHAR(36) NOT NULL,
+ RELATION_TARGET_PATH VARCHAR(1024) NOT NULL,
+ RELATION_TYPE INTEGER NOT NULL
+);
+
+CREATE TABLE CMS_OFFLINE_STRUCTURE (
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ DATE_EXPIRED NUMERIC,
+ DATE_RELEASED NUMERIC,
+ PARENT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH VARCHAR(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_URLNAME_MAPPINGS (
+ DATE_CHANGED NUMERIC NOT NULL,
+ NAME VARCHAR(255) NOT NULL,
+ STATE INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ LOCALE VARCHAR(10)
+);
+
+CREATE TABLE CMS_ONLINE_ACCESSCONTROL (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ ACCESS_ALLOWED INTEGER,
+ ACCESS_DENIED INTEGER,
+ ACCESS_FLAGS INTEGER,
+ PRIMARY KEY (PRINCIPAL_ID, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_ONLINE_PROPERTIES (
+ PROPERTY_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER,
+ PROPERTY_VALUE VARCHAR(2048) NOT NULL,
+ PRIMARY KEY (PROPERTY_ID),
+ CONSTRAINT UK_ONLINE_PROPERTIES UNIQUE (PROPERTYDEF_ID, PROPERTY_MAPPING_ID)
+);
+
+CREATE TABLE CMS_ONLINE_PROPERTYDEF (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_NAME VARCHAR(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID),
+ CONSTRAINT UK_ONLINE_PROPERTYDEF UNIQUE (PROPERTYDEF_NAME)
+);
+
+CREATE TABLE CMS_ONLINE_RESOURCES (
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ DATE_CONTENT NUMERIC,
+ DATE_CREATED NUMERIC,
+ DATE_LASTMODIFIED NUMERIC,
+ PROJECT_LASTMODIFIED VARCHAR(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED VARCHAR(36) NOT NULL,
+ USER_LASTMODIFIED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE CMS_ONLINE_RESOURCE_RELATIONS (
+ RELATION_SOURCE_ID VARCHAR(36) NOT NULL,
+ RELATION_SOURCE_PATH VARCHAR(1024) NOT NULL,
+ RELATION_TARGET_ID VARCHAR(36) NOT NULL,
+ RELATION_TARGET_PATH VARCHAR(1024) NOT NULL,
+ RELATION_TYPE INTEGER NOT NULL
+);
+
+CREATE TABLE CMS_ONLINE_STRUCTURE (
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ DATE_EXPIRED NUMERIC,
+ DATE_RELEASED NUMERIC,
+ PARENT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH VARCHAR(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_ONLINE_URLNAME_MAPPINGS (
+ DATE_CHANGED NUMERIC NOT NULL,
+ NAME VARCHAR(255) NOT NULL,
+ STATE INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ LOCALE VARCHAR(10)
+);
+
+CREATE TABLE CMS_PROJECTRESOURCES (
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH VARCHAR(1024) NOT NULL,
+ PRIMARY KEY (PROJECT_ID, RESOURCE_PATH)
+);
+
+CREATE TABLE CMS_PROJECTS (
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ DATE_CREATED NUMERIC,
+ GROUP_ID VARCHAR(36) NOT NULL,
+ MANAGERGROUP_ID VARCHAR(36) NOT NULL,
+ PROJECT_DESCRIPTION VARCHAR(255) NOT NULL,
+ PROJECT_FLAGS INTEGER,
+ PROJECT_NAME VARCHAR(200) NOT NULL,
+ PROJECT_OU VARCHAR(128) NOT NULL,
+ PROJECT_TYPE INTEGER,
+ USER_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PROJECT_ID),
+ CONSTRAINT UK_PROJECTS UNIQUE (PROJECT_OU, PROJECT_NAME, DATE_CREATED)
+);
+
+CREATE TABLE CMS_PUBLISH_HISTORY (
+ HISTORY_ID VARCHAR(36) NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_PATH VARCHAR(1024) NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ SIBLING_COUNT INTEGER,
+ PRIMARY KEY (HISTORY_ID, PUBLISH_TAG, RESOURCE_PATH, STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_PUBLISH_JOBS (
+ HISTORY_ID VARCHAR(36) NOT NULL,
+ ENQUEUE_TIME NUMERIC,
+ FINISH_TIME NUMERIC,
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ PROJECT_NAME VARCHAR(255) NOT NULL,
+ PUBLISH_FLAGS INTEGER,
+ PUBLISH_LIST LONGVARBINARY,
+ PUBLISH_LOCALE VARCHAR(16) NOT NULL,
+ PUBLISH_REPORT LONGVARBINARY,
+ RESOURCE_COUNT INTEGER,
+ START_TIME NUMERIC,
+ USER_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (HISTORY_ID)
+);
+
+CREATE TABLE CMS_RESOURCE_LOCKS (
+ RESOURCE_PATH VARCHAR(1024) NOT NULL,
+ LOCK_TYPE INTEGER,
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL
+);
+
+CREATE TABLE CMS_STATICEXPORT_LINKS (
+ LINK_ID VARCHAR(36) NOT NULL,
+ LINK_PARAMETER VARCHAR(1024),
+ LINK_RFS_PATH VARCHAR(1024),
+ LINK_TIMESTAMP NUMERIC,
+ LINK_TYPE INTEGER,
+ PRIMARY KEY (LINK_ID)
+);
+
+CREATE TABLE CMS_SUBSCRIPTION (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ DATE_DELETED NUMERIC,
+ PRIMARY KEY (PRINCIPAL_ID, STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_SUBSCRIPTION_VISIT (
+ USER_ID VARCHAR(36) NOT NULL,
+ VISIT_DATE NUMERIC NOT NULL,
+ STRUCTURE_ID VARCHAR(36),
+ PRIMARY KEY (USER_ID, VISIT_DATE)
+);
+
+CREATE TABLE CMS_USERDATA (
+ DATA_KEY VARCHAR(255) NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL,
+ DATA_TYPE VARCHAR(128) NOT NULL,
+ DATA_VALUE LONGVARBINARY,
+ PRIMARY KEY (DATA_KEY, USER_ID)
+);
+
+CREATE TABLE CMS_USERS (
+ USER_ID VARCHAR(36) NOT NULL,
+ USER_DATECREATED NUMERIC,
+ USER_EMAIL VARCHAR(128) NOT NULL,
+ USER_FIRSTNAME VARCHAR(128) NOT NULL,
+ USER_FLAGS INTEGER,
+ USER_LASTLOGIN NUMERIC,
+ USER_LASTNAME VARCHAR(128) NOT NULL,
+ USER_NAME VARCHAR(128) NOT NULL,
+ USER_OU VARCHAR(128) NOT NULL,
+ USER_PASSWORD VARCHAR(64) NOT NULL,
+ PRIMARY KEY (USER_ID),
+ CONSTRAINT UK_USERS UNIQUE (USER_NAME, USER_OU)
+);
View
5 webapp/setup/database/intersystemscache/drop_tables.sql
@@ -31,4 +31,7 @@ DROP TABLE CMS_CONTENTS;
DROP TABLE CMS_STATICEXPORT_LINKS ;
DROP TABLE CMS_SUBSCRIPTION;
DROP TABLE CMS_SUBSCRIPTION_VISIT;
-DROP TABLE CMS_LOG;
+DROP TABLE CMS_LOG;
+DROP TABLE CMS_COUNTERS;
+DROP TABLE CMS_OFFLINE_URLNAME_MAPPINGS;
+DROP TABLE CMS_ONLINE_URLNAME_MAPPINGS;
View
377 webapp/setup/database/jdatastore/create_tables.sql
@@ -0,0 +1,377 @@
+CREATE TABLE CMS_CONTENTS (
+ PUBLISH_TAG_FROM INTEGER NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ FILE_CONTENT VARBINARY,
+ ONLINE_FLAG INTEGER,
+ PUBLISH_TAG_TO INTEGER,
+ PRIMARY KEY (PUBLISH_TAG_FROM, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_COUNTERS (
+ NAME VARCHAR(255) NOT NULL,
+ COUNTER INTEGER,
+ PRIMARY KEY (NAME)
+);
+
+CREATE TABLE CMS_GROUPS (
+ GROUP_ID VARCHAR(36) NOT NULL,
+ GROUP_DESCRIPTION VARCHAR(255) NOT NULL,
+ GROUP_FLAGS INTEGER,
+ GROUP_NAME VARCHAR(128) NOT NULL,
+ GROUP_OU VARCHAR(128) NOT NULL,
+ PARENT_GROUP_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (GROUP_ID),
+ CONSTRAINT UK_GROUPS UNIQUE (GROUP_NAME, GROUP_OU)
+);
+
+CREATE TABLE CMS_GROUPUSERS (
+ GROUP_ID VARCHAR(36) NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL,
+ GROUPUSER_FLAGS INTEGER,
+ PRIMARY KEY (GROUP_ID, USER_ID)
+);
+
+CREATE TABLE CMS_HISTORY_PRINCIPALS (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ PRINCIPAL_DATEDELETED BIGINT,
+ PRINCIPAL_DESCRIPTION VARCHAR(255) NOT NULL,
+ PRINCIPAL_EMAIL VARCHAR(128) NOT NULL,
+ PRINCIPAL_NAME VARCHAR(128) NOT NULL,
+ PRINCIPAL_OU VARCHAR(128),
+ PRINCIPAL_TYPE VARCHAR(5) NOT NULL,
+ PRINCIPAL_USERDELETED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PRINCIPAL_ID)
+);
+
+CREATE TABLE CMS_HISTORY_PROJECTRESOURCES (
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_PATH VARCHAR(1024) NOT NULL,
+ PRIMARY KEY (PROJECT_ID, PUBLISH_TAG, RESOURCE_PATH)
+);
+
+CREATE TABLE CMS_HISTORY_PROJECTS (
+ PUBLISH_TAG INTEGER NOT NULL,
+ DATE_CREATED BIGINT,
+ GROUP_ID VARCHAR(36) NOT NULL,
+ MANAGERGROUP_ID VARCHAR(36) NOT NULL,
+ PROJECT_DESCRIPTION VARCHAR(255) NOT NULL,
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ PROJECT_NAME VARCHAR(255) NOT NULL,
+ PROJECT_OU VARCHAR(128) NOT NULL,
+ PROJECT_PUBLISHDATE BIGINT,
+ PROJECT_PUBLISHED_BY VARCHAR(36) NOT NULL,
+ PROJECT_TYPE INTEGER,
+ USER_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PUBLISH_TAG)
+);
+
+CREATE TABLE CMS_HISTORY_PROPERTIES (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_ID VARCHAR(36) NOT NULL,
+ PROPERTY_VALUE VARCHAR(2048) NOT NULL,
+ PRIMARY KEY (PROPERTYDEF_ID, PROPERTY_MAPPING_TYPE, PUBLISH_TAG, STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_HISTORY_PROPERTYDEF (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_NAME VARCHAR(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID)
+);
+
+CREATE TABLE CMS_HISTORY_RESOURCES (
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ DATE_CONTENT BIGINT,
+ DATE_CREATED BIGINT,
+ DATE_LASTMODIFIED BIGINT,
+ PROJECT_LASTMODIFIED VARCHAR(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED VARCHAR(36) NOT NULL,
+ USER_LASTMODIFIED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PUBLISH_TAG, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_HISTORY_STRUCTURE (
+ PUBLISH_TAG INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ VERSION INTEGER NOT NULL,
+ DATE_EXPIRED BIGINT,
+ DATE_RELEASED BIGINT,
+ PARENT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH VARCHAR(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (PUBLISH_TAG, STRUCTURE_ID, VERSION)
+);
+
+CREATE TABLE CMS_LOG (
+ LOG_DATE BIGINT NOT NULL,
+ LOG_TYPE INTEGER NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL,
+ LOG_DATA VARCHAR(1024),
+ STRUCTURE_ID VARCHAR(36),
+ PRIMARY KEY (LOG_DATE, LOG_TYPE, USER_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_ACCESSCONTROL (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ ACCESS_ALLOWED INTEGER,
+ ACCESS_DENIED INTEGER,
+ ACCESS_FLAGS INTEGER,
+ PRIMARY KEY (PRINCIPAL_ID, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_CONTENTS (
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ FILE_CONTENT VARBINARY,
+ PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_PROPERTIES (
+ PROPERTY_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER,
+ PROPERTY_VALUE VARCHAR(2048) NOT NULL,
+ PRIMARY KEY (PROPERTY_ID),
+ CONSTRAINT UK_OFFLINE_PROPERTIES UNIQUE (PROPERTYDEF_ID, PROPERTY_MAPPING_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_PROPERTYDEF (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_NAME VARCHAR(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID),
+ CONSTRAINT UK_OFFLINE_PROPERTYDEF UNIQUE (PROPERTYDEF_NAME)
+);
+
+CREATE TABLE CMS_OFFLINE_RESOURCES (
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ DATE_CONTENT BIGINT,
+ DATE_CREATED BIGINT,
+ DATE_LASTMODIFIED BIGINT,
+ PROJECT_LASTMODIFIED VARCHAR(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED VARCHAR(36) NOT NULL,
+ USER_LASTMODIFIED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_RESOURCE_RELATIONS (
+ RELATION_SOURCE_ID VARCHAR(36) NOT NULL,
+ RELATION_SOURCE_PATH VARCHAR(1024) NOT NULL,
+ RELATION_TARGET_ID VARCHAR(36) NOT NULL,
+ RELATION_TARGET_PATH VARCHAR(1024) NOT NULL,
+ RELATION_TYPE INTEGER NOT NULL
+);
+
+CREATE TABLE CMS_OFFLINE_STRUCTURE (
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ DATE_EXPIRED BIGINT,
+ DATE_RELEASED BIGINT,
+ PARENT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH VARCHAR(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_OFFLINE_URLNAME_MAPPINGS (
+ DATE_CHANGED BIGINT NOT NULL,
+ NAME VARCHAR(255) NOT NULL,
+ STATE INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ LOCALE VARCHAR(10)
+);
+
+CREATE TABLE CMS_ONLINE_ACCESSCONTROL (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ ACCESS_ALLOWED INTEGER,
+ ACCESS_DENIED INTEGER,
+ ACCESS_FLAGS INTEGER,
+ PRIMARY KEY (PRINCIPAL_ID, RESOURCE_ID)
+);
+
+CREATE TABLE CMS_ONLINE_PROPERTIES (
+ PROPERTY_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_ID VARCHAR(36) NOT NULL,
+ PROPERTY_MAPPING_TYPE INTEGER,
+ PROPERTY_VALUE VARCHAR(2048) NOT NULL,
+ PRIMARY KEY (PROPERTY_ID),
+ CONSTRAINT UK_ONLINE_PROPERTIES UNIQUE (PROPERTYDEF_ID, PROPERTY_MAPPING_ID)
+);
+
+CREATE TABLE CMS_ONLINE_PROPERTYDEF (
+ PROPERTYDEF_ID VARCHAR(36) NOT NULL,
+ PROPERTYDEF_NAME VARCHAR(128) NOT NULL,
+ PROPERTYDEF_TYPE INTEGER,
+ PRIMARY KEY (PROPERTYDEF_ID),
+ CONSTRAINT UK_ONLINE_PROPERTYDEF UNIQUE (PROPERTYDEF_NAME)
+);
+
+CREATE TABLE CMS_ONLINE_RESOURCES (
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ DATE_CONTENT BIGINT,
+ DATE_CREATED BIGINT,
+ DATE_LASTMODIFIED BIGINT,
+ PROJECT_LASTMODIFIED VARCHAR(36) NOT NULL,
+ RESOURCE_FLAGS INTEGER,
+ RESOURCE_SIZE INTEGER,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ RESOURCE_VERSION INTEGER,
+ SIBLING_COUNT INTEGER,
+ USER_CREATED VARCHAR(36) NOT NULL,
+ USER_LASTMODIFIED VARCHAR(36) NOT NULL,
+ PRIMARY KEY (RESOURCE_ID)
+);
+
+CREATE TABLE CMS_ONLINE_RESOURCE_RELATIONS (
+ RELATION_SOURCE_ID VARCHAR(36) NOT NULL,
+ RELATION_SOURCE_PATH VARCHAR(1024) NOT NULL,
+ RELATION_TARGET_ID VARCHAR(36) NOT NULL,
+ RELATION_TARGET_PATH VARCHAR(1024) NOT NULL,
+ RELATION_TYPE INTEGER NOT NULL
+);
+
+CREATE TABLE CMS_ONLINE_STRUCTURE (
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ DATE_EXPIRED BIGINT,
+ DATE_RELEASED BIGINT,
+ PARENT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH VARCHAR(1024),
+ STRUCTURE_STATE INTEGER,
+ STRUCTURE_VERSION INTEGER,
+ PRIMARY KEY (STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_ONLINE_URLNAME_MAPPINGS (
+ DATE_CHANGED BIGINT NOT NULL,
+ NAME VARCHAR(255) NOT NULL,
+ STATE INTEGER NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ LOCALE VARCHAR(10)
+);
+
+CREATE TABLE CMS_PROJECTRESOURCES (
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ RESOURCE_PATH VARCHAR(1024) NOT NULL,
+ PRIMARY KEY (PROJECT_ID, RESOURCE_PATH)
+);
+
+CREATE TABLE CMS_PROJECTS (
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ DATE_CREATED BIGINT,
+ GROUP_ID VARCHAR(36) NOT NULL,
+ MANAGERGROUP_ID VARCHAR(36) NOT NULL,
+ PROJECT_DESCRIPTION VARCHAR(255) NOT NULL,
+ PROJECT_FLAGS INTEGER,
+ PROJECT_NAME VARCHAR(200) NOT NULL,
+ PROJECT_OU VARCHAR(128) NOT NULL,
+ PROJECT_TYPE INTEGER,
+ USER_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (PROJECT_ID),
+ CONSTRAINT UK_PROJECTS UNIQUE (PROJECT_OU, PROJECT_NAME, DATE_CREATED)
+);
+
+CREATE TABLE CMS_PUBLISH_HISTORY (
+ HISTORY_ID VARCHAR(36) NOT NULL,
+ PUBLISH_TAG INTEGER NOT NULL,
+ RESOURCE_PATH VARCHAR(1024) NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_ID VARCHAR(36) NOT NULL,
+ RESOURCE_STATE INTEGER,
+ RESOURCE_TYPE INTEGER,
+ SIBLING_COUNT INTEGER,
+ PRIMARY KEY (HISTORY_ID, PUBLISH_TAG, RESOURCE_PATH, STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_PUBLISH_JOBS (
+ HISTORY_ID VARCHAR(36) NOT NULL,
+ ENQUEUE_TIME BIGINT,
+ FINISH_TIME BIGINT,
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ PROJECT_NAME VARCHAR(255) NOT NULL,
+ PUBLISH_FLAGS INTEGER,
+ PUBLISH_LIST VARBINARY,
+ PUBLISH_LOCALE VARCHAR(16) NOT NULL,
+ PUBLISH_REPORT VARBINARY,
+ RESOURCE_COUNT INTEGER,
+ START_TIME BIGINT,
+ USER_ID VARCHAR(36) NOT NULL,
+ PRIMARY KEY (HISTORY_ID)
+);
+
+CREATE TABLE CMS_RESOURCE_LOCKS (
+ RESOURCE_PATH VARCHAR(1024) NOT NULL,
+ LOCK_TYPE INTEGER,
+ PROJECT_ID VARCHAR(36) NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL
+);
+
+CREATE TABLE CMS_STATICEXPORT_LINKS (
+ LINK_ID VARCHAR(36) NOT NULL,
+ LINK_PARAMETER VARCHAR(1024),
+ LINK_RFS_PATH VARCHAR(1024),
+ LINK_TIMESTAMP BIGINT,
+ LINK_TYPE INTEGER,
+ PRIMARY KEY (LINK_ID)
+);
+
+CREATE TABLE CMS_SUBSCRIPTION (
+ PRINCIPAL_ID VARCHAR(36) NOT NULL,
+ STRUCTURE_ID VARCHAR(36) NOT NULL,
+ DATE_DELETED BIGINT,
+ PRIMARY KEY (PRINCIPAL_ID, STRUCTURE_ID)
+);
+
+CREATE TABLE CMS_SUBSCRIPTION_VISIT (
+ USER_ID VARCHAR(36) NOT NULL,
+ VISIT_DATE BIGINT NOT NULL,
+ STRUCTURE_ID VARCHAR(36),
+ PRIMARY KEY (USER_ID, VISIT_DATE)
+);
+
+CREATE TABLE CMS_USERDATA (
+ DATA_KEY VARCHAR(255) NOT NULL,
+ USER_ID VARCHAR(36) NOT NULL,
+ DATA_TYPE VARCHAR(128) NOT NULL,
+ DATA_VALUE VARBINARY,
+ PRIMARY KEY (DATA_KEY, USER_ID)
+);
+
+CREATE TABLE CMS_USERS (
+ USER_ID VARCHAR(36) NOT NULL,
+ USER_DATECREATED BIGINT,
+ USER_EMAIL VARCHAR(128) NOT NULL,
+ USER_FIRSTNAME VARCHAR(128) NOT NULL,
+ USER_FLAGS INTEGER,
+ USER_LASTLOGIN BIGINT,
+ USER_LASTNAME VARCHAR(128) NOT NULL,
+ USER_NAME VARCHAR(128) NOT NULL,
+ USER_OU VARCHAR(128) NOT NULL,
+ USER_PASSWORD VARCHAR(64) NOT NULL,
+ PRIMARY KEY (USER_ID),
+ CONSTRAINT UK_USERS UNIQUE (USER_NAME, USER_OU)
+);
View
5 webapp/setup/database/jdatastore/drop_tables.sql
@@ -31,4 +31,7 @@ DROP TABLE CMS_CONTENTS;
DROP TABLE CMS_STATICEXPORT_LINKS ;
DROP TABLE CMS_SUBSCRIPTION;
DROP TABLE CMS_SUBSCRIPTION_VISIT;
-DROP TABLE CMS_LOG;
+DROP TABLE CMS_LOG;
+DROP TABLE CMS_COUNTERS;
+DROP TABLE CMS_OFFLINE_URLNAME_MAPPINGS;
+DROP TABLE CMS_ONLINE_URLNAME_MAPPINGS;
View
13 webapp/setup/database/sybase/create_tables.sql
@@ -21,6 +21,19 @@ CREATE INDEX CMS_CONTENTS_04_IDX ON CMS_CONTENTS (PUBLISH_TAG_TO);
CREATE INDEX CMS_CONTENTS_05_IDX ON CMS_CONTENTS (RESOURCE_ID, ONLINE_FLAG);
/* ----------------------------------------------------------------------- */
+/* cms_counters */
+/* ----------------------------------------------------------------------- */
+
+CREATE TABLE CMS_COUNTERS
+(
+ NAME VARCHAR(255) NOT NULL,
+ COUNTER INT NOT NULL,
+ PRIMARY KEY (NAME)
+);
+
+CREATE UNIQUE INDEX PK_COUNTERS ON CMS_COUNTERS (NAME);
+
+/* ----------------------------------------------------------------------- */
/* cms_groups */
/* ----------------------------------------------------------------------- */
View
71 webapp/setup/database/sybase/drop_tables.sql
@@ -1,34 +1,37 @@
-drop table cms_users;
-drop table cms_userdata;
-drop table cms_resource_locks;
-drop table cms_publish_jobs;
-drop table cms_publish_history;
-drop table cms_projects;
-drop table cms_projectresources;
-drop table cms_online_structure;
-drop table cms_online_resources;
-drop table cms_online_resource_relations;
-drop table cms_online_propertydef;
-drop table cms_online_properties;
-drop table cms_online_accesscontrol;
-drop table cms_offline_structure;
-drop table cms_offline_resources;
-drop table cms_offline_resource_relations;
-drop table cms_offline_propertydef;
-drop table cms_offline_properties;
-drop table cms_offline_contents;
-drop table cms_offline_accesscontrol;
-drop table cms_history_structure;
-drop table cms_history_resources;
-drop table cms_history_propertydef;
-drop table cms_history_properties;
-drop table cms_history_projects;
-drop table cms_history_projectresources;
-drop table cms_history_principals;
-drop table cms_groupusers;
-drop table cms_groups;
-drop table cms_contents;
-drop table cms_staticexport_links ;
-drop table cms_subscription;
-drop table cms_subscription_visit;
-drop table cms_log;
+DROP TABLE CMS_USERS;
+DROP TABLE CMS_USERDATA;
+DROP TABLE CMS_RESOURCE_LOCKS;
+DROP TABLE CMS_PUBLISH_JOBS;
+DROP TABLE CMS_PUBLISH_HISTORY;
+DROP TABLE CMS_PROJECTS;
+DROP TABLE CMS_PROJECTRESOURCES;
+DROP TABLE CMS_ONLINE_STRUCTURE;
+DROP TABLE CMS_ONLINE_RESOURCES;
+DROP TABLE CMS_ONLINE_RESOURCE_RELATIONS;
+DROP TABLE CMS_ONLINE_PROPERTYDEF;
+DROP TABLE CMS_ONLINE_PROPERTIES;
+DROP TABLE CMS_ONLINE_ACCESSCONTROL;
+DROP TABLE CMS_OFFLINE_STRUCTURE;
+DROP TABLE CMS_OFFLINE_RESOURCES;
+DROP TABLE CMS_OFFLINE_RESOURCE_RELATIONS;
+DROP TABLE CMS_OFFLINE_PROPERTYDEF;
+DROP TABLE CMS_OFFLINE_PROPERTIES;
+DROP TABLE CMS_OFFLINE_CONTENTS;
+DROP TABLE CMS_OFFLINE_ACCESSCONTROL;
+DROP TABLE CMS_HISTORY_STRUCTURE;
+DROP TABLE CMS_HISTORY_RESOURCES;
+DROP TABLE CMS_HISTORY_PROPERTYDEF;
+DROP TABLE CMS_HISTORY_PROPERTIES;
+DROP TABLE CMS_HISTORY_PROJECTS;
+DROP TABLE CMS_HISTORY_PROJECTRESOURCES;
+DROP TABLE CMS_HISTORY_PRINCIPALS;
+DROP TABLE CMS_GROUPUSERS;
+DROP TABLE CMS_GROUPS;
+DROP TABLE CMS_CONTENTS;
+DROP TABLE CMS_STATICEXPORT_LINKS ;
+DROP TABLE CMS_SUBSCRIPTION;
+DROP TABLE CMS_SUBSCRIPTION_VISIT;
+DROP TABLE CMS_LOG;
+DROP TABLE CMS_COUNTERS;
+DROP TABLE CMS_OFFLINE_URLNAME_MAPPINGS;
+DROP TABLE CMS_ONLINE_URLNAME_MAPPINGS;
Please sign in to comment.
Something went wrong with that request. Please try again.