portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r725977 [32/48] - in /portals/jetspeed-2/portal/trunk: ./ app-servers/security/jboss/src/java/META-INF/jboss-secsvc/ app-servers/security/jboss/src/java/org/apache/jetspeed/appservers/security/jboss/ applications/jetspeed/src/main/javascrip...
Date Fri, 12 Dec 2008 12:07:04 GMT
Modified: portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase1-schema.sql
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase1-schema.sql?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase1-schema.sql (original)
+++ portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase1-schema.sql Fri Dec 12 04:06:29 2008
@@ -13,129 +13,129 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 
------------------------------------------------------------------------------
--- MEDIA_TYPE
------------------------------------------------------------------------------
-
-CREATE TABLE MEDIA_TYPE
-(
-    MEDIATYPE_ID INTEGER NOT NULL,
-    NAME VARCHAR(80) NOT NULL,
-    CHARACTER_SET VARCHAR(40),
-    TITLE VARCHAR(80),
-    DESCRIPTION LONG VARCHAR,
-    PRIMARY KEY(MEDIATYPE_ID));
-
------------------------------------------------------------------------------
--- CLIENT
------------------------------------------------------------------------------
-
-CREATE TABLE CLIENT
-(
-    CLIENT_ID INTEGER NOT NULL,
-    EVAL_ORDER INTEGER NOT NULL,
-    NAME VARCHAR(80) NOT NULL,
-    USER_AGENT_PATTERN VARCHAR(128),
-    MANUFACTURER VARCHAR(80),
-    MODEL VARCHAR(80),
-    VERSION VARCHAR(40),
-    PREFERRED_MIMETYPE_ID INTEGER NOT NULL,
-    PRIMARY KEY(CLIENT_ID));
-
------------------------------------------------------------------------------
--- MIMETYPE
------------------------------------------------------------------------------
-
-CREATE TABLE MIMETYPE
-(
-    MIMETYPE_ID INTEGER NOT NULL,
-    NAME VARCHAR(80) NOT NULL,
-    PRIMARY KEY(MIMETYPE_ID));
-
------------------------------------------------------------------------------
--- CAPABILITY
------------------------------------------------------------------------------
-
-CREATE TABLE CAPABILITY
-(
-    CAPABILITY_ID INTEGER NOT NULL,
-    CAPABILITY VARCHAR(80) NOT NULL,
-    PRIMARY KEY(CAPABILITY_ID));
-
------------------------------------------------------------------------------
--- CLIENT_TO_CAPABILITY
------------------------------------------------------------------------------
-
-CREATE TABLE CLIENT_TO_CAPABILITY
-(
-    CLIENT_ID INTEGER NOT NULL,
-    CAPABILITY_ID INTEGER NOT NULL);
-
------------------------------------------------------------------------------
--- CLIENT_TO_MIMETYPE
------------------------------------------------------------------------------
-
-CREATE TABLE CLIENT_TO_MIMETYPE
-(
-    CLIENT_ID INTEGER NOT NULL,
-    MIMETYPE_ID INTEGER NOT NULL);
-
------------------------------------------------------------------------------
--- MEDIATYPE_TO_CAPABILITY
------------------------------------------------------------------------------
-
-CREATE TABLE MEDIATYPE_TO_CAPABILITY
-(
-    MEDIATYPE_ID INTEGER NOT NULL,
-    CAPABILITY_ID INTEGER NOT NULL);
-
------------------------------------------------------------------------------
--- MEDIATYPE_TO_MIMETYPE
------------------------------------------------------------------------------
-
-CREATE TABLE MEDIATYPE_TO_MIMETYPE
-(
-    MEDIATYPE_ID INTEGER NOT NULL,
-    MIMETYPE_ID INTEGER NOT NULL);
-
------------------------------------------------------------------------------
--- PORTLET_STATISTICS
------------------------------------------------------------------------------
-
-CREATE TABLE PORTLET_STATISTICS
-(
-    IPADDRESS VARCHAR(80),
-    USER_NAME VARCHAR(80),
-    TIME_STAMP TIMESTAMP,
-    PAGE VARCHAR(80),
-    PORTLET VARCHAR(255),
-    STATUS INTEGER,
-    ELAPSED_TIME BIGINT);
-
------------------------------------------------------------------------------
--- PAGE_STATISTICS
------------------------------------------------------------------------------
-
-CREATE TABLE PAGE_STATISTICS
-(
-    IPADDRESS VARCHAR(80),
-    USER_NAME VARCHAR(80),
-    TIME_STAMP TIMESTAMP,
-    PAGE VARCHAR(80),
-    STATUS INTEGER,
-    ELAPSED_TIME BIGINT);
-
------------------------------------------------------------------------------
--- USER_STATISTICS
------------------------------------------------------------------------------
-
-CREATE TABLE USER_STATISTICS
-(
-    IPADDRESS VARCHAR(80),
-    USER_NAME VARCHAR(80),
-    TIME_STAMP TIMESTAMP,
-    STATUS INTEGER,
-    ELAPSED_TIME BIGINT);
+-----------------------------------------------------------------------------
+-- MEDIA_TYPE
+-----------------------------------------------------------------------------
+
+CREATE TABLE MEDIA_TYPE
+(
+    MEDIATYPE_ID INTEGER NOT NULL,
+    NAME VARCHAR(80) NOT NULL,
+    CHARACTER_SET VARCHAR(40),
+    TITLE VARCHAR(80),
+    DESCRIPTION LONG VARCHAR,
+    PRIMARY KEY(MEDIATYPE_ID));
+
+-----------------------------------------------------------------------------
+-- CLIENT
+-----------------------------------------------------------------------------
+
+CREATE TABLE CLIENT
+(
+    CLIENT_ID INTEGER NOT NULL,
+    EVAL_ORDER INTEGER NOT NULL,
+    NAME VARCHAR(80) NOT NULL,
+    USER_AGENT_PATTERN VARCHAR(128),
+    MANUFACTURER VARCHAR(80),
+    MODEL VARCHAR(80),
+    VERSION VARCHAR(40),
+    PREFERRED_MIMETYPE_ID INTEGER NOT NULL,
+    PRIMARY KEY(CLIENT_ID));
+
+-----------------------------------------------------------------------------
+-- MIMETYPE
+-----------------------------------------------------------------------------
+
+CREATE TABLE MIMETYPE
+(
+    MIMETYPE_ID INTEGER NOT NULL,
+    NAME VARCHAR(80) NOT NULL,
+    PRIMARY KEY(MIMETYPE_ID));
+
+-----------------------------------------------------------------------------
+-- CAPABILITY
+-----------------------------------------------------------------------------
+
+CREATE TABLE CAPABILITY
+(
+    CAPABILITY_ID INTEGER NOT NULL,
+    CAPABILITY VARCHAR(80) NOT NULL,
+    PRIMARY KEY(CAPABILITY_ID));
+
+-----------------------------------------------------------------------------
+-- CLIENT_TO_CAPABILITY
+-----------------------------------------------------------------------------
+
+CREATE TABLE CLIENT_TO_CAPABILITY
+(
+    CLIENT_ID INTEGER NOT NULL,
+    CAPABILITY_ID INTEGER NOT NULL);
+
+-----------------------------------------------------------------------------
+-- CLIENT_TO_MIMETYPE
+-----------------------------------------------------------------------------
+
+CREATE TABLE CLIENT_TO_MIMETYPE
+(
+    CLIENT_ID INTEGER NOT NULL,
+    MIMETYPE_ID INTEGER NOT NULL);
+
+-----------------------------------------------------------------------------
+-- MEDIATYPE_TO_CAPABILITY
+-----------------------------------------------------------------------------
+
+CREATE TABLE MEDIATYPE_TO_CAPABILITY
+(
+    MEDIATYPE_ID INTEGER NOT NULL,
+    CAPABILITY_ID INTEGER NOT NULL);
+
+-----------------------------------------------------------------------------
+-- MEDIATYPE_TO_MIMETYPE
+-----------------------------------------------------------------------------
+
+CREATE TABLE MEDIATYPE_TO_MIMETYPE
+(
+    MEDIATYPE_ID INTEGER NOT NULL,
+    MIMETYPE_ID INTEGER NOT NULL);
+
+-----------------------------------------------------------------------------
+-- PORTLET_STATISTICS
+-----------------------------------------------------------------------------
+
+CREATE TABLE PORTLET_STATISTICS
+(
+    IPADDRESS VARCHAR(80),
+    USER_NAME VARCHAR(80),
+    TIME_STAMP TIMESTAMP,
+    PAGE VARCHAR(80),
+    PORTLET VARCHAR(255),
+    STATUS INTEGER,
+    ELAPSED_TIME BIGINT);
+
+-----------------------------------------------------------------------------
+-- PAGE_STATISTICS
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_STATISTICS
+(
+    IPADDRESS VARCHAR(80),
+    USER_NAME VARCHAR(80),
+    TIME_STAMP TIMESTAMP,
+    PAGE VARCHAR(80),
+    STATUS INTEGER,
+    ELAPSED_TIME BIGINT);
+
+-----------------------------------------------------------------------------
+-- USER_STATISTICS
+-----------------------------------------------------------------------------
+
+CREATE TABLE USER_STATISTICS
+(
+    IPADDRESS VARCHAR(80),
+    USER_NAME VARCHAR(80),
+    TIME_STAMP TIMESTAMP,
+    STATUS INTEGER,
+    ELAPSED_TIME BIGINT);
 
 -----------------------------------------------------------------------------
 -- ADMIN_ACTIVITY
@@ -153,7 +153,7 @@
   ATTR_VALUE_BEFORE VARCHAR(80),
   ATTR_VALUE_AFTER VARCHAR(80),
   DESCRIPTION VARCHAR(128));
-
+
 -----------------------------------------------------------------------------
 -- USER_ACTIVITY
 -----------------------------------------------------------------------------

Propchange: portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase1-schema.sql
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase2-schema.sql
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase2-schema.sql?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase2-schema.sql (original)
+++ portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase2-schema.sql Fri Dec 12 04:06:29 2008
@@ -13,641 +13,641 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 
------------------------------------------------------------------------------
--- FOLDER
------------------------------------------------------------------------------
-
-CREATE TABLE FOLDER
-(
-    FOLDER_ID INTEGER NOT NULL,
-    PARENT_ID INTEGER,
-    PATH VARCHAR(240) NOT NULL,
-    NAME VARCHAR(80) NOT NULL,
-    TITLE VARCHAR(100),
-    SHORT_TITLE VARCHAR(40),
-    IS_HIDDEN INTEGER NOT NULL,
-    SKIN VARCHAR(80),
-    DEFAULT_LAYOUT_DECORATOR VARCHAR(80),
-    DEFAULT_PORTLET_DECORATOR VARCHAR(80),
-    DEFAULT_PAGE_NAME VARCHAR(80),
-    SUBSITE VARCHAR(40),
-    USER_PRINCIPAL VARCHAR(40),
-    ROLE_PRINCIPAL VARCHAR(40),
-    GROUP_PRINCIPAL VARCHAR(40),
-    MEDIATYPE VARCHAR(15),
-    LOCALE VARCHAR(20),
-    EXT_ATTR_NAME VARCHAR(15),
-    EXT_ATTR_VALUE VARCHAR(40),
-    OWNER_PRINCIPAL VARCHAR(40),
-    PRIMARY KEY(FOLDER_ID),
-    FOREIGN KEY (PARENT_ID) REFERENCES FOLDER (FOLDER_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (PATH));
-
-CREATE  INDEX IX_FOLDER_1 ON FOLDER (PARENT_ID);
------------------------------------------------------------------------------
--- FOLDER_METADATA
------------------------------------------------------------------------------
-
-CREATE TABLE FOLDER_METADATA
-(
-    METADATA_ID INTEGER NOT NULL,
-    FOLDER_ID INTEGER NOT NULL,
-    NAME VARCHAR(15) NOT NULL,
-    LOCALE VARCHAR(20) NOT NULL,
-    VALUE VARCHAR(100) NOT NULL,
-    PRIMARY KEY(METADATA_ID),
-    FOREIGN KEY (FOLDER_ID) REFERENCES FOLDER (FOLDER_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (FOLDER_ID, NAME, LOCALE, VALUE));
-
-CREATE  INDEX IX_FOLDER_METADATA_1 ON FOLDER_METADATA (FOLDER_ID);
------------------------------------------------------------------------------
--- FOLDER_CONSTRAINT
------------------------------------------------------------------------------
-
-CREATE TABLE FOLDER_CONSTRAINT
-(
-    CONSTRAINT_ID INTEGER NOT NULL,
-    FOLDER_ID INTEGER NOT NULL,
-    APPLY_ORDER INTEGER NOT NULL,
-    USER_PRINCIPALS_ACL VARCHAR(120),
-    ROLE_PRINCIPALS_ACL VARCHAR(120),
-    GROUP_PRINCIPALS_ACL VARCHAR(120),
-    PERMISSIONS_ACL VARCHAR(120),
-    PRIMARY KEY(CONSTRAINT_ID),
-    FOREIGN KEY (FOLDER_ID) REFERENCES FOLDER (FOLDER_ID)
-        ON DELETE CASCADE 
-);
-
-CREATE  INDEX IX_FOLDER_CONSTRAINT_1 ON FOLDER_CONSTRAINT (FOLDER_ID);
------------------------------------------------------------------------------
--- FOLDER_CONSTRAINTS_REF
------------------------------------------------------------------------------
-
-CREATE TABLE FOLDER_CONSTRAINTS_REF
-(
-    CONSTRAINTS_REF_ID INTEGER NOT NULL,
-    FOLDER_ID INTEGER NOT NULL,
-    APPLY_ORDER INTEGER NOT NULL,
-    NAME VARCHAR(40) NOT NULL,
-    PRIMARY KEY(CONSTRAINTS_REF_ID),
-    FOREIGN KEY (FOLDER_ID) REFERENCES FOLDER (FOLDER_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (FOLDER_ID, NAME));
-
-CREATE  INDEX IX_FOLDER_CONSTRAINTS_REF_1 ON FOLDER_CONSTRAINTS_REF (FOLDER_ID);
------------------------------------------------------------------------------
--- FOLDER_ORDER
------------------------------------------------------------------------------
-
-CREATE TABLE FOLDER_ORDER
-(
-    ORDER_ID INTEGER NOT NULL,
-    FOLDER_ID INTEGER NOT NULL,
-    SORT_ORDER INTEGER NOT NULL,
-    NAME VARCHAR(80) NOT NULL,
-    PRIMARY KEY(ORDER_ID),
-    FOREIGN KEY (FOLDER_ID) REFERENCES FOLDER (FOLDER_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (FOLDER_ID, NAME));
-
-CREATE  INDEX IX_FOLDER_ORDER_1 ON FOLDER_ORDER (FOLDER_ID);
--------------------------------------------------------------------------
--- FOLDER_MENU
--------------------------------------------------------------------------
-CREATE TABLE FOLDER_MENU
-(
-    MENU_ID INTEGER NOT NULL,
-    CLASS_NAME VARCHAR(100) NOT NULL,
-    PARENT_ID INTEGER,
-    FOLDER_ID INTEGER,
-    ELEMENT_ORDER INTEGER,
-    NAME VARCHAR(100),
-    TITLE VARCHAR(100),
-    SHORT_TITLE VARCHAR(40),
-    TEXT VARCHAR(100),
-    OPTIONS VARCHAR(255),
-    DEPTH INTEGER,
-    IS_PATHS INTEGER,
-    IS_REGEXP INTEGER,
-    PROFILE VARCHAR(80),
-    OPTIONS_ORDER VARCHAR(255),
-    SKIN VARCHAR(80),
-    IS_NEST INTEGER,
-    PRIMARY KEY(MENU_ID),
-    FOREIGN KEY (PARENT_ID) REFERENCES FOLDER_MENU (MENU_ID)
-        ON DELETE CASCADE 
-  ,
-    FOREIGN KEY (FOLDER_ID) REFERENCES FOLDER (FOLDER_ID)
-        ON DELETE CASCADE 
-
--- Derby doesn't support UNIQUE constraints on nullable columns !!!  
--- replace UNIQUE (FOLDER_ID, NAME) with IX_FOLDER_MENU_UNIQUE_FN index below...
-  );
-
-CREATE  INDEX IX_FOLDER_MENU_1 ON FOLDER_MENU (PARENT_ID);
-CREATE  INDEX IX_FOLDER_MENU_UNIQUE_FN ON FOLDER_MENU (FOLDER_ID, NAME);
---------------------------------------------------------------------------
--- FOLDER_MENU_METADATA
---------------------------------------------------------------------------
-CREATE TABLE FOLDER_MENU_METADATA
-(
-    METADATA_ID INTEGER NOT NULL,
-    MENU_ID INTEGER NOT NULL,
-    NAME VARCHAR(15) NOT NULL,
-    LOCALE VARCHAR(20) NOT NULL,
-    VALUE VARCHAR(100) NOT NULL,
-    PRIMARY KEY(METADATA_ID),
-    FOREIGN KEY (MENU_ID) REFERENCES FOLDER_MENU (MENU_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (MENU_ID, NAME, LOCALE, VALUE));
-
-CREATE  INDEX IX_FOLDER_MENU_METADATA_1 ON FOLDER_MENU_METADATA (MENU_ID);
------------------------------------------------------------------------------
--- PAGE
------------------------------------------------------------------------------
-
-CREATE TABLE PAGE
-(
-    PAGE_ID INTEGER NOT NULL,
-    PARENT_ID INTEGER NOT NULL,
-    PATH VARCHAR(240) NOT NULL,
-    NAME VARCHAR(80) NOT NULL,
-    VERSION VARCHAR (40),
-    TITLE VARCHAR(100),
-    SHORT_TITLE VARCHAR(40),
-    IS_HIDDEN INTEGER NOT NULL,
-    SKIN VARCHAR(80),
-    DEFAULT_LAYOUT_DECORATOR VARCHAR(80),
-    DEFAULT_PORTLET_DECORATOR VARCHAR(80),
-    SUBSITE VARCHAR(40),
-    USER_PRINCIPAL VARCHAR(40),
-    ROLE_PRINCIPAL VARCHAR(40),
-    GROUP_PRINCIPAL VARCHAR(40),
-    MEDIATYPE VARCHAR(15),
-    LOCALE VARCHAR(20),
-    EXT_ATTR_NAME VARCHAR(15),
-    EXT_ATTR_VALUE VARCHAR(40),
-    OWNER_PRINCIPAL VARCHAR(40),
-    PRIMARY KEY(PAGE_ID),
-    FOREIGN KEY (PARENT_ID) REFERENCES FOLDER (FOLDER_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (PATH));
-
-CREATE  INDEX IX_PAGE_1 ON PAGE (PARENT_ID);
------------------------------------------------------------------------------
--- PAGE_METADATA
------------------------------------------------------------------------------
-
-CREATE TABLE PAGE_METADATA
-(
-    METADATA_ID INTEGER NOT NULL,
-    PAGE_ID INTEGER NOT NULL,
-    NAME VARCHAR(15) NOT NULL,
-    LOCALE VARCHAR(20) NOT NULL,
-    VALUE VARCHAR(100) NOT NULL,
-    PRIMARY KEY(METADATA_ID),
-    FOREIGN KEY (PAGE_ID) REFERENCES PAGE (PAGE_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (PAGE_ID, NAME, LOCALE, VALUE));
-
-CREATE  INDEX IX_PAGE_METADATA_1 ON PAGE_METADATA (PAGE_ID);
------------------------------------------------------------------------------
--- PAGE_CONSTRAINT
------------------------------------------------------------------------------
-
-CREATE TABLE PAGE_CONSTRAINT
-(
-    CONSTRAINT_ID INTEGER NOT NULL,
-    PAGE_ID INTEGER NOT NULL,
-    APPLY_ORDER INTEGER NOT NULL,
-    USER_PRINCIPALS_ACL VARCHAR(120),
-    ROLE_PRINCIPALS_ACL VARCHAR(120),
-    GROUP_PRINCIPALS_ACL VARCHAR(120),
-    PERMISSIONS_ACL VARCHAR(120),
-    PRIMARY KEY(CONSTRAINT_ID),
-    FOREIGN KEY (PAGE_ID) REFERENCES PAGE (PAGE_ID)
-        ON DELETE CASCADE 
-);
-
-CREATE  INDEX IX_PAGE_CONSTRAINT_1 ON PAGE_CONSTRAINT (PAGE_ID);
------------------------------------------------------------------------------
--- PAGE_CONSTRAINTS_REF
------------------------------------------------------------------------------
-
-CREATE TABLE PAGE_CONSTRAINTS_REF
-(
-    CONSTRAINTS_REF_ID INTEGER NOT NULL,
-    PAGE_ID INTEGER NOT NULL,
-    APPLY_ORDER INTEGER NOT NULL,
-    NAME VARCHAR(40) NOT NULL,
-    PRIMARY KEY(CONSTRAINTS_REF_ID),
-    FOREIGN KEY (PAGE_ID) REFERENCES PAGE (PAGE_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (PAGE_ID, NAME));
-
-CREATE  INDEX IX_PAGE_CONSTRAINTS_REF_1 ON PAGE_CONSTRAINTS_REF (PAGE_ID);
--------------------------------------------------------------------------
--- PAGE_MENU
--------------------------------------------------------------------------
-CREATE TABLE PAGE_MENU
-(
-    MENU_ID INTEGER NOT NULL,
-    CLASS_NAME VARCHAR(100) NOT NULL,
-    PARENT_ID INTEGER,
-    PAGE_ID INTEGER,
-    ELEMENT_ORDER INTEGER,
-    NAME VARCHAR(100),
-    TITLE VARCHAR(100),
-    SHORT_TITLE VARCHAR(40),
-    TEXT VARCHAR(100),
-    OPTIONS VARCHAR(255),
-    DEPTH INTEGER,
-    IS_PATHS INTEGER,
-    IS_REGEXP INTEGER,
-    PROFILE VARCHAR(80),
-    OPTIONS_ORDER VARCHAR(255),
-    SKIN VARCHAR(80),
-    IS_NEST INTEGER,
-    PRIMARY KEY(MENU_ID),
-    FOREIGN KEY (PARENT_ID) REFERENCES PAGE_MENU (MENU_ID)
-        ON DELETE CASCADE 
-  ,
-    FOREIGN KEY (PAGE_ID) REFERENCES PAGE (PAGE_ID)
-        ON DELETE CASCADE 
-
--- Derby doesn't support UNIQUE constraints on nullable columns !!!  
--- replace UNIQUE (PAGE_ID, NAME) with IX_PAGE_MENU_UNIQUE_PN index below...
-  );
-
-CREATE  INDEX IX_PAGE_MENU_1 ON PAGE_MENU (PARENT_ID);
-CREATE  INDEX IX_PAGE_MENU_UNIQUE_PN ON PAGE_MENU (PAGE_ID, NAME);
---------------------------------------------------------------------------
--- PAGE_MENU_METADATA
---------------------------------------------------------------------------
-CREATE TABLE PAGE_MENU_METADATA
-(
-    METADATA_ID INTEGER NOT NULL,
-    MENU_ID INTEGER NOT NULL,
-    NAME VARCHAR(15) NOT NULL,
-    LOCALE VARCHAR(20) NOT NULL,
-    VALUE VARCHAR(100) NOT NULL,
-    PRIMARY KEY(METADATA_ID),
-    FOREIGN KEY (MENU_ID) REFERENCES PAGE_MENU (MENU_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (MENU_ID, NAME, LOCALE, VALUE));
-
-CREATE  INDEX IX_PAGE_MENU_METADATA_1 ON PAGE_MENU_METADATA (MENU_ID);
------------------------------------------------------------------------------
--- FRAGMENT
------------------------------------------------------------------------------
-
-CREATE TABLE FRAGMENT
-(
-    FRAGMENT_ID INTEGER NOT NULL,
-    PARENT_ID INTEGER,
-    PAGE_ID INTEGER,
-    NAME VARCHAR(100),
-    TITLE VARCHAR(100),
-    SHORT_TITLE VARCHAR(40),
-    TYPE VARCHAR(40),
-    SKIN VARCHAR(80),
-    DECORATOR VARCHAR(80),
-    STATE VARCHAR(10),
-    PMODE VARCHAR(10),
-    LAYOUT_ROW INTEGER,
-    LAYOUT_COLUMN INTEGER,
-    LAYOUT_SIZES VARCHAR(20),
-    LAYOUT_X REAL,
-    LAYOUT_Y REAL,
-    LAYOUT_Z REAL,
-    LAYOUT_WIDTH REAL,
-    LAYOUT_HEIGHT REAL,
-    EXT_PROP_NAME_1 VARCHAR(40),
-    EXT_PROP_VALUE_1 VARCHAR(80),
-    EXT_PROP_NAME_2 VARCHAR(40),
-    EXT_PROP_VALUE_2 VARCHAR(80),
-    OWNER_PRINCIPAL VARCHAR(40),
-    PRIMARY KEY(FRAGMENT_ID),
-    FOREIGN KEY (PARENT_ID) REFERENCES FRAGMENT (FRAGMENT_ID)
-        ON DELETE CASCADE 
-  ,
-    FOREIGN KEY (PAGE_ID) REFERENCES PAGE (PAGE_ID)
-        ON DELETE CASCADE 
-
--- Derby doesn't support UNIQUE constraints on nullable columns !!!  
--- replace UNIQUE (PAGE_ID) with IX_FRAGMENT_UNIQUE_PAGE_ID index below...
-  );
-
-CREATE  INDEX IX_FRAGMENT_1 ON FRAGMENT (PARENT_ID);
-CREATE  INDEX IX_FRAGMENT_UNIQUE_PAGE_ID ON FRAGMENT (PAGE_ID);
------------------------------------------------------------------------------
--- FRAGMENT_CONSTRAINT
------------------------------------------------------------------------------
-
-CREATE TABLE FRAGMENT_CONSTRAINT
-(
-    CONSTRAINT_ID INTEGER NOT NULL,
-    FRAGMENT_ID INTEGER NOT NULL,
-    APPLY_ORDER INTEGER NOT NULL,
-    USER_PRINCIPALS_ACL VARCHAR(120),
-    ROLE_PRINCIPALS_ACL VARCHAR(120),
-    GROUP_PRINCIPALS_ACL VARCHAR(120),
-    PERMISSIONS_ACL VARCHAR(120),
-    PRIMARY KEY(CONSTRAINT_ID),
-    FOREIGN KEY (FRAGMENT_ID) REFERENCES FRAGMENT (FRAGMENT_ID)
-        ON DELETE CASCADE 
-);
-
-CREATE  INDEX IX_FRAGMENT_CONSTRAINT_1 ON FRAGMENT_CONSTRAINT (FRAGMENT_ID);
------------------------------------------------------------------------------
--- FRAGMENT_CONSTRAINTS_REF
------------------------------------------------------------------------------
-
-CREATE TABLE FRAGMENT_CONSTRAINTS_REF
-(
-    CONSTRAINTS_REF_ID INTEGER NOT NULL,
-    FRAGMENT_ID INTEGER NOT NULL,
-    APPLY_ORDER INTEGER NOT NULL,
-    NAME VARCHAR(40) NOT NULL,
-    PRIMARY KEY(CONSTRAINTS_REF_ID),
-    FOREIGN KEY (FRAGMENT_ID) REFERENCES FRAGMENT (FRAGMENT_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (FRAGMENT_ID, NAME));
-
-CREATE  INDEX IX_FRAGMENT_CONSTRAINTS_REF_1 ON FRAGMENT_CONSTRAINTS_REF (FRAGMENT_ID);
------------------------------------------------------------------------------
--- FRAGMENT_PREF
------------------------------------------------------------------------------
-
-CREATE TABLE FRAGMENT_PREF
-(
-    PREF_ID INTEGER NOT NULL,
-    FRAGMENT_ID INTEGER NOT NULL,
-    NAME VARCHAR(40) NOT NULL,
-    IS_READ_ONLY INTEGER NOT NULL,
-    PRIMARY KEY(PREF_ID),
-    FOREIGN KEY (FRAGMENT_ID) REFERENCES FRAGMENT (FRAGMENT_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (FRAGMENT_ID, NAME));
-
-CREATE  INDEX IX_FRAGMENT_PREF_1 ON FRAGMENT_PREF (FRAGMENT_ID);
------------------------------------------------------------------------------
--- FRAGMENT_PREF_VALUE
------------------------------------------------------------------------------
-
-CREATE TABLE FRAGMENT_PREF_VALUE
-(
-    PREF_VALUE_ID INTEGER NOT NULL,
-    PREF_ID INTEGER NOT NULL,
-    VALUE_ORDER INTEGER NOT NULL,
-    VALUE VARCHAR(100) NOT NULL,
-    PRIMARY KEY(PREF_VALUE_ID),
-    FOREIGN KEY (PREF_ID) REFERENCES FRAGMENT_PREF (PREF_ID)
-        ON DELETE CASCADE 
-);
-
-CREATE  INDEX IX_FRAGMENT_PREF_VALUE_1 ON FRAGMENT_PREF_VALUE (PREF_ID);
------------------------------------------------------------------------------
--- LINK
------------------------------------------------------------------------------
-
-CREATE TABLE LINK
-(
-    LINK_ID INTEGER NOT NULL,
-    PARENT_ID INTEGER NOT NULL,
-    PATH VARCHAR(240) NOT NULL,
-    NAME VARCHAR(80) NOT NULL,
-    VERSION VARCHAR (40),
-    TITLE VARCHAR(100),
-    SHORT_TITLE VARCHAR(40),
-    IS_HIDDEN INTEGER NOT NULL,
-    SKIN VARCHAR(80),
-    TARGET VARCHAR(80),
-    URL VARCHAR(255),
-    SUBSITE VARCHAR(40),
-    USER_PRINCIPAL VARCHAR(40),
-    ROLE_PRINCIPAL VARCHAR(40),
-    GROUP_PRINCIPAL VARCHAR(40),
-    MEDIATYPE VARCHAR(15),
-    LOCALE VARCHAR(20),
-    EXT_ATTR_NAME VARCHAR(15),
-    EXT_ATTR_VALUE VARCHAR(40),
-    OWNER_PRINCIPAL VARCHAR(40),
-    PRIMARY KEY(LINK_ID),
-    FOREIGN KEY (PARENT_ID) REFERENCES FOLDER (FOLDER_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (PATH));
-
-CREATE  INDEX IX_LINK_1 ON LINK (PARENT_ID);
------------------------------------------------------------------------------
--- LINK_METADATA
------------------------------------------------------------------------------
-
-CREATE TABLE LINK_METADATA
-(
-    METADATA_ID INTEGER NOT NULL,
-    LINK_ID INTEGER NOT NULL,
-    NAME VARCHAR(15) NOT NULL,
-    LOCALE VARCHAR(20) NOT NULL,
-    VALUE VARCHAR(100) NOT NULL,
-    PRIMARY KEY(METADATA_ID),
-    FOREIGN KEY (LINK_ID) REFERENCES LINK (LINK_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (LINK_ID, NAME, LOCALE, VALUE));
-
-CREATE  INDEX IX_LINK_METADATA_1 ON LINK_METADATA (LINK_ID);
------------------------------------------------------------------------------
--- LINK_CONSTRAINT
------------------------------------------------------------------------------
-
-CREATE TABLE LINK_CONSTRAINT
-(
-    CONSTRAINT_ID INTEGER NOT NULL,
-    LINK_ID INTEGER NOT NULL,
-    APPLY_ORDER INTEGER NOT NULL,
-    USER_PRINCIPALS_ACL VARCHAR(120),
-    ROLE_PRINCIPALS_ACL VARCHAR(120),
-    GROUP_PRINCIPALS_ACL VARCHAR(120),
-    PERMISSIONS_ACL VARCHAR(120),
-    PRIMARY KEY(CONSTRAINT_ID),
-    FOREIGN KEY (LINK_ID) REFERENCES LINK (LINK_ID)
-        ON DELETE CASCADE 
-);
-
-CREATE  INDEX IX_LINK_CONSTRAINT_1 ON LINK_CONSTRAINT (LINK_ID);
------------------------------------------------------------------------------
--- LINK_CONSTRAINTS_REF
------------------------------------------------------------------------------
-
-CREATE TABLE LINK_CONSTRAINTS_REF
-(
-    CONSTRAINTS_REF_ID INTEGER NOT NULL,
-    LINK_ID INTEGER NOT NULL,
-    APPLY_ORDER INTEGER NOT NULL,
-    NAME VARCHAR(40) NOT NULL,
-    PRIMARY KEY(CONSTRAINTS_REF_ID),
-    FOREIGN KEY (LINK_ID) REFERENCES LINK (LINK_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (LINK_ID, NAME));
-
-CREATE  INDEX IX_LINK_CONSTRAINTS_REF_1 ON LINK_CONSTRAINTS_REF (LINK_ID);
------------------------------------------------------------------------------
--- PAGE_SECURITY
------------------------------------------------------------------------------
-
-CREATE TABLE PAGE_SECURITY
-(
-    PAGE_SECURITY_ID INTEGER NOT NULL,
-    PARENT_ID INTEGER NOT NULL,
-    PATH VARCHAR(240) NOT NULL,
-    NAME VARCHAR(80) NOT NULL,
-    VERSION VARCHAR(40),
-    SUBSITE VARCHAR(40),
-    USER_PRINCIPAL VARCHAR(40),
-    ROLE_PRINCIPAL VARCHAR(40),
-    GROUP_PRINCIPAL VARCHAR(40),
-    MEDIATYPE VARCHAR(15),
-    LOCALE VARCHAR(20),
-    EXT_ATTR_NAME VARCHAR(15),
-    EXT_ATTR_VALUE VARCHAR(40),
-    PRIMARY KEY(PAGE_SECURITY_ID),
-    FOREIGN KEY (PARENT_ID) REFERENCES FOLDER (FOLDER_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (PARENT_ID),
-    UNIQUE (PATH));
-
------------------------------------------------------------------------------
--- PAGE_SEC_CONSTRAINTS_DEF
------------------------------------------------------------------------------
-
-CREATE TABLE PAGE_SEC_CONSTRAINTS_DEF
-(
-    CONSTRAINTS_DEF_ID INTEGER NOT NULL,
-    PAGE_SECURITY_ID INTEGER NOT NULL,
-    NAME VARCHAR(40) NOT NULL,
-    PRIMARY KEY(CONSTRAINTS_DEF_ID),
-    FOREIGN KEY (PAGE_SECURITY_ID) REFERENCES PAGE_SECURITY (PAGE_SECURITY_ID)
-        ON DELETE CASCADE 
-  ,
-    UNIQUE (PAGE_SECURITY_ID, NAME));
-
-CREATE  INDEX IX_PAGE_SEC_CONSTRAINTS_DEF_1 ON PAGE_SEC_CONSTRAINTS_DEF (PAGE_SECURITY_ID);
------------------------------------------------------------------------------
--- PAGE_SEC_CONSTRAINT_DEF
------------------------------------------------------------------------------
-
-CREATE TABLE PAGE_SEC_CONSTRAINT_DEF
-(
-    CONSTRAINT_DEF_ID INTEGER NOT NULL,
-    CONSTRAINTS_DEF_ID INTEGER NOT NULL,
-    APPLY_ORDER INTEGER NOT NULL,
-    USER_PRINCIPALS_ACL VARCHAR(120),
-    ROLE_PRINCIPALS_ACL VARCHAR(120),
-    GROUP_PRINCIPALS_ACL VARCHAR(120),
-    PERMISSIONS_ACL VARCHAR(120),
-    PRIMARY KEY(CONSTRAINT_DEF_ID),
-    FOREIGN KEY (CONSTRAINTS_DEF_ID) REFERENCES PAGE_SEC_CONSTRAINTS_DEF (CONSTRAINTS_DEF_ID)
-        ON DELETE CASCADE 
-);
-
-CREATE  INDEX IX_PAGE_SEC_CONSTRAINT_DEF_1 ON PAGE_SEC_CONSTRAINT_DEF (CONSTRAINTS_DEF_ID);
------------------------------------------------------------------------------
--- PAGE_SEC_CONSTRAINTS_REF
------------------------------------------------------------------------------
-
-CREATE TABLE PAGE_SEC_CONSTRAINTS_REF
-(
-    CONSTRAINTS_REF_ID INTEGER NOT NULL,
-    PAGE_SECURITY_ID INTEGER NOT NULL,
-    APPLY_ORDER INTEGER NOT NULL,
-    NAME VARCHAR(40) NOT NULL,
-    PRIMARY KEY(CONSTRAINTS_REF_ID),
-    FOREIGN KEY (PAGE_SECURITY_ID) REFERENCES PAGE_SECURITY (PAGE_SECURITY_ID)
-        ON DELETE CASCADE 
-);
-
-CREATE  INDEX IX_PAGE_SEC_CONSTRAINTS_REF_1 ON PAGE_SEC_CONSTRAINTS_REF (PAGE_SECURITY_ID);
------------------------------------------------------------------------------
--- PROFILING_RULE
------------------------------------------------------------------------------
-
-CREATE TABLE PROFILING_RULE
-(
-    RULE_ID VARCHAR(80) NOT NULL,
-    CLASS_NAME VARCHAR(100) NOT NULL,
-    TITLE VARCHAR(100),
-    PRIMARY KEY(RULE_ID));
-
------------------------------------------------------------------------------
--- RULE_CRITERION
------------------------------------------------------------------------------
-
-CREATE TABLE RULE_CRITERION
-(
-    CRITERION_ID VARCHAR(80) NOT NULL,
-    RULE_ID VARCHAR(80) NOT NULL,
-    FALLBACK_ORDER INTEGER NOT NULL,
-    REQUEST_TYPE VARCHAR(40) NOT NULL,
-    NAME VARCHAR(80) NOT NULL,
-    COLUMN_VALUE VARCHAR(128),
-    FALLBACK_TYPE INTEGER default 1,
-    PRIMARY KEY(CRITERION_ID),
-    FOREIGN KEY (RULE_ID) REFERENCES PROFILING_RULE (RULE_ID)
-        ON DELETE CASCADE 
-);
-
-CREATE  INDEX IX_RULE_CRITERION_1 ON RULE_CRITERION (RULE_ID, FALLBACK_ORDER);
------------------------------------------------------------------------------
--- PRINCIPAL_RULE_ASSOC
------------------------------------------------------------------------------
-
-CREATE TABLE PRINCIPAL_RULE_ASSOC
-(
-    PRINCIPAL_NAME VARCHAR(80) NOT NULL,
-    LOCATOR_NAME VARCHAR(80) NOT NULL,
-    RULE_ID VARCHAR(80) NOT NULL,
-    PRIMARY KEY(PRINCIPAL_NAME,LOCATOR_NAME));
-
------------------------------------------------------------------------------
--- PROFILE_PAGE_ASSOC
------------------------------------------------------------------------------
-
-CREATE TABLE PROFILE_PAGE_ASSOC
-(
-    LOCATOR_HASH VARCHAR(40) NOT NULL,
-    PAGE_ID VARCHAR(80) NOT NULL,
-    UNIQUE (LOCATOR_HASH, PAGE_ID));
-
------------------------------------------------------------------------------
--- CLUBS
------------------------------------------------------------------------------
-
-CREATE TABLE CLUBS
-(
-    NAME VARCHAR(80) NOT NULL,
-    COUNTRY VARCHAR(40) NOT NULL,
-    CITY VARCHAR(40) NOT NULL,
-    STADIUM VARCHAR(80) NOT NULL,
-    CAPACITY INTEGER,
-    FOUNDED INTEGER,
-    PITCH VARCHAR(40),
-    NICKNAME VARCHAR(40),
-    PRIMARY KEY(NAME));
-
+-----------------------------------------------------------------------------
+-- FOLDER
+-----------------------------------------------------------------------------
+
+CREATE TABLE FOLDER
+(
+    FOLDER_ID INTEGER NOT NULL,
+    PARENT_ID INTEGER,
+    PATH VARCHAR(240) NOT NULL,
+    NAME VARCHAR(80) NOT NULL,
+    TITLE VARCHAR(100),
+    SHORT_TITLE VARCHAR(40),
+    IS_HIDDEN INTEGER NOT NULL,
+    SKIN VARCHAR(80),
+    DEFAULT_LAYOUT_DECORATOR VARCHAR(80),
+    DEFAULT_PORTLET_DECORATOR VARCHAR(80),
+    DEFAULT_PAGE_NAME VARCHAR(80),
+    SUBSITE VARCHAR(40),
+    USER_PRINCIPAL VARCHAR(40),
+    ROLE_PRINCIPAL VARCHAR(40),
+    GROUP_PRINCIPAL VARCHAR(40),
+    MEDIATYPE VARCHAR(15),
+    LOCALE VARCHAR(20),
+    EXT_ATTR_NAME VARCHAR(15),
+    EXT_ATTR_VALUE VARCHAR(40),
+    OWNER_PRINCIPAL VARCHAR(40),
+    PRIMARY KEY(FOLDER_ID),
+    FOREIGN KEY (PARENT_ID) REFERENCES FOLDER (FOLDER_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (PATH));
+
+CREATE  INDEX IX_FOLDER_1 ON FOLDER (PARENT_ID);
+-----------------------------------------------------------------------------
+-- FOLDER_METADATA
+-----------------------------------------------------------------------------
+
+CREATE TABLE FOLDER_METADATA
+(
+    METADATA_ID INTEGER NOT NULL,
+    FOLDER_ID INTEGER NOT NULL,
+    NAME VARCHAR(15) NOT NULL,
+    LOCALE VARCHAR(20) NOT NULL,
+    VALUE VARCHAR(100) NOT NULL,
+    PRIMARY KEY(METADATA_ID),
+    FOREIGN KEY (FOLDER_ID) REFERENCES FOLDER (FOLDER_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (FOLDER_ID, NAME, LOCALE, VALUE));
+
+CREATE  INDEX IX_FOLDER_METADATA_1 ON FOLDER_METADATA (FOLDER_ID);
+-----------------------------------------------------------------------------
+-- FOLDER_CONSTRAINT
+-----------------------------------------------------------------------------
+
+CREATE TABLE FOLDER_CONSTRAINT
+(
+    CONSTRAINT_ID INTEGER NOT NULL,
+    FOLDER_ID INTEGER NOT NULL,
+    APPLY_ORDER INTEGER NOT NULL,
+    USER_PRINCIPALS_ACL VARCHAR(120),
+    ROLE_PRINCIPALS_ACL VARCHAR(120),
+    GROUP_PRINCIPALS_ACL VARCHAR(120),
+    PERMISSIONS_ACL VARCHAR(120),
+    PRIMARY KEY(CONSTRAINT_ID),
+    FOREIGN KEY (FOLDER_ID) REFERENCES FOLDER (FOLDER_ID)
+        ON DELETE CASCADE 
+);
+
+CREATE  INDEX IX_FOLDER_CONSTRAINT_1 ON FOLDER_CONSTRAINT (FOLDER_ID);
+-----------------------------------------------------------------------------
+-- FOLDER_CONSTRAINTS_REF
+-----------------------------------------------------------------------------
+
+CREATE TABLE FOLDER_CONSTRAINTS_REF
+(
+    CONSTRAINTS_REF_ID INTEGER NOT NULL,
+    FOLDER_ID INTEGER NOT NULL,
+    APPLY_ORDER INTEGER NOT NULL,
+    NAME VARCHAR(40) NOT NULL,
+    PRIMARY KEY(CONSTRAINTS_REF_ID),
+    FOREIGN KEY (FOLDER_ID) REFERENCES FOLDER (FOLDER_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (FOLDER_ID, NAME));
+
+CREATE  INDEX IX_FOLDER_CONSTRAINTS_REF_1 ON FOLDER_CONSTRAINTS_REF (FOLDER_ID);
+-----------------------------------------------------------------------------
+-- FOLDER_ORDER
+-----------------------------------------------------------------------------
+
+CREATE TABLE FOLDER_ORDER
+(
+    ORDER_ID INTEGER NOT NULL,
+    FOLDER_ID INTEGER NOT NULL,
+    SORT_ORDER INTEGER NOT NULL,
+    NAME VARCHAR(80) NOT NULL,
+    PRIMARY KEY(ORDER_ID),
+    FOREIGN KEY (FOLDER_ID) REFERENCES FOLDER (FOLDER_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (FOLDER_ID, NAME));
+
+CREATE  INDEX IX_FOLDER_ORDER_1 ON FOLDER_ORDER (FOLDER_ID);
+-------------------------------------------------------------------------
+-- FOLDER_MENU
+-------------------------------------------------------------------------
+CREATE TABLE FOLDER_MENU
+(
+    MENU_ID INTEGER NOT NULL,
+    CLASS_NAME VARCHAR(100) NOT NULL,
+    PARENT_ID INTEGER,
+    FOLDER_ID INTEGER,
+    ELEMENT_ORDER INTEGER,
+    NAME VARCHAR(100),
+    TITLE VARCHAR(100),
+    SHORT_TITLE VARCHAR(40),
+    TEXT VARCHAR(100),
+    OPTIONS VARCHAR(255),
+    DEPTH INTEGER,
+    IS_PATHS INTEGER,
+    IS_REGEXP INTEGER,
+    PROFILE VARCHAR(80),
+    OPTIONS_ORDER VARCHAR(255),
+    SKIN VARCHAR(80),
+    IS_NEST INTEGER,
+    PRIMARY KEY(MENU_ID),
+    FOREIGN KEY (PARENT_ID) REFERENCES FOLDER_MENU (MENU_ID)
+        ON DELETE CASCADE 
+  ,
+    FOREIGN KEY (FOLDER_ID) REFERENCES FOLDER (FOLDER_ID)
+        ON DELETE CASCADE 
+
+-- Derby doesn't support UNIQUE constraints on nullable columns !!!  
+-- replace UNIQUE (FOLDER_ID, NAME) with IX_FOLDER_MENU_UNIQUE_FN index below...
+  );
+
+CREATE  INDEX IX_FOLDER_MENU_1 ON FOLDER_MENU (PARENT_ID);
+CREATE  INDEX IX_FOLDER_MENU_UNIQUE_FN ON FOLDER_MENU (FOLDER_ID, NAME);
+--------------------------------------------------------------------------
+-- FOLDER_MENU_METADATA
+--------------------------------------------------------------------------
+CREATE TABLE FOLDER_MENU_METADATA
+(
+    METADATA_ID INTEGER NOT NULL,
+    MENU_ID INTEGER NOT NULL,
+    NAME VARCHAR(15) NOT NULL,
+    LOCALE VARCHAR(20) NOT NULL,
+    VALUE VARCHAR(100) NOT NULL,
+    PRIMARY KEY(METADATA_ID),
+    FOREIGN KEY (MENU_ID) REFERENCES FOLDER_MENU (MENU_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (MENU_ID, NAME, LOCALE, VALUE));
+
+CREATE  INDEX IX_FOLDER_MENU_METADATA_1 ON FOLDER_MENU_METADATA (MENU_ID);
+-----------------------------------------------------------------------------
+-- PAGE
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE
+(
+    PAGE_ID INTEGER NOT NULL,
+    PARENT_ID INTEGER NOT NULL,
+    PATH VARCHAR(240) NOT NULL,
+    NAME VARCHAR(80) NOT NULL,
+    VERSION VARCHAR (40),
+    TITLE VARCHAR(100),
+    SHORT_TITLE VARCHAR(40),
+    IS_HIDDEN INTEGER NOT NULL,
+    SKIN VARCHAR(80),
+    DEFAULT_LAYOUT_DECORATOR VARCHAR(80),
+    DEFAULT_PORTLET_DECORATOR VARCHAR(80),
+    SUBSITE VARCHAR(40),
+    USER_PRINCIPAL VARCHAR(40),
+    ROLE_PRINCIPAL VARCHAR(40),
+    GROUP_PRINCIPAL VARCHAR(40),
+    MEDIATYPE VARCHAR(15),
+    LOCALE VARCHAR(20),
+    EXT_ATTR_NAME VARCHAR(15),
+    EXT_ATTR_VALUE VARCHAR(40),
+    OWNER_PRINCIPAL VARCHAR(40),
+    PRIMARY KEY(PAGE_ID),
+    FOREIGN KEY (PARENT_ID) REFERENCES FOLDER (FOLDER_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (PATH));
+
+CREATE  INDEX IX_PAGE_1 ON PAGE (PARENT_ID);
+-----------------------------------------------------------------------------
+-- PAGE_METADATA
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_METADATA
+(
+    METADATA_ID INTEGER NOT NULL,
+    PAGE_ID INTEGER NOT NULL,
+    NAME VARCHAR(15) NOT NULL,
+    LOCALE VARCHAR(20) NOT NULL,
+    VALUE VARCHAR(100) NOT NULL,
+    PRIMARY KEY(METADATA_ID),
+    FOREIGN KEY (PAGE_ID) REFERENCES PAGE (PAGE_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (PAGE_ID, NAME, LOCALE, VALUE));
+
+CREATE  INDEX IX_PAGE_METADATA_1 ON PAGE_METADATA (PAGE_ID);
+-----------------------------------------------------------------------------
+-- PAGE_CONSTRAINT
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_CONSTRAINT
+(
+    CONSTRAINT_ID INTEGER NOT NULL,
+    PAGE_ID INTEGER NOT NULL,
+    APPLY_ORDER INTEGER NOT NULL,
+    USER_PRINCIPALS_ACL VARCHAR(120),
+    ROLE_PRINCIPALS_ACL VARCHAR(120),
+    GROUP_PRINCIPALS_ACL VARCHAR(120),
+    PERMISSIONS_ACL VARCHAR(120),
+    PRIMARY KEY(CONSTRAINT_ID),
+    FOREIGN KEY (PAGE_ID) REFERENCES PAGE (PAGE_ID)
+        ON DELETE CASCADE 
+);
+
+CREATE  INDEX IX_PAGE_CONSTRAINT_1 ON PAGE_CONSTRAINT (PAGE_ID);
+-----------------------------------------------------------------------------
+-- PAGE_CONSTRAINTS_REF
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_CONSTRAINTS_REF
+(
+    CONSTRAINTS_REF_ID INTEGER NOT NULL,
+    PAGE_ID INTEGER NOT NULL,
+    APPLY_ORDER INTEGER NOT NULL,
+    NAME VARCHAR(40) NOT NULL,
+    PRIMARY KEY(CONSTRAINTS_REF_ID),
+    FOREIGN KEY (PAGE_ID) REFERENCES PAGE (PAGE_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (PAGE_ID, NAME));
+
+CREATE  INDEX IX_PAGE_CONSTRAINTS_REF_1 ON PAGE_CONSTRAINTS_REF (PAGE_ID);
+-------------------------------------------------------------------------
+-- PAGE_MENU
+-------------------------------------------------------------------------
+CREATE TABLE PAGE_MENU
+(
+    MENU_ID INTEGER NOT NULL,
+    CLASS_NAME VARCHAR(100) NOT NULL,
+    PARENT_ID INTEGER,
+    PAGE_ID INTEGER,
+    ELEMENT_ORDER INTEGER,
+    NAME VARCHAR(100),
+    TITLE VARCHAR(100),
+    SHORT_TITLE VARCHAR(40),
+    TEXT VARCHAR(100),
+    OPTIONS VARCHAR(255),
+    DEPTH INTEGER,
+    IS_PATHS INTEGER,
+    IS_REGEXP INTEGER,
+    PROFILE VARCHAR(80),
+    OPTIONS_ORDER VARCHAR(255),
+    SKIN VARCHAR(80),
+    IS_NEST INTEGER,
+    PRIMARY KEY(MENU_ID),
+    FOREIGN KEY (PARENT_ID) REFERENCES PAGE_MENU (MENU_ID)
+        ON DELETE CASCADE 
+  ,
+    FOREIGN KEY (PAGE_ID) REFERENCES PAGE (PAGE_ID)
+        ON DELETE CASCADE 
+
+-- Derby doesn't support UNIQUE constraints on nullable columns !!!  
+-- replace UNIQUE (PAGE_ID, NAME) with IX_PAGE_MENU_UNIQUE_PN index below...
+  );
+
+CREATE  INDEX IX_PAGE_MENU_1 ON PAGE_MENU (PARENT_ID);
+CREATE  INDEX IX_PAGE_MENU_UNIQUE_PN ON PAGE_MENU (PAGE_ID, NAME);
+--------------------------------------------------------------------------
+-- PAGE_MENU_METADATA
+--------------------------------------------------------------------------
+CREATE TABLE PAGE_MENU_METADATA
+(
+    METADATA_ID INTEGER NOT NULL,
+    MENU_ID INTEGER NOT NULL,
+    NAME VARCHAR(15) NOT NULL,
+    LOCALE VARCHAR(20) NOT NULL,
+    VALUE VARCHAR(100) NOT NULL,
+    PRIMARY KEY(METADATA_ID),
+    FOREIGN KEY (MENU_ID) REFERENCES PAGE_MENU (MENU_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (MENU_ID, NAME, LOCALE, VALUE));
+
+CREATE  INDEX IX_PAGE_MENU_METADATA_1 ON PAGE_MENU_METADATA (MENU_ID);
+-----------------------------------------------------------------------------
+-- FRAGMENT
+-----------------------------------------------------------------------------
+
+CREATE TABLE FRAGMENT
+(
+    FRAGMENT_ID INTEGER NOT NULL,
+    PARENT_ID INTEGER,
+    PAGE_ID INTEGER,
+    NAME VARCHAR(100),
+    TITLE VARCHAR(100),
+    SHORT_TITLE VARCHAR(40),
+    TYPE VARCHAR(40),
+    SKIN VARCHAR(80),
+    DECORATOR VARCHAR(80),
+    STATE VARCHAR(10),
+    PMODE VARCHAR(10),
+    LAYOUT_ROW INTEGER,
+    LAYOUT_COLUMN INTEGER,
+    LAYOUT_SIZES VARCHAR(20),
+    LAYOUT_X REAL,
+    LAYOUT_Y REAL,
+    LAYOUT_Z REAL,
+    LAYOUT_WIDTH REAL,
+    LAYOUT_HEIGHT REAL,
+    EXT_PROP_NAME_1 VARCHAR(40),
+    EXT_PROP_VALUE_1 VARCHAR(80),
+    EXT_PROP_NAME_2 VARCHAR(40),
+    EXT_PROP_VALUE_2 VARCHAR(80),
+    OWNER_PRINCIPAL VARCHAR(40),
+    PRIMARY KEY(FRAGMENT_ID),
+    FOREIGN KEY (PARENT_ID) REFERENCES FRAGMENT (FRAGMENT_ID)
+        ON DELETE CASCADE 
+  ,
+    FOREIGN KEY (PAGE_ID) REFERENCES PAGE (PAGE_ID)
+        ON DELETE CASCADE 
+
+-- Derby doesn't support UNIQUE constraints on nullable columns !!!  
+-- replace UNIQUE (PAGE_ID) with IX_FRAGMENT_UNIQUE_PAGE_ID index below...
+  );
+
+CREATE  INDEX IX_FRAGMENT_1 ON FRAGMENT (PARENT_ID);
+CREATE  INDEX IX_FRAGMENT_UNIQUE_PAGE_ID ON FRAGMENT (PAGE_ID);
+-----------------------------------------------------------------------------
+-- FRAGMENT_CONSTRAINT
+-----------------------------------------------------------------------------
+
+CREATE TABLE FRAGMENT_CONSTRAINT
+(
+    CONSTRAINT_ID INTEGER NOT NULL,
+    FRAGMENT_ID INTEGER NOT NULL,
+    APPLY_ORDER INTEGER NOT NULL,
+    USER_PRINCIPALS_ACL VARCHAR(120),
+    ROLE_PRINCIPALS_ACL VARCHAR(120),
+    GROUP_PRINCIPALS_ACL VARCHAR(120),
+    PERMISSIONS_ACL VARCHAR(120),
+    PRIMARY KEY(CONSTRAINT_ID),
+    FOREIGN KEY (FRAGMENT_ID) REFERENCES FRAGMENT (FRAGMENT_ID)
+        ON DELETE CASCADE 
+);
+
+CREATE  INDEX IX_FRAGMENT_CONSTRAINT_1 ON FRAGMENT_CONSTRAINT (FRAGMENT_ID);
+-----------------------------------------------------------------------------
+-- FRAGMENT_CONSTRAINTS_REF
+-----------------------------------------------------------------------------
+
+CREATE TABLE FRAGMENT_CONSTRAINTS_REF
+(
+    CONSTRAINTS_REF_ID INTEGER NOT NULL,
+    FRAGMENT_ID INTEGER NOT NULL,
+    APPLY_ORDER INTEGER NOT NULL,
+    NAME VARCHAR(40) NOT NULL,
+    PRIMARY KEY(CONSTRAINTS_REF_ID),
+    FOREIGN KEY (FRAGMENT_ID) REFERENCES FRAGMENT (FRAGMENT_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (FRAGMENT_ID, NAME));
+
+CREATE  INDEX IX_FRAGMENT_CONSTRAINTS_REF_1 ON FRAGMENT_CONSTRAINTS_REF (FRAGMENT_ID);
+-----------------------------------------------------------------------------
+-- FRAGMENT_PREF
+-----------------------------------------------------------------------------
+
+CREATE TABLE FRAGMENT_PREF
+(
+    PREF_ID INTEGER NOT NULL,
+    FRAGMENT_ID INTEGER NOT NULL,
+    NAME VARCHAR(40) NOT NULL,
+    IS_READ_ONLY INTEGER NOT NULL,
+    PRIMARY KEY(PREF_ID),
+    FOREIGN KEY (FRAGMENT_ID) REFERENCES FRAGMENT (FRAGMENT_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (FRAGMENT_ID, NAME));
+
+CREATE  INDEX IX_FRAGMENT_PREF_1 ON FRAGMENT_PREF (FRAGMENT_ID);
+-----------------------------------------------------------------------------
+-- FRAGMENT_PREF_VALUE
+-----------------------------------------------------------------------------
+
+CREATE TABLE FRAGMENT_PREF_VALUE
+(
+    PREF_VALUE_ID INTEGER NOT NULL,
+    PREF_ID INTEGER NOT NULL,
+    VALUE_ORDER INTEGER NOT NULL,
+    VALUE VARCHAR(100) NOT NULL,
+    PRIMARY KEY(PREF_VALUE_ID),
+    FOREIGN KEY (PREF_ID) REFERENCES FRAGMENT_PREF (PREF_ID)
+        ON DELETE CASCADE 
+);
+
+CREATE  INDEX IX_FRAGMENT_PREF_VALUE_1 ON FRAGMENT_PREF_VALUE (PREF_ID);
+-----------------------------------------------------------------------------
+-- LINK
+-----------------------------------------------------------------------------
+
+CREATE TABLE LINK
+(
+    LINK_ID INTEGER NOT NULL,
+    PARENT_ID INTEGER NOT NULL,
+    PATH VARCHAR(240) NOT NULL,
+    NAME VARCHAR(80) NOT NULL,
+    VERSION VARCHAR (40),
+    TITLE VARCHAR(100),
+    SHORT_TITLE VARCHAR(40),
+    IS_HIDDEN INTEGER NOT NULL,
+    SKIN VARCHAR(80),
+    TARGET VARCHAR(80),
+    URL VARCHAR(255),
+    SUBSITE VARCHAR(40),
+    USER_PRINCIPAL VARCHAR(40),
+    ROLE_PRINCIPAL VARCHAR(40),
+    GROUP_PRINCIPAL VARCHAR(40),
+    MEDIATYPE VARCHAR(15),
+    LOCALE VARCHAR(20),
+    EXT_ATTR_NAME VARCHAR(15),
+    EXT_ATTR_VALUE VARCHAR(40),
+    OWNER_PRINCIPAL VARCHAR(40),
+    PRIMARY KEY(LINK_ID),
+    FOREIGN KEY (PARENT_ID) REFERENCES FOLDER (FOLDER_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (PATH));
+
+CREATE  INDEX IX_LINK_1 ON LINK (PARENT_ID);
+-----------------------------------------------------------------------------
+-- LINK_METADATA
+-----------------------------------------------------------------------------
+
+CREATE TABLE LINK_METADATA
+(
+    METADATA_ID INTEGER NOT NULL,
+    LINK_ID INTEGER NOT NULL,
+    NAME VARCHAR(15) NOT NULL,
+    LOCALE VARCHAR(20) NOT NULL,
+    VALUE VARCHAR(100) NOT NULL,
+    PRIMARY KEY(METADATA_ID),
+    FOREIGN KEY (LINK_ID) REFERENCES LINK (LINK_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (LINK_ID, NAME, LOCALE, VALUE));
+
+CREATE  INDEX IX_LINK_METADATA_1 ON LINK_METADATA (LINK_ID);
+-----------------------------------------------------------------------------
+-- LINK_CONSTRAINT
+-----------------------------------------------------------------------------
+
+CREATE TABLE LINK_CONSTRAINT
+(
+    CONSTRAINT_ID INTEGER NOT NULL,
+    LINK_ID INTEGER NOT NULL,
+    APPLY_ORDER INTEGER NOT NULL,
+    USER_PRINCIPALS_ACL VARCHAR(120),
+    ROLE_PRINCIPALS_ACL VARCHAR(120),
+    GROUP_PRINCIPALS_ACL VARCHAR(120),
+    PERMISSIONS_ACL VARCHAR(120),
+    PRIMARY KEY(CONSTRAINT_ID),
+    FOREIGN KEY (LINK_ID) REFERENCES LINK (LINK_ID)
+        ON DELETE CASCADE 
+);
+
+CREATE  INDEX IX_LINK_CONSTRAINT_1 ON LINK_CONSTRAINT (LINK_ID);
+-----------------------------------------------------------------------------
+-- LINK_CONSTRAINTS_REF
+-----------------------------------------------------------------------------
+
+CREATE TABLE LINK_CONSTRAINTS_REF
+(
+    CONSTRAINTS_REF_ID INTEGER NOT NULL,
+    LINK_ID INTEGER NOT NULL,
+    APPLY_ORDER INTEGER NOT NULL,
+    NAME VARCHAR(40) NOT NULL,
+    PRIMARY KEY(CONSTRAINTS_REF_ID),
+    FOREIGN KEY (LINK_ID) REFERENCES LINK (LINK_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (LINK_ID, NAME));
+
+CREATE  INDEX IX_LINK_CONSTRAINTS_REF_1 ON LINK_CONSTRAINTS_REF (LINK_ID);
+-----------------------------------------------------------------------------
+-- PAGE_SECURITY
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_SECURITY
+(
+    PAGE_SECURITY_ID INTEGER NOT NULL,
+    PARENT_ID INTEGER NOT NULL,
+    PATH VARCHAR(240) NOT NULL,
+    NAME VARCHAR(80) NOT NULL,
+    VERSION VARCHAR(40),
+    SUBSITE VARCHAR(40),
+    USER_PRINCIPAL VARCHAR(40),
+    ROLE_PRINCIPAL VARCHAR(40),
+    GROUP_PRINCIPAL VARCHAR(40),
+    MEDIATYPE VARCHAR(15),
+    LOCALE VARCHAR(20),
+    EXT_ATTR_NAME VARCHAR(15),
+    EXT_ATTR_VALUE VARCHAR(40),
+    PRIMARY KEY(PAGE_SECURITY_ID),
+    FOREIGN KEY (PARENT_ID) REFERENCES FOLDER (FOLDER_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (PARENT_ID),
+    UNIQUE (PATH));
+
+-----------------------------------------------------------------------------
+-- PAGE_SEC_CONSTRAINTS_DEF
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_SEC_CONSTRAINTS_DEF
+(
+    CONSTRAINTS_DEF_ID INTEGER NOT NULL,
+    PAGE_SECURITY_ID INTEGER NOT NULL,
+    NAME VARCHAR(40) NOT NULL,
+    PRIMARY KEY(CONSTRAINTS_DEF_ID),
+    FOREIGN KEY (PAGE_SECURITY_ID) REFERENCES PAGE_SECURITY (PAGE_SECURITY_ID)
+        ON DELETE CASCADE 
+  ,
+    UNIQUE (PAGE_SECURITY_ID, NAME));
+
+CREATE  INDEX IX_PAGE_SEC_CONSTRAINTS_DEF_1 ON PAGE_SEC_CONSTRAINTS_DEF (PAGE_SECURITY_ID);
+-----------------------------------------------------------------------------
+-- PAGE_SEC_CONSTRAINT_DEF
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_SEC_CONSTRAINT_DEF
+(
+    CONSTRAINT_DEF_ID INTEGER NOT NULL,
+    CONSTRAINTS_DEF_ID INTEGER NOT NULL,
+    APPLY_ORDER INTEGER NOT NULL,
+    USER_PRINCIPALS_ACL VARCHAR(120),
+    ROLE_PRINCIPALS_ACL VARCHAR(120),
+    GROUP_PRINCIPALS_ACL VARCHAR(120),
+    PERMISSIONS_ACL VARCHAR(120),
+    PRIMARY KEY(CONSTRAINT_DEF_ID),
+    FOREIGN KEY (CONSTRAINTS_DEF_ID) REFERENCES PAGE_SEC_CONSTRAINTS_DEF (CONSTRAINTS_DEF_ID)
+        ON DELETE CASCADE 
+);
+
+CREATE  INDEX IX_PAGE_SEC_CONSTRAINT_DEF_1 ON PAGE_SEC_CONSTRAINT_DEF (CONSTRAINTS_DEF_ID);
+-----------------------------------------------------------------------------
+-- PAGE_SEC_CONSTRAINTS_REF
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_SEC_CONSTRAINTS_REF
+(
+    CONSTRAINTS_REF_ID INTEGER NOT NULL,
+    PAGE_SECURITY_ID INTEGER NOT NULL,
+    APPLY_ORDER INTEGER NOT NULL,
+    NAME VARCHAR(40) NOT NULL,
+    PRIMARY KEY(CONSTRAINTS_REF_ID),
+    FOREIGN KEY (PAGE_SECURITY_ID) REFERENCES PAGE_SECURITY (PAGE_SECURITY_ID)
+        ON DELETE CASCADE 
+);
+
+CREATE  INDEX IX_PAGE_SEC_CONSTRAINTS_REF_1 ON PAGE_SEC_CONSTRAINTS_REF (PAGE_SECURITY_ID);
+-----------------------------------------------------------------------------
+-- PROFILING_RULE
+-----------------------------------------------------------------------------
+
+CREATE TABLE PROFILING_RULE
+(
+    RULE_ID VARCHAR(80) NOT NULL,
+    CLASS_NAME VARCHAR(100) NOT NULL,
+    TITLE VARCHAR(100),
+    PRIMARY KEY(RULE_ID));
+
+-----------------------------------------------------------------------------
+-- RULE_CRITERION
+-----------------------------------------------------------------------------
+
+CREATE TABLE RULE_CRITERION
+(
+    CRITERION_ID VARCHAR(80) NOT NULL,
+    RULE_ID VARCHAR(80) NOT NULL,
+    FALLBACK_ORDER INTEGER NOT NULL,
+    REQUEST_TYPE VARCHAR(40) NOT NULL,
+    NAME VARCHAR(80) NOT NULL,
+    COLUMN_VALUE VARCHAR(128),
+    FALLBACK_TYPE INTEGER default 1,
+    PRIMARY KEY(CRITERION_ID),
+    FOREIGN KEY (RULE_ID) REFERENCES PROFILING_RULE (RULE_ID)
+        ON DELETE CASCADE 
+);
+
+CREATE  INDEX IX_RULE_CRITERION_1 ON RULE_CRITERION (RULE_ID, FALLBACK_ORDER);
+-----------------------------------------------------------------------------
+-- PRINCIPAL_RULE_ASSOC
+-----------------------------------------------------------------------------
+
+CREATE TABLE PRINCIPAL_RULE_ASSOC
+(
+    PRINCIPAL_NAME VARCHAR(80) NOT NULL,
+    LOCATOR_NAME VARCHAR(80) NOT NULL,
+    RULE_ID VARCHAR(80) NOT NULL,
+    PRIMARY KEY(PRINCIPAL_NAME,LOCATOR_NAME));
+
+-----------------------------------------------------------------------------
+-- PROFILE_PAGE_ASSOC
+-----------------------------------------------------------------------------
+
+CREATE TABLE PROFILE_PAGE_ASSOC
+(
+    LOCATOR_HASH VARCHAR(40) NOT NULL,
+    PAGE_ID VARCHAR(80) NOT NULL,
+    UNIQUE (LOCATOR_HASH, PAGE_ID));
+
+-----------------------------------------------------------------------------
+-- CLUBS
+-----------------------------------------------------------------------------
+
+CREATE TABLE CLUBS
+(
+    NAME VARCHAR(80) NOT NULL,
+    COUNTRY VARCHAR(40) NOT NULL,
+    CITY VARCHAR(40) NOT NULL,
+    STADIUM VARCHAR(80) NOT NULL,
+    CAPACITY INTEGER,
+    FOUNDED INTEGER,
+    PITCH VARCHAR(40),
+    NICKNAME VARCHAR(40),
+    PRIMARY KEY(NAME));
+

Propchange: portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase2-schema.sql
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase3ojb-schema.sql
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase3ojb-schema.sql?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase3ojb-schema.sql (original)
+++ portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase3ojb-schema.sql Fri Dec 12 04:06:29 2008
@@ -13,93 +13,93 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 
------------------------------------------------------------------------------
--- OJB_HL_SEQ
------------------------------------------------------------------------------
-
-CREATE TABLE OJB_HL_SEQ
-(
-    TABLENAME VARCHAR(175) NOT NULL,
-    FIELDNAME VARCHAR(70) NOT NULL,
-    MAX_KEY INTEGER,
-    GRAB_SIZE INTEGER,
-    VERSION INTEGER,
-    PRIMARY KEY(TABLENAME,FIELDNAME));
-
------------------------------------------------------------------------------
--- OJB_LOCKENTRY
------------------------------------------------------------------------------
-
-CREATE TABLE OJB_LOCKENTRY
-(
-    OID_ VARCHAR(250) NOT NULL,
-    TX_ID VARCHAR(50) NOT NULL,
-    TIMESTAMP_ TIMESTAMP,
-    ISOLATIONLEVEL INTEGER,
-    LOCKTYPE INTEGER,
-    PRIMARY KEY(OID_,TX_ID));
-
------------------------------------------------------------------------------
--- OJB_NRM
------------------------------------------------------------------------------
-
-CREATE TABLE OJB_NRM
-(
-    NAME VARCHAR(250) NOT NULL,
-    OID_ BLOB,
-    PRIMARY KEY(NAME));
-
------------------------------------------------------------------------------
--- OJB_DLIST
------------------------------------------------------------------------------
-
-CREATE TABLE OJB_DLIST
-(
-    ID INTEGER NOT NULL,
-    SIZE_ INTEGER,
-    PRIMARY KEY(ID));
-
------------------------------------------------------------------------------
--- OJB_DLIST_ENTRIES
------------------------------------------------------------------------------
-
-CREATE TABLE OJB_DLIST_ENTRIES
-(
-    ID INTEGER NOT NULL,
-    DLIST_ID INTEGER,
-    POSITION_ INTEGER,
-    OID_ BLOB,
-    PRIMARY KEY(ID));
-
------------------------------------------------------------------------------
--- OJB_DSET
------------------------------------------------------------------------------
-
-CREATE TABLE OJB_DSET
-(
-    ID INTEGER NOT NULL,
-    SIZE_ INTEGER,
-    PRIMARY KEY(ID));
-
------------------------------------------------------------------------------
--- OJB_DSET_ENTRIES
------------------------------------------------------------------------------
-
-CREATE TABLE OJB_DSET_ENTRIES
-(
-    ID INTEGER NOT NULL,
-    DLIST_ID INTEGER,
-    POSITION_ INTEGER,
-    OID_ BLOB,
-    PRIMARY KEY(ID));
-
------------------------------------------------------------------------------
--- OJB_DMAP
------------------------------------------------------------------------------
-
-CREATE TABLE OJB_DMAP
-(
-    ID INTEGER NOT NULL,
-    SIZE_ INTEGER,
-    PRIMARY KEY(ID));
-
+-----------------------------------------------------------------------------
+-- OJB_HL_SEQ
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_HL_SEQ
+(
+    TABLENAME VARCHAR(175) NOT NULL,
+    FIELDNAME VARCHAR(70) NOT NULL,
+    MAX_KEY INTEGER,
+    GRAB_SIZE INTEGER,
+    VERSION INTEGER,
+    PRIMARY KEY(TABLENAME,FIELDNAME));
+
+-----------------------------------------------------------------------------
+-- OJB_LOCKENTRY
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_LOCKENTRY
+(
+    OID_ VARCHAR(250) NOT NULL,
+    TX_ID VARCHAR(50) NOT NULL,
+    TIMESTAMP_ TIMESTAMP,
+    ISOLATIONLEVEL INTEGER,
+    LOCKTYPE INTEGER,
+    PRIMARY KEY(OID_,TX_ID));
+
+-----------------------------------------------------------------------------
+-- OJB_NRM
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_NRM
+(
+    NAME VARCHAR(250) NOT NULL,
+    OID_ BLOB,
+    PRIMARY KEY(NAME));
+
+-----------------------------------------------------------------------------
+-- OJB_DLIST
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_DLIST
+(
+    ID INTEGER NOT NULL,
+    SIZE_ INTEGER,
+    PRIMARY KEY(ID));
+
+-----------------------------------------------------------------------------
+-- OJB_DLIST_ENTRIES
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_DLIST_ENTRIES
+(
+    ID INTEGER NOT NULL,
+    DLIST_ID INTEGER,
+    POSITION_ INTEGER,
+    OID_ BLOB,
+    PRIMARY KEY(ID));
+
+-----------------------------------------------------------------------------
+-- OJB_DSET
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_DSET
+(
+    ID INTEGER NOT NULL,
+    SIZE_ INTEGER,
+    PRIMARY KEY(ID));
+
+-----------------------------------------------------------------------------
+-- OJB_DSET_ENTRIES
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_DSET_ENTRIES
+(
+    ID INTEGER NOT NULL,
+    DLIST_ID INTEGER,
+    POSITION_ INTEGER,
+    OID_ BLOB,
+    PRIMARY KEY(ID));
+
+-----------------------------------------------------------------------------
+-- OJB_DMAP
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_DMAP
+(
+    ID INTEGER NOT NULL,
+    SIZE_ INTEGER,
+    PRIMARY KEY(ID));
+

Propchange: portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/phase3ojb-schema.sql
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/prefs-schema.sql
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/prefs-schema.sql?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/prefs-schema.sql (original)
+++ portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/prefs-schema.sql Fri Dec 12 04:06:29 2008
@@ -13,36 +13,36 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 
------------------------------------------------------------------------------
--- PREFS_NODE
------------------------------------------------------------------------------
-
-CREATE TABLE PREFS_NODE
-(
-    NODE_ID INTEGER NOT NULL,
-    PARENT_NODE_ID INTEGER,
-    NODE_NAME VARCHAR(100),
-    NODE_TYPE SMALLINT,
-    FULL_PATH VARCHAR(254),
-    CREATION_DATE TIMESTAMP,
-    MODIFIED_DATE TIMESTAMP,
-    PRIMARY KEY(NODE_ID),
-    FOREIGN KEY (PARENT_NODE_ID) REFERENCES PREFS_NODE (NODE_ID)
-    );
-    
------------------------------------------------------------------------------
--- PREFS_PROPERTY_VALUE
------------------------------------------------------------------------------
-
-CREATE TABLE PREFS_PROPERTY_VALUE
-(
-    PROPERTY_VALUE_ID INTEGER NOT NULL,
-    NODE_ID INTEGER,
-    PROPERTY_NAME VARCHAR(100),
-    PROPERTY_VALUE VARCHAR(254),
-    CREATION_DATE TIMESTAMP,
-    MODIFIED_DATE TIMESTAMP,
-    PRIMARY KEY(PROPERTY_VALUE_ID)
-    -- Still an issue with OJB 1.0.3 when deleting M-N. Foreign Key Violation.
-    -- FOREIGN KEY (NODE_ID) REFERENCES PREFS_NODE (NODE_ID)
+-----------------------------------------------------------------------------
+-- PREFS_NODE
+-----------------------------------------------------------------------------
+
+CREATE TABLE PREFS_NODE
+(
+    NODE_ID INTEGER NOT NULL,
+    PARENT_NODE_ID INTEGER,
+    NODE_NAME VARCHAR(100),
+    NODE_TYPE SMALLINT,
+    FULL_PATH VARCHAR(254),
+    CREATION_DATE TIMESTAMP,
+    MODIFIED_DATE TIMESTAMP,
+    PRIMARY KEY(NODE_ID),
+    FOREIGN KEY (PARENT_NODE_ID) REFERENCES PREFS_NODE (NODE_ID)
+    );
+    
+-----------------------------------------------------------------------------
+-- PREFS_PROPERTY_VALUE
+-----------------------------------------------------------------------------
+
+CREATE TABLE PREFS_PROPERTY_VALUE
+(
+    PROPERTY_VALUE_ID INTEGER NOT NULL,
+    NODE_ID INTEGER,
+    PROPERTY_NAME VARCHAR(100),
+    PROPERTY_VALUE VARCHAR(254),
+    CREATION_DATE TIMESTAMP,
+    MODIFIED_DATE TIMESTAMP,
+    PRIMARY KEY(PROPERTY_VALUE_ID)
+    -- Still an issue with OJB 1.0.3 when deleting M-N. Foreign Key Violation.
+    -- FOREIGN KEY (NODE_ID) REFERENCES PREFS_NODE (NODE_ID)
     );
\ No newline at end of file

Propchange: portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/prefs-schema.sql
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/registry-schema.sql
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/registry-schema.sql?rev=725977&r1=725976&r2=725977&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/registry-schema.sql (original)
+++ portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/registry-schema.sql Fri Dec 12 04:06:29 2008
@@ -13,254 +13,254 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 
------------------------------------------------------------------------------
--- PORTLET_DEFINITION
------------------------------------------------------------------------------
-
-CREATE TABLE PORTLET_DEFINITION
-(
-    ID INTEGER NOT NULL,
-    NAME VARCHAR(80),
-    CLASS_NAME VARCHAR(255),
-    APPLICATION_ID INTEGER NOT NULL,
-    PORTLET_IDENTIFIER VARCHAR(80),
-    EXPIRATION_CACHE VARCHAR(30),
-    RESOURCE_BUNDLE VARCHAR(255),
-    PREFERENCE_VALIDATOR VARCHAR(255),
-    SECURITY_REF VARCHAR(40),    
-    PRIMARY KEY(ID));
-
------------------------------------------------------------------------------
--- PORTLET_APPLICATION
------------------------------------------------------------------------------
-
-CREATE TABLE PORTLET_APPLICATION
-(
-    APPLICATION_ID INTEGER NOT NULL,
-    APP_NAME VARCHAR(80) NOT NULL,
-    APP_IDENTIFIER VARCHAR(80),
-    VERSION VARCHAR(80),
-    APP_TYPE INTEGER,
-    CHECKSUM VARCHAR(80),
-    DESCRIPTION VARCHAR(80),
-    WEB_APP_ID INTEGER NOT NULL,
-    SECURITY_REF VARCHAR(40),        
-    PRIMARY KEY(APPLICATION_ID),
-    UNIQUE (APP_NAME));
-
------------------------------------------------------------------------------
--- WEB_APPLICATION
------------------------------------------------------------------------------
-
-CREATE TABLE WEB_APPLICATION
-(
-    ID INTEGER NOT NULL,
-    CONTEXT_ROOT VARCHAR(255) NOT NULL,
-    PRIMARY KEY(ID));
-
------------------------------------------------------------------------------
--- PA_METADATA_FIELDS
------------------------------------------------------------------------------
-
-CREATE TABLE PA_METADATA_FIELDS
-(
-    ID INTEGER NOT NULL,
-    OBJECT_ID INTEGER NOT NULL,
-    COLUMN_VALUE LONG VARCHAR NOT NULL,
-    NAME VARCHAR(100) NOT NULL,
-    LOCALE_STRING VARCHAR(50) NOT NULL,
-    PRIMARY KEY(ID),
-    FOREIGN KEY (OBJECT_ID) REFERENCES PORTLET_APPLICATION (APPLICATION_ID)
-        ON DELETE CASCADE 
-  );
-
------------------------------------------------------------------------------
--- PD_METADATA_FIELDS
------------------------------------------------------------------------------
-
-CREATE TABLE PD_METADATA_FIELDS
-(
-    ID INTEGER NOT NULL,
-    OBJECT_ID INTEGER NOT NULL,
-    COLUMN_VALUE LONG VARCHAR NOT NULL,
-    NAME VARCHAR(100) NOT NULL,
-    LOCALE_STRING VARCHAR(50) NOT NULL,
-    PRIMARY KEY(ID),
-    FOREIGN KEY (OBJECT_ID) REFERENCES PORTLET_DEFINITION (ID)
-        ON DELETE CASCADE 
-  );
-
------------------------------------------------------------------------------
--- LANGUAGE
------------------------------------------------------------------------------
-
-CREATE TABLE LANGUAGE
-(
-    ID INTEGER NOT NULL,
-    PORTLET_ID INTEGER NOT NULL,
-    TITLE VARCHAR(100),
-    SHORT_TITLE VARCHAR(100),
-    LOCALE_STRING VARCHAR(50) NOT NULL,
-    KEYWORDS LONG VARCHAR,
-    PRIMARY KEY(ID));
-
------------------------------------------------------------------------------
--- PORTLET_CONTENT_TYPE
------------------------------------------------------------------------------
-
-CREATE TABLE PORTLET_CONTENT_TYPE
-(
-    CONTENT_TYPE_ID INTEGER NOT NULL,
-    PORTLET_ID INTEGER NOT NULL,
-    CONTENT_TYPE VARCHAR(30) NOT NULL,
-    MODES LONG VARCHAR,
-    PRIMARY KEY(CONTENT_TYPE_ID));
-
------------------------------------------------------------------------------
--- PARAMETER
------------------------------------------------------------------------------
-
-CREATE TABLE PARAMETER
-(
-    PARAMETER_ID INTEGER NOT NULL,
-    PARENT_ID INTEGER NOT NULL,
-    CLASS_NAME VARCHAR(255) NOT NULL,
-    NAME VARCHAR(80) NOT NULL,
-    PARAMETER_VALUE LONG VARCHAR NOT NULL,
-    PRIMARY KEY(PARAMETER_ID));
-
------------------------------------------------------------------------------
--- PORTLET_ENTITY
------------------------------------------------------------------------------
-
-CREATE TABLE PORTLET_ENTITY
-(
-    PEID INTEGER NOT NULL,
-    ID VARCHAR(255) NOT NULL,
-    APP_NAME VARCHAR(255) NOT NULL,
-    PORTLET_NAME VARCHAR(255) NOT NULL,
-    PRIMARY KEY(PEID),
-    UNIQUE (ID));
-
------------------------------------------------------------------------------
--- SECURITY_ROLE_REFERENCE
------------------------------------------------------------------------------
-
-CREATE TABLE SECURITY_ROLE_REFERENCE
-(
-    ID INTEGER NOT NULL,
-    PORTLET_DEFINITION_ID INTEGER NOT NULL,
-    ROLE_NAME VARCHAR(150) NOT NULL,
-    ROLE_LINK VARCHAR(150),
-    PRIMARY KEY(ID));
-
------------------------------------------------------------------------------
--- SECURITY_ROLE
------------------------------------------------------------------------------
-
-CREATE TABLE SECURITY_ROLE
-(
-    ID INTEGER NOT NULL,
-    WEB_APPLICATION_ID INTEGER NOT NULL,
-    ROLE_NAME VARCHAR(150) NOT NULL,
-    DESCRIPTION VARCHAR(150),
-    PRIMARY KEY(ID));
-
------------------------------------------------------------------------------
--- USER_ATTRIBUTE_REF
------------------------------------------------------------------------------
-
-CREATE TABLE USER_ATTRIBUTE_REF
-(
-    ID INTEGER NOT NULL,
-    APPLICATION_ID INTEGER NOT NULL,
-    NAME VARCHAR(150),
-    NAME_LINK VARCHAR(150),
-    PRIMARY KEY(ID),
-    FOREIGN KEY (APPLICATION_ID) REFERENCES PORTLET_APPLICATION (APPLICATION_ID)
-        ON DELETE CASCADE 
-  );
-
------------------------------------------------------------------------------
--- USER_ATTRIBUTE
------------------------------------------------------------------------------
-
-CREATE TABLE USER_ATTRIBUTE
-(
-    ID INTEGER NOT NULL,
-    APPLICATION_ID INTEGER NOT NULL,
-    NAME VARCHAR(150),
-    DESCRIPTION VARCHAR(150),
-    PRIMARY KEY(ID),
-    FOREIGN KEY (APPLICATION_ID) REFERENCES PORTLET_APPLICATION (APPLICATION_ID)
-        ON DELETE CASCADE 
-  );
-
------------------------------------------------------------------------------
--- JETSPEED_SERVICE
------------------------------------------------------------------------------
-
-CREATE TABLE JETSPEED_SERVICE
-(
-    ID INTEGER NOT NULL,
-    APPLICATION_ID INTEGER NOT NULL,
-    NAME VARCHAR(150),
-    PRIMARY KEY(ID));
-
------------------------------------------------------------------------------
--- LOCALIZED_DESCRIPTION
------------------------------------------------------------------------------
-
-CREATE TABLE LOCALIZED_DESCRIPTION
-(
-    ID INTEGER NOT NULL,
-    OBJECT_ID INTEGER NOT NULL,
-    CLASS_NAME VARCHAR(255) NOT NULL,
-    DESCRIPTION LONG VARCHAR NOT NULL,
-    LOCALE_STRING VARCHAR(50) NOT NULL,
-    PRIMARY KEY(ID));
-
------------------------------------------------------------------------------
--- LOCALIZED_DISPLAY_NAME
------------------------------------------------------------------------------
-
-CREATE TABLE LOCALIZED_DISPLAY_NAME
-(
-    ID INTEGER NOT NULL,
-    OBJECT_ID INTEGER NOT NULL,
-    CLASS_NAME VARCHAR(255),
-    DISPLAY_NAME LONG VARCHAR NOT NULL,
-    LOCALE_STRING VARCHAR(50) NOT NULL,
-    PRIMARY KEY(ID));
-
------------------------------------------------------------------------------
--- CUSTOM_PORTLET_MODE
------------------------------------------------------------------------------
-
-CREATE TABLE CUSTOM_PORTLET_MODE
-(
-    ID INTEGER NOT NULL,
-    APPLICATION_ID INTEGER NOT NULL,
-    CUSTOM_NAME VARCHAR(150) NOT NULL,
-    MAPPED_NAME VARCHAR(150),
-    DESCRIPTION LONG VARCHAR,
-    PRIMARY KEY(ID),
-    FOREIGN KEY (APPLICATION_ID) REFERENCES PORTLET_APPLICATION (APPLICATION_ID)
-        ON DELETE CASCADE 
-  );
-
------------------------------------------------------------------------------
--- CUSTOM_WINDOW_STATE
------------------------------------------------------------------------------
-
-CREATE TABLE CUSTOM_WINDOW_STATE
-(
-    ID INTEGER NOT NULL,
-    APPLICATION_ID INTEGER NOT NULL,
-    CUSTOM_NAME VARCHAR(150) NOT NULL,
-    MAPPED_NAME VARCHAR(150),
-    DESCRIPTION LONG VARCHAR,
-    PRIMARY KEY(ID),
-    FOREIGN KEY (APPLICATION_ID) REFERENCES PORTLET_APPLICATION (APPLICATION_ID)
-        ON DELETE CASCADE 
-  );
+-----------------------------------------------------------------------------
+-- PORTLET_DEFINITION
+-----------------------------------------------------------------------------
+
+CREATE TABLE PORTLET_DEFINITION
+(
+    ID INTEGER NOT NULL,
+    NAME VARCHAR(80),
+    CLASS_NAME VARCHAR(255),
+    APPLICATION_ID INTEGER NOT NULL,
+    PORTLET_IDENTIFIER VARCHAR(80),
+    EXPIRATION_CACHE VARCHAR(30),
+    RESOURCE_BUNDLE VARCHAR(255),
+    PREFERENCE_VALIDATOR VARCHAR(255),
+    SECURITY_REF VARCHAR(40),    
+    PRIMARY KEY(ID));
+
+-----------------------------------------------------------------------------
+-- PORTLET_APPLICATION
+-----------------------------------------------------------------------------
+
+CREATE TABLE PORTLET_APPLICATION
+(
+    APPLICATION_ID INTEGER NOT NULL,
+    APP_NAME VARCHAR(80) NOT NULL,
+    APP_IDENTIFIER VARCHAR(80),
+    VERSION VARCHAR(80),
+    APP_TYPE INTEGER,
+    CHECKSUM VARCHAR(80),
+    DESCRIPTION VARCHAR(80),
+    WEB_APP_ID INTEGER NOT NULL,
+    SECURITY_REF VARCHAR(40),        
+    PRIMARY KEY(APPLICATION_ID),
+    UNIQUE (APP_NAME));
+
+-----------------------------------------------------------------------------
+-- WEB_APPLICATION
+-----------------------------------------------------------------------------
+
+CREATE TABLE WEB_APPLICATION
+(
+    ID INTEGER NOT NULL,
+    CONTEXT_ROOT VARCHAR(255) NOT NULL,
+    PRIMARY KEY(ID));
+
+-----------------------------------------------------------------------------
+-- PA_METADATA_FIELDS
+-----------------------------------------------------------------------------
+
+CREATE TABLE PA_METADATA_FIELDS
+(
+    ID INTEGER NOT NULL,
+    OBJECT_ID INTEGER NOT NULL,
+    COLUMN_VALUE LONG VARCHAR NOT NULL,
+    NAME VARCHAR(100) NOT NULL,
+    LOCALE_STRING VARCHAR(50) NOT NULL,
+    PRIMARY KEY(ID),
+    FOREIGN KEY (OBJECT_ID) REFERENCES PORTLET_APPLICATION (APPLICATION_ID)
+        ON DELETE CASCADE 
+  );
+
+-----------------------------------------------------------------------------
+-- PD_METADATA_FIELDS
+-----------------------------------------------------------------------------
+
+CREATE TABLE PD_METADATA_FIELDS
+(
+    ID INTEGER NOT NULL,
+    OBJECT_ID INTEGER NOT NULL,
+    COLUMN_VALUE LONG VARCHAR NOT NULL,
+    NAME VARCHAR(100) NOT NULL,
+    LOCALE_STRING VARCHAR(50) NOT NULL,
+    PRIMARY KEY(ID),
+    FOREIGN KEY (OBJECT_ID) REFERENCES PORTLET_DEFINITION (ID)
+        ON DELETE CASCADE 
+  );
+
+-----------------------------------------------------------------------------
+-- LANGUAGE
+-----------------------------------------------------------------------------
+
+CREATE TABLE LANGUAGE
+(
+    ID INTEGER NOT NULL,
+    PORTLET_ID INTEGER NOT NULL,
+    TITLE VARCHAR(100),
+    SHORT_TITLE VARCHAR(100),
+    LOCALE_STRING VARCHAR(50) NOT NULL,
+    KEYWORDS LONG VARCHAR,
+    PRIMARY KEY(ID));
+
+-----------------------------------------------------------------------------
+-- PORTLET_CONTENT_TYPE
+-----------------------------------------------------------------------------
+
+CREATE TABLE PORTLET_CONTENT_TYPE
+(
+    CONTENT_TYPE_ID INTEGER NOT NULL,
+    PORTLET_ID INTEGER NOT NULL,
+    CONTENT_TYPE VARCHAR(30) NOT NULL,
+    MODES LONG VARCHAR,
+    PRIMARY KEY(CONTENT_TYPE_ID));
+
+-----------------------------------------------------------------------------
+-- PARAMETER
+-----------------------------------------------------------------------------
+
+CREATE TABLE PARAMETER
+(
+    PARAMETER_ID INTEGER NOT NULL,
+    PARENT_ID INTEGER NOT NULL,
+    CLASS_NAME VARCHAR(255) NOT NULL,
+    NAME VARCHAR(80) NOT NULL,
+    PARAMETER_VALUE LONG VARCHAR NOT NULL,
+    PRIMARY KEY(PARAMETER_ID));
+
+-----------------------------------------------------------------------------
+-- PORTLET_ENTITY
+-----------------------------------------------------------------------------
+
+CREATE TABLE PORTLET_ENTITY
+(
+    PEID INTEGER NOT NULL,
+    ID VARCHAR(255) NOT NULL,
+    APP_NAME VARCHAR(255) NOT NULL,
+    PORTLET_NAME VARCHAR(255) NOT NULL,
+    PRIMARY KEY(PEID),
+    UNIQUE (ID));
+
+-----------------------------------------------------------------------------
+-- SECURITY_ROLE_REFERENCE
+-----------------------------------------------------------------------------
+
+CREATE TABLE SECURITY_ROLE_REFERENCE
+(
+    ID INTEGER NOT NULL,
+    PORTLET_DEFINITION_ID INTEGER NOT NULL,
+    ROLE_NAME VARCHAR(150) NOT NULL,
+    ROLE_LINK VARCHAR(150),
+    PRIMARY KEY(ID));
+
+-----------------------------------------------------------------------------
+-- SECURITY_ROLE
+-----------------------------------------------------------------------------
+
+CREATE TABLE SECURITY_ROLE
+(
+    ID INTEGER NOT NULL,
+    WEB_APPLICATION_ID INTEGER NOT NULL,
+    ROLE_NAME VARCHAR(150) NOT NULL,
+    DESCRIPTION VARCHAR(150),
+    PRIMARY KEY(ID));
+
+-----------------------------------------------------------------------------
+-- USER_ATTRIBUTE_REF
+-----------------------------------------------------------------------------
+
+CREATE TABLE USER_ATTRIBUTE_REF
+(
+    ID INTEGER NOT NULL,
+    APPLICATION_ID INTEGER NOT NULL,
+    NAME VARCHAR(150),
+    NAME_LINK VARCHAR(150),
+    PRIMARY KEY(ID),
+    FOREIGN KEY (APPLICATION_ID) REFERENCES PORTLET_APPLICATION (APPLICATION_ID)
+        ON DELETE CASCADE 
+  );
+
+-----------------------------------------------------------------------------
+-- USER_ATTRIBUTE
+-----------------------------------------------------------------------------
+
+CREATE TABLE USER_ATTRIBUTE
+(
+    ID INTEGER NOT NULL,
+    APPLICATION_ID INTEGER NOT NULL,
+    NAME VARCHAR(150),
+    DESCRIPTION VARCHAR(150),
+    PRIMARY KEY(ID),
+    FOREIGN KEY (APPLICATION_ID) REFERENCES PORTLET_APPLICATION (APPLICATION_ID)
+        ON DELETE CASCADE 
+  );
+
+-----------------------------------------------------------------------------
+-- JETSPEED_SERVICE
+-----------------------------------------------------------------------------
+
+CREATE TABLE JETSPEED_SERVICE
+(
+    ID INTEGER NOT NULL,
+    APPLICATION_ID INTEGER NOT NULL,
+    NAME VARCHAR(150),
+    PRIMARY KEY(ID));
+
+-----------------------------------------------------------------------------
+-- LOCALIZED_DESCRIPTION
+-----------------------------------------------------------------------------
+
+CREATE TABLE LOCALIZED_DESCRIPTION
+(
+    ID INTEGER NOT NULL,
+    OBJECT_ID INTEGER NOT NULL,
+    CLASS_NAME VARCHAR(255) NOT NULL,
+    DESCRIPTION LONG VARCHAR NOT NULL,
+    LOCALE_STRING VARCHAR(50) NOT NULL,
+    PRIMARY KEY(ID));
+
+-----------------------------------------------------------------------------
+-- LOCALIZED_DISPLAY_NAME
+-----------------------------------------------------------------------------
+
+CREATE TABLE LOCALIZED_DISPLAY_NAME
+(
+    ID INTEGER NOT NULL,
+    OBJECT_ID INTEGER NOT NULL,
+    CLASS_NAME VARCHAR(255),
+    DISPLAY_NAME LONG VARCHAR NOT NULL,
+    LOCALE_STRING VARCHAR(50) NOT NULL,
+    PRIMARY KEY(ID));
+
+-----------------------------------------------------------------------------
+-- CUSTOM_PORTLET_MODE
+-----------------------------------------------------------------------------
+
+CREATE TABLE CUSTOM_PORTLET_MODE
+(
+    ID INTEGER NOT NULL,
+    APPLICATION_ID INTEGER NOT NULL,
+    CUSTOM_NAME VARCHAR(150) NOT NULL,
+    MAPPED_NAME VARCHAR(150),
+    DESCRIPTION LONG VARCHAR,
+    PRIMARY KEY(ID),
+    FOREIGN KEY (APPLICATION_ID) REFERENCES PORTLET_APPLICATION (APPLICATION_ID)
+        ON DELETE CASCADE 
+  );
+
+-----------------------------------------------------------------------------
+-- CUSTOM_WINDOW_STATE
+-----------------------------------------------------------------------------
+
+CREATE TABLE CUSTOM_WINDOW_STATE
+(
+    ID INTEGER NOT NULL,
+    APPLICATION_ID INTEGER NOT NULL,
+    CUSTOM_NAME VARCHAR(150) NOT NULL,
+    MAPPED_NAME VARCHAR(150),
+    DESCRIPTION LONG VARCHAR,
+    PRIMARY KEY(ID),
+    FOREIGN KEY (APPLICATION_ID) REFERENCES PORTLET_APPLICATION (APPLICATION_ID)
+        ON DELETE CASCADE 
+  );

Propchange: portals/jetspeed-2/portal/trunk/etc/sql/derby/schema/registry-schema.sql
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message