portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r360210 - in /portals/jetspeed-2/trunk/etc/sql/postgres: ./ schema/
Date Sat, 31 Dec 2005 01:03:34 GMT
Author: taylor
Date: Fri Dec 30 17:03:31 2005
New Revision: 360210

URL: http://svn.apache.org/viewcvs?rev=360210&view=rev
Log:
Postgresql support from Jacek Wislicki

http://issues.apache.org/jira/browse/JS2-442

Jacek, could you please verify that this builds?

Added:
    portals/jetspeed-2/trunk/etc/sql/postgres/
    portals/jetspeed-2/trunk/etc/sql/postgres/drop.sql
    portals/jetspeed-2/trunk/etc/sql/postgres/populate-userinfo-for-default-psml.sql
    portals/jetspeed-2/trunk/etc/sql/postgres/schema/
    portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase1-schema.sql
    portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase2-schema.sql
    portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase3ojb-schema.sql
    portals/jetspeed-2/trunk/etc/sql/postgres/schema/prefs-schema.sql
    portals/jetspeed-2/trunk/etc/sql/postgres/schema/registry-schema.sql
    portals/jetspeed-2/trunk/etc/sql/postgres/schema/security-schema.sql

Added: portals/jetspeed-2/trunk/etc/sql/postgres/drop.sql
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/etc/sql/postgres/drop.sql?rev=360210&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/etc/sql/postgres/drop.sql (added)
+++ portals/jetspeed-2/trunk/etc/sql/postgres/drop.sql Fri Dec 30 17:03:31 2005
@@ -0,0 +1,96 @@
+drop table A;
+drop table B;
+
+drop table OJB_HL_SEQ;
+drop table OJB_LOCKENTRY;
+drop table OJB_NRM;
+drop table OJB_DLIST;
+drop table OJB_DLIST_ENTRIES;
+drop table OJB_DSET;
+drop table OJB_DSET_ENTRIES;
+drop table OJB_DMAP;
+
+
+DROP TABLE CAPABILITY;
+DROP TABLE MIMETYPE;
+DROP TABLE CLIENT;
+DROP TABLE MEDIA_TYPE;
+
+DROP TABLE CLIENT_TO_CAPABILITY;
+DROP TABLE CLIENT_TO_MIMETYPE;
+DROP TABLE MEDIATYPE_TO_CAPABILITY;
+DROP TABLE MEDIATYPE_TO_MIMETYPE;
+
+DROP TABLE PAGE_SEC_CONSTRAINTS_REF;
+DROP TABLE PAGE_SEC_CONSTRAINT_DEF;
+DROP TABLE PAGE_SEC_CONSTRAINTS_DEF;
+DROP TABLE PAGE_SECURITY;
+DROP TABLE LINK_CONSTRAINTS_REF;
+DROP TABLE LINK_CONSTRAINT;
+DROP TABLE LINK_METADATA;
+DROP TABLE LINK;
+DROP TABLE FRAGMENT_PREF_VALUE;
+DROP TABLE FRAGMENT_PREF;
+DROP TABLE FRAGMENT_CONSTRAINTS_REF;
+DROP TABLE FRAGMENT_CONSTRAINT;
+DROP TABLE FRAGMENT;
+DROP TABLE PAGE_MENU_METADATA;
+DROP TABLE PAGE_MENU;
+DROP TABLE PAGE_CONSTRAINTS_REF;
+DROP TABLE PAGE_CONSTRAINT;
+DROP TABLE PAGE_METADATA;
+DROP TABLE PAGE;
+DROP TABLE FOLDER_MENU_METADATA;
+DROP TABLE FOLDER_MENU;
+DROP TABLE FOLDER_ORDER;
+DROP TABLE FOLDER_CONSTRAINTS_REF;
+DROP TABLE FOLDER_CONSTRAINT;
+DROP TABLE FOLDER_METADATA;
+DROP TABLE FOLDER;
+
+DROP TABLE RULE_CRITERION;
+DROP TABLE PRINCIPAL_RULE_ASSOC;
+DROP TABLE PROFILE_PAGE_ASSOC;
+DROP TABLE PROFILING_RULE;
+
+-----------------------------------------------------------------------------
+-- drop preferences schema
+-----------------------------------------------------------------------------
+drop table PREFS_PROPERTY_VALUE;
+drop table PREFS_NODE_PROPERTY_KEY;
+drop table PREFS_PROPERTY_KEY;
+drop table PREFS_NODE;
+
+DROP TABLE PA_METADATA_FIELDS;
+DROP TABLE PD_METADATA_FIELDS;
+DROP TABLE LANGUAGE; 
+DROP TABLE PORTLET_CONTENT_TYPE; 
+DROP TABLE PARAMETER; 
+DROP TABLE PORTLET_ENTITY; 
+DROP TABLE SECURITY_ROLE_REFERENCE;
+DROP TABLE SECURITY_ROLE;
+DROP TABLE USER_ATTRIBUTE_REF;
+DROP TABLE USER_ATTRIBUTE;
+DROP TABLE JETSPEED_SERVICE;
+
+DROP TABLE LOCALIZED_DESCRIPTION; 
+DROP TABLE LOCALIZED_DISPLAY_NAME; 
+
+DROP TABLE WEB_APPLICATION; 
+DROP TABLE PORTLET_DEFINITION; 
+DROP TABLE PORTLET_APPLICATION; 
+
+drop table PRINCIPAL_PERMISSION;
+DROP TABLE SECURITY_CREDENTIAL;
+drop table SSO_SITE_TO_PRINCIPALS;
+drop table SSO_PRINCIPAL_TO_REMOTE;
+drop table SSO_SITE_TO_REMOTE;
+DROP TABLE SECURITY_USER_ROLE;
+DROP TABLE SECURITY_USER_GROUP;
+DROP TABLE SECURITY_GROUP_ROLE;
+
+
+drop table SSO_SITE;
+drop table SECURITY_PERMISSION;
+drop table SECURITY_PRINCIPAL;
+

Added: portals/jetspeed-2/trunk/etc/sql/postgres/populate-userinfo-for-default-psml.sql
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/etc/sql/postgres/populate-userinfo-for-default-psml.sql?rev=360210&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/etc/sql/postgres/populate-userinfo-for-default-psml.sql (added)
+++ portals/jetspeed-2/trunk/etc/sql/postgres/populate-userinfo-for-default-psml.sql Fri Dec 30 17:03:31 2005
@@ -0,0 +1,105 @@
+INSERT INTO PREFS_NODE VALUES(1,NULL,'',0,'/',to_date('2004-05-22 14:57:53','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 14:57:53','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO PREFS_NODE VALUES(101,1,'user',0,'/user',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO PREFS_NODE VALUES(102,101,'admin',0,'/user/admin',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO PREFS_NODE VALUES(103,102,'userinfo',0,'/user/admin/userinfo',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(1,'org.apache.jetspeed.security.JetspeedUserPrincipalImpl',0,1,'/user/admin',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO PREFS_PROPERTY_VALUE VALUES(41,103,'user.name.given','Test Dude',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO PREFS_PROPERTY_VALUE VALUES(42,103,'user.name.family','Dudley',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(2,'org.apache.jetspeed.security.JetspeedUserPrincipalImpl',0,1,'/user/manager',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(3,'org.apache.jetspeed.security.JetspeedUserPrincipalImpl',0,1,'/user/user',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(4,'org.apache.jetspeed.security.JetspeedUserPrincipalImpl',0,1,'/user/tomcat',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(5,'org.apache.jetspeed.security.JetspeedUserPrincipalImpl',0,1,'/user/jetspeed',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(6,'org.apache.jetspeed.security.JetspeedRolePrincipalImpl',0,1,'/role/admin',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(7,'org.apache.jetspeed.security.JetspeedRolePrincipalImpl',0,1,'/role/manager',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(8,'org.apache.jetspeed.security.JetspeedRolePrincipalImpl',0,1,'/role/user',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(9,'org.apache.jetspeed.security.JetspeedUserPrincipalImpl',0,1,'/user/guest',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(10,'org.apache.jetspeed.security.JetspeedRolePrincipalImpl',0,1,'/role/guest',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(11,'org.apache.jetspeed.security.JetspeedGroupPrincipalImpl',0,1,'/group/accounting',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(12,'org.apache.jetspeed.security.JetspeedGroupPrincipalImpl',0,1,'/group/marketing',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(13,'org.apache.jetspeed.security.JetspeedGroupPrincipalImpl',0,1,'/group/engineering',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_CREDENTIAL VALUES(1,1,'admin',0,'org.apache.jetspeed.security.spi.impl.DefaultPasswordCredentialImpl',1,0,1,0,0,to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),null,null,null);
+INSERT INTO SECURITY_CREDENTIAL VALUES(2,2,'manager',0,'org.apache.jetspeed.security.spi.impl.DefaultPasswordCredentialImpl',0,0,1,0,0,to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),null,null,null);
+INSERT INTO SECURITY_CREDENTIAL VALUES(3,3,'user',0,'org.apache.jetspeed.security.spi.impl.DefaultPasswordCredentialImpl',0,0,1,0,0,to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),null,null,null);
+INSERT INTO SECURITY_CREDENTIAL VALUES(4,4,'tomcat',0,'org.apache.jetspeed.security.spi.impl.DefaultPasswordCredentialImpl',0,0,1,0,0,to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),null,null,null);
+INSERT INTO SECURITY_CREDENTIAL VALUES(5,5,'jetspeed',0,'org.apache.jetspeed.security.spi.impl.DefaultPasswordCredentialImpl',0,0,1,0,0,to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),null,null,null);
+INSERT INTO SECURITY_USER_ROLE VALUES(1,6);
+INSERT INTO SECURITY_USER_ROLE VALUES(1,7);
+INSERT INTO SECURITY_USER_ROLE VALUES(1,8);
+INSERT INTO SECURITY_USER_ROLE VALUES(2,7);
+INSERT INTO SECURITY_USER_ROLE VALUES(2,8);
+INSERT INTO SECURITY_USER_ROLE VALUES(3,8);
+INSERT INTO SECURITY_USER_ROLE VALUES(9,10);
+INSERT INTO SECURITY_USER_ROLE VALUES(5,7);
+INSERT INTO SECURITY_USER_GROUP VALUES(3,11);
+INSERT INTO SECURITY_USER_GROUP VALUES(5,13);
+INSERT INTO SECURITY_PERMISSION VALUES(1,'org.apache.jetspeed.security.FolderPermission','<<ALL FILES>>','view, edit',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(2,'org.apache.jetspeed.security.FolderPermission','<<ALL FILES>>','view',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(3,'org.apache.jetspeed.security.FolderPermission','/','view',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(4,'org.apache.jetspeed.security.FolderPermission','/*','view',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(5,'org.apache.jetspeed.security.FolderPermission','/non-java/-','view',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(6,'org.apache.jetspeed.security.FolderPermission','/third-party/-','view',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(7,'org.apache.jetspeed.security.FolderPermission','/Public','view, edit',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(8,'org.apache.jetspeed.security.FolderPermission','/Public/-','view, edit',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(9,'org.apache.jetspeed.security.FolderPermission','/anotherdir/-','view',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(10,'org.apache.jetspeed.security.FolderPermission','/top-links/-','view',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(11,'org.apache.jetspeed.security.PagePermission','/default-page.psml','view',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(12,'org.apache.jetspeed.security.PagePermission','/rss.psml','view',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(13,'org.apache.jetspeed.security.FolderPermission','/_user/user','view, edit',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(14,'org.apache.jetspeed.security.FolderPermission','/_user/user/-','view, edit',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO PRINCIPAL_PERMISSION VALUES(3,13);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(3,14);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(6,1);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(7,2);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(8,3);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(8,4);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(8,5);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(8,6);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(8,8);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(8,9);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(8,10);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(10,3);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(10,7);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(10,8);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(10,11);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(10,12);
+
+
+INSERT INTO SECURITY_PRINCIPAL VALUES(50,'org.apache.jetspeed.security.JetspeedUserPrincipalImpl',0,1,'/user/subsite',to_date('2005-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'),to_date('2005-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(51,'org.apache.jetspeed.security.JetspeedUserPrincipalImpl',0,1,'/user/subsite2',to_date('2005-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'),to_date('2005-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_CREDENTIAL VALUES(50,50,'subsite',0,'org.apache.jetspeed.security.spi.impl.DefaultPasswordCredentialImpl',0,0,1,0,0,to_date('2005-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'),to_date('2005-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'),null,null,null);
+INSERT INTO SECURITY_CREDENTIAL VALUES(51,51,'subsite2',0,'org.apache.jetspeed.security.spi.impl.DefaultPasswordCredentialImpl',0,0,1,0,0,to_date('2005-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'),to_date('2005-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'),null,null,null);
+
+INSERT INTO SECURITY_PRINCIPAL VALUES(52,'org.apache.jetspeed.security.JetspeedRolePrincipalImpl',0,1,'/role/subsite',to_date('2005-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'),to_date('2005-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PRINCIPAL VALUES(53,'org.apache.jetspeed.security.JetspeedRolePrincipalImpl',0,1,'/role/subsite2',to_date('2005-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'),to_date('2005-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS'));
+
+INSERT INTO SECURITY_USER_ROLE VALUES(50,52);
+INSERT INTO SECURITY_USER_ROLE VALUES(50,53);
+INSERT INTO SECURITY_USER_ROLE VALUES(51,52);
+INSERT INTO SECURITY_USER_ROLE VALUES(51,53);
+
+INSERT INTO SECURITY_PERMISSION VALUES(50,'org.apache.jetspeed.security.FolderPermission','/__subsite-root','view',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(51,'org.apache.jetspeed.security.FolderPermission','/__subsite-root/-','view',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(52,'org.apache.jetspeed.security.FolderPermission','/__subsite-root/_role/subsite','view, edit',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(53,'org.apache.jetspeed.security.FolderPermission','/__subsite-root/_role/subsite/-','view, edit',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(54,'org.apache.jetspeed.security.FolderPermission','/__subsite-root/_role/subsite2','view, edit',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(55,'org.apache.jetspeed.security.FolderPermission','/__subsite-root/_role/subsite2/-','view, edit',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO PRINCIPAL_PERMISSION VALUES(50,52);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(50,53);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(51,54);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(51,55);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(52,3);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(52,50);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(52,51);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(53,3);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(53,50);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(53,51);
+
+INSERT INTO SECURITY_PERMISSION VALUES(100,'org.apache.jetspeed.security.PortletPermission','security::*','view, edit',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(101,'org.apache.jetspeed.security.PortletPermission','palm::*','view, edit',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+INSERT INTO SECURITY_PERMISSION VALUES(102,'org.apache.jetspeed.security.PortletPermission','pam::*','view, edit',to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'),to_date('2004-05-22 16:27:12','YYYY-MM-DD HH24:MI:SS'));
+
+INSERT INTO PRINCIPAL_PERMISSION VALUES(6,100);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(6,101);
+INSERT INTO PRINCIPAL_PERMISSION VALUES(6,102);
+
+

Added: portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase1-schema.sql
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase1-schema.sql?rev=360210&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase1-schema.sql (added)
+++ portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase1-schema.sql Fri Dec 30 17:03:31 2005
@@ -0,0 +1,231 @@
+
+-----------------------------------------------------------------------------
+-- MEDIA_TYPE
+-----------------------------------------------------------------------------
+
+CREATE TABLE MEDIA_TYPE
+(
+    MEDIATYPE_ID int4 NOT NULL,
+    NAME varchar(80) NOT NULL,
+    CHARACTER_SET varchar(40),
+    TITLE varchar(80),
+    DESCRIPTION varchar(2000)
+);
+
+ALTER TABLE MEDIA_TYPE
+    ADD CONSTRAINT MEDIA_TYPE_PK
+PRIMARY KEY (MEDIATYPE_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- CLIENT
+-----------------------------------------------------------------------------
+
+CREATE TABLE CLIENT
+(
+    CLIENT_ID int4 NOT NULL,
+    EVAL_ORDER int4 NOT NULL,
+    NAME varchar(80) NOT NULL,
+    USER_AGENT_PATTERN varchar(128),
+    MANUFACTURER varchar(80),
+    MODEL varchar(80),
+    VERSION varchar(40),
+    PREFERRED_MIMETYPE_ID int4 NOT NULL
+);
+
+ALTER TABLE CLIENT
+    ADD CONSTRAINT CLIENT_PK
+PRIMARY KEY (CLIENT_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- MIMETYPE
+-----------------------------------------------------------------------------
+
+CREATE TABLE MIMETYPE
+(
+    MIMETYPE_ID int4 NOT NULL,
+    NAME varchar(80) NOT NULL
+);
+
+ALTER TABLE MIMETYPE
+    ADD CONSTRAINT MIMETYPE_PK
+PRIMARY KEY (MIMETYPE_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- CAPABILITY
+-----------------------------------------------------------------------------
+
+CREATE TABLE CAPABILITY
+(
+    CAPABILITY_ID int4 NOT NULL,
+    CAPABILITY varchar(80) NOT NULL
+);
+
+ALTER TABLE CAPABILITY
+    ADD CONSTRAINT CAPABILITY_PK
+PRIMARY KEY (CAPABILITY_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- CLIENT_TO_CAPABILITY
+-----------------------------------------------------------------------------
+
+CREATE TABLE CLIENT_TO_CAPABILITY
+(
+    CLIENT_ID int4 NOT NULL,
+    CAPABILITY_ID int4 NOT NULL
+);
+
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- CLIENT_TO_MIMETYPE
+-----------------------------------------------------------------------------
+
+CREATE TABLE CLIENT_TO_MIMETYPE
+(
+    CLIENT_ID int4 NOT NULL,
+    MIMETYPE_ID int4 NOT NULL
+);
+
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- MEDIATYPE_TO_CAPABILITY
+-----------------------------------------------------------------------------
+
+CREATE TABLE MEDIATYPE_TO_CAPABILITY
+(
+    MEDIATYPE_ID int4 NOT NULL,
+    CAPABILITY_ID int4 NOT NULL
+);
+
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- MEDIATYPE_TO_MIMETYPE
+-----------------------------------------------------------------------------
+
+CREATE TABLE MEDIATYPE_TO_MIMETYPE
+(
+    MEDIATYPE_ID int4 NOT NULL,
+    MIMETYPE_ID int4 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 int4,
+    ELAPSED_TIME int4
+);
+
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PAGE_STATISTICS
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_STATISTICS
+(
+    IPADDRESS varchar(80),
+    USER_NAME varchar(80),
+    TIME_STAMP TIMESTAMP,
+    PAGE varchar(80),
+    STATUS int4,
+    ELAPSED_TIME int4
+);
+
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- USER_STATISTICS
+-----------------------------------------------------------------------------
+
+CREATE TABLE USER_STATISTICS
+(
+    IPADDRESS varchar(80),
+    USER_NAME varchar(80),
+    TIME_STAMP TIMESTAMP,
+    STATUS int4,
+    ELAPSED_TIME int4
+);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Added: portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase2-schema.sql
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase2-schema.sql?rev=360210&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase2-schema.sql (added)
+++ portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase2-schema.sql Fri Dec 30 17:03:31 2005
@@ -0,0 +1,1053 @@
+
+-----------------------------------------------------------------------------
+-- FOLDER
+-----------------------------------------------------------------------------
+
+CREATE TABLE FOLDER
+(
+    FOLDER_ID int4 NOT NULL,
+    PARENT_ID int4,
+    PATH varchar(240) NOT NULL,
+    NAME varchar(80) NOT NULL,
+    TITLE varchar(100),
+    SHORT_TITLE varchar(40),
+    IS_HIDDEN int2 NOT NULL,
+    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),
+    CONSTRAINT UN_FOLDER_1 UNIQUE (PATH)
+);
+
+ALTER TABLE FOLDER
+    ADD CONSTRAINT FOLDER_PK
+PRIMARY KEY (FOLDER_ID);
+
+CREATE INDEX IX_FOLDER_1 ON FOLDER (PARENT_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- FOLDER_METADATA
+-----------------------------------------------------------------------------
+
+CREATE TABLE FOLDER_METADATA
+(
+    METADATA_ID int4 NOT NULL,
+    FOLDER_ID int4 NOT NULL,
+    NAME varchar(15) NOT NULL,
+    LOCALE varchar(20) NOT NULL,
+    VALUE varchar(100) NOT NULL,
+    CONSTRAINT UN_FOLDER_METADATA_1 UNIQUE (FOLDER_ID, NAME, LOCALE, VALUE)
+);
+
+ALTER TABLE FOLDER_METADATA
+    ADD CONSTRAINT FOLDER_METADATA_PK
+PRIMARY KEY (METADATA_ID);
+
+CREATE INDEX IX_FOLDER_METADATA_1 ON FOLDER_METADATA (FOLDER_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- FOLDER_CONSTRAINT
+-----------------------------------------------------------------------------
+
+CREATE TABLE FOLDER_CONSTRAINT
+(
+    CONSTRAINT_ID int4 NOT NULL,
+    FOLDER_ID int4 NOT NULL,
+    APPLY_ORDER int4 NOT NULL,
+    USER_PRINCIPALS_ACL varchar(120),
+    ROLE_PRINCIPALS_ACL varchar(120),
+    GROUP_PRINCIPALS_ACL varchar(120),
+    PERMISSIONS_ACL varchar(120)
+);
+
+ALTER TABLE FOLDER_CONSTRAINT
+    ADD CONSTRAINT FOLDER_CONSTRAINT_PK
+PRIMARY KEY (CONSTRAINT_ID);
+
+CREATE INDEX IX_FOLDER_CONSTRAINT_1 ON FOLDER_CONSTRAINT (FOLDER_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- FOLDER_CONSTRAINTS_REF
+-----------------------------------------------------------------------------
+
+CREATE TABLE FOLDER_CONSTRAINTS_REF
+(
+    CONSTRAINTS_REF_ID int4 NOT NULL,
+    FOLDER_ID int4 NOT NULL,
+    APPLY_ORDER int4 NOT NULL,
+    NAME varchar(40) NOT NULL,
+    CONSTRAINT UN_FOLDER_CONSTRAINTS_REF_1 UNIQUE (FOLDER_ID, NAME)
+);
+
+ALTER TABLE FOLDER_CONSTRAINTS_REF
+    ADD CONSTRAINT FOLDER_CONSTRAINTS_REF_PK
+PRIMARY KEY (CONSTRAINTS_REF_ID);
+
+CREATE INDEX IX_FOLDER_CONSTRAINTS_REF_1 ON FOLDER_CONSTRAINTS_REF (FOLDER_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- FOLDER_ORDER
+-----------------------------------------------------------------------------
+
+CREATE TABLE FOLDER_ORDER
+(
+    ORDER_ID int4 NOT NULL,
+    FOLDER_ID int4 NOT NULL,
+    SORT_ORDER int4 NOT NULL,
+    NAME varchar(80) NOT NULL,
+    CONSTRAINT UN_FOLDER_ORDER_1 UNIQUE (FOLDER_ID, NAME)
+);
+
+ALTER TABLE FOLDER_ORDER
+    ADD CONSTRAINT FOLDER_ORDER_PK
+PRIMARY KEY (ORDER_ID);
+
+CREATE INDEX IX_FOLDER_ORDER_1 ON FOLDER_ORDER (FOLDER_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- FOLDER_MENU
+-----------------------------------------------------------------------------
+
+CREATE TABLE FOLDER_MENU
+(
+    MENU_ID int4 NOT NULL,
+    CLASS_NAME varchar(100) NOT NULL,
+    PARENT_ID int4,
+    FOLDER_ID int4,
+    ELEMENT_ORDER int4,
+    NAME varchar(100),
+    TITLE varchar(100),
+    SHORT_TITLE varchar(40),
+    TEXT varchar(100),
+    OPTIONS varchar(255),
+    DEPTH int4,
+    IS_PATHS int2,
+    IS_REGEXP int2,
+    PROFILE varchar(80),
+    OPTIONS_ORDER varchar(255),
+    SKIN varchar(80),
+    IS_NEST int2,
+    CONSTRAINT UN_FOLDER_MENU_1 UNIQUE (FOLDER_ID, NAME)
+);
+
+ALTER TABLE FOLDER_MENU
+    ADD CONSTRAINT FOLDER_MENU_PK
+PRIMARY KEY (MENU_ID);
+
+CREATE INDEX IX_FOLDER_MENU_1 ON FOLDER_MENU (PARENT_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- FOLDER_MENU_METADATA
+-----------------------------------------------------------------------------
+
+CREATE TABLE FOLDER_MENU_METADATA
+(
+    METADATA_ID int4 NOT NULL,
+    MENU_ID int4 NOT NULL,
+    NAME varchar(15) NOT NULL,
+    LOCALE varchar(20) NOT NULL,
+    VALUE varchar(100) NOT NULL,
+    CONSTRAINT UN_FOLDER_MENU_METADATA_1 UNIQUE (MENU_ID, NAME, LOCALE, VALUE)
+);
+
+ALTER TABLE FOLDER_MENU_METADATA
+    ADD CONSTRAINT FOLDER_MENU_METADATA_PK
+PRIMARY KEY (METADATA_ID);
+
+CREATE INDEX IX_FOLDER_MENU_METADATA_1 ON FOLDER_MENU_METADATA (MENU_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PAGE
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE
+(
+    PAGE_ID int4 NOT NULL,
+    PARENT_ID int4 NOT NULL,
+    PATH varchar(240) NOT NULL,
+    NAME varchar(80) NOT NULL,
+    VERSION varchar(40),
+    TITLE varchar(100),
+    SHORT_TITLE varchar(40),
+    IS_HIDDEN int2 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),
+    CONSTRAINT UN_PAGE_1 UNIQUE (PATH)
+);
+
+ALTER TABLE PAGE
+    ADD CONSTRAINT PAGE_PK
+PRIMARY KEY (PAGE_ID);
+
+CREATE INDEX IX_PAGE_1 ON PAGE (PARENT_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PAGE_METADATA
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_METADATA
+(
+    METADATA_ID int4 NOT NULL,
+    PAGE_ID int4 NOT NULL,
+    NAME varchar(15) NOT NULL,
+    LOCALE varchar(20) NOT NULL,
+    VALUE varchar(100) NOT NULL,
+    CONSTRAINT UN_PAGE_METADATA_1 UNIQUE (PAGE_ID, NAME, LOCALE, VALUE)
+);
+
+ALTER TABLE PAGE_METADATA
+    ADD CONSTRAINT PAGE_METADATA_PK
+PRIMARY KEY (METADATA_ID);
+
+CREATE INDEX IX_PAGE_METADATA_1 ON PAGE_METADATA (PAGE_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PAGE_CONSTRAINT
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_CONSTRAINT
+(
+    CONSTRAINT_ID int4 NOT NULL,
+    PAGE_ID int4 NOT NULL,
+    APPLY_ORDER int4 NOT NULL,
+    USER_PRINCIPALS_ACL varchar(120),
+    ROLE_PRINCIPALS_ACL varchar(120),
+    GROUP_PRINCIPALS_ACL varchar(120),
+    PERMISSIONS_ACL varchar(120)
+);
+
+ALTER TABLE PAGE_CONSTRAINT
+    ADD CONSTRAINT PAGE_CONSTRAINT_PK
+PRIMARY KEY (CONSTRAINT_ID);
+
+CREATE INDEX IX_PAGE_CONSTRAINT_1 ON PAGE_CONSTRAINT (PAGE_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PAGE_CONSTRAINTS_REF
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_CONSTRAINTS_REF
+(
+    CONSTRAINTS_REF_ID int4 NOT NULL,
+    PAGE_ID int4 NOT NULL,
+    APPLY_ORDER int4 NOT NULL,
+    NAME varchar(40) NOT NULL,
+    CONSTRAINT UN_PAGE_CONSTRAINTS_REF_1 UNIQUE (PAGE_ID, NAME)
+);
+
+ALTER TABLE PAGE_CONSTRAINTS_REF
+    ADD CONSTRAINT PAGE_CONSTRAINTS_REF_PK
+PRIMARY KEY (CONSTRAINTS_REF_ID);
+
+CREATE INDEX IX_PAGE_CONSTRAINTS_REF_1 ON PAGE_CONSTRAINTS_REF (PAGE_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PAGE_MENU
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_MENU
+(
+    MENU_ID int4 NOT NULL,
+    CLASS_NAME varchar(100) NOT NULL,
+    PARENT_ID int4,
+    PAGE_ID int4,
+    ELEMENT_ORDER int4,
+    NAME varchar(100),
+    TITLE varchar(100),
+    SHORT_TITLE varchar(40),
+    TEXT varchar(100),
+    OPTIONS varchar(255),
+    DEPTH int4,
+    IS_PATHS int2,
+    IS_REGEXP int2,
+    PROFILE varchar(80),
+    OPTIONS_ORDER varchar(255),
+    SKIN varchar(80),
+    IS_NEST int2,
+    CONSTRAINT UN_PAGE_MENU_1 UNIQUE (PAGE_ID, NAME)
+);
+
+ALTER TABLE PAGE_MENU
+    ADD CONSTRAINT PAGE_MENU_PK
+PRIMARY KEY (MENU_ID);
+
+CREATE INDEX IX_PAGE_MENU_1 ON PAGE_MENU (PARENT_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PAGE_MENU_METADATA
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_MENU_METADATA
+(
+    METADATA_ID int4 NOT NULL,
+    MENU_ID int4 NOT NULL,
+    NAME varchar(15) NOT NULL,
+    LOCALE varchar(20) NOT NULL,
+    VALUE varchar(100) NOT NULL,
+    CONSTRAINT UN_PAGE_MENU_METADATA_1 UNIQUE (MENU_ID, NAME, LOCALE, VALUE)
+);
+
+ALTER TABLE PAGE_MENU_METADATA
+    ADD CONSTRAINT PAGE_MENU_METADATA_PK
+PRIMARY KEY (METADATA_ID);
+
+CREATE INDEX IX_PAGE_MENU_METADATA_1 ON PAGE_MENU_METADATA (MENU_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- FRAGMENT
+-----------------------------------------------------------------------------
+
+CREATE TABLE FRAGMENT
+(
+    FRAGMENT_ID int4 NOT NULL,
+    PARENT_ID int4,
+    PAGE_ID int4,
+    NAME varchar(100),
+    TITLE varchar(100),
+    SHORT_TITLE varchar(40),
+    TYPE varchar(40),
+    SKIN varchar(80),
+    DECORATOR varchar(80),
+    STATE varchar(40),
+    LAYOUT_ROW int4,
+    LAYOUT_COLUMN int4,
+    LAYOUT_SIZES varchar(20),
+    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),
+    CONSTRAINT UN_FRAGMENT_1 UNIQUE (PAGE_ID)
+);
+
+ALTER TABLE FRAGMENT
+    ADD CONSTRAINT FRAGMENT_PK
+PRIMARY KEY (FRAGMENT_ID);
+
+CREATE INDEX IX_FRAGMENT_1 ON FRAGMENT (PARENT_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- FRAGMENT_CONSTRAINT
+-----------------------------------------------------------------------------
+
+CREATE TABLE FRAGMENT_CONSTRAINT
+(
+    CONSTRAINT_ID int4 NOT NULL,
+    FRAGMENT_ID int4 NOT NULL,
+    APPLY_ORDER int4 NOT NULL,
+    USER_PRINCIPALS_ACL varchar(120),
+    ROLE_PRINCIPALS_ACL varchar(120),
+    GROUP_PRINCIPALS_ACL varchar(120),
+    PERMISSIONS_ACL varchar(120)
+);
+
+ALTER TABLE FRAGMENT_CONSTRAINT
+    ADD CONSTRAINT FRAGMENT_CONSTRAINT_PK
+PRIMARY KEY (CONSTRAINT_ID);
+
+CREATE INDEX IX_FRAGMENT_CONSTRAINT_1 ON FRAGMENT_CONSTRAINT (FRAGMENT_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- FRAGMENT_CONSTRAINTS_REF
+-----------------------------------------------------------------------------
+
+CREATE TABLE FRAGMENT_CONSTRAINTS_REF
+(
+    CONSTRAINTS_REF_ID int4 NOT NULL,
+    FRAGMENT_ID int4 NOT NULL,
+    APPLY_ORDER int4 NOT NULL,
+    NAME varchar(40) NOT NULL,
+    CONSTRAINT UN_FRAGMENT_CONSTRAINTS_REF_1 UNIQUE (FRAGMENT_ID, NAME)
+);
+
+ALTER TABLE FRAGMENT_CONSTRAINTS_REF
+    ADD CONSTRAINT FRAGMENT_CONSTRAINTS_REF_PK
+PRIMARY KEY (CONSTRAINTS_REF_ID);
+
+CREATE INDEX IX_FRAGMENT_CONSTRAINTS_REF_1 ON FRAGMENT_CONSTRAINTS_REF (FRAGMENT_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- FRAGMENT_PREF
+-----------------------------------------------------------------------------
+
+CREATE TABLE FRAGMENT_PREF
+(
+    PREF_ID int4 NOT NULL,
+    FRAGMENT_ID int4 NOT NULL,
+    NAME varchar(40) NOT NULL,
+    IS_READ_ONLY int2 NOT NULL,
+    CONSTRAINT UN_FRAGMENT_PREF_1 UNIQUE (FRAGMENT_ID, NAME)
+);
+
+ALTER TABLE FRAGMENT_PREF
+    ADD CONSTRAINT FRAGMENT_PREF_PK
+PRIMARY KEY (PREF_ID);
+
+CREATE INDEX IX_FRAGMENT_PREF_1 ON FRAGMENT_PREF (FRAGMENT_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- FRAGMENT_PREF_VALUE
+-----------------------------------------------------------------------------
+
+CREATE TABLE FRAGMENT_PREF_VALUE
+(
+    PREF_VALUE_ID int4 NOT NULL,
+    PREF_ID int4 NOT NULL,
+    VALUE_ORDER int4 NOT NULL,
+    VALUE varchar(100) NOT NULL
+);
+
+ALTER TABLE FRAGMENT_PREF_VALUE
+    ADD CONSTRAINT FRAGMENT_PREF_VALUE_PK
+PRIMARY KEY (PREF_VALUE_ID);
+
+CREATE INDEX IX_FRAGMENT_PREF_VALUE_1 ON FRAGMENT_PREF_VALUE (PREF_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- LINK
+-----------------------------------------------------------------------------
+
+CREATE TABLE LINK
+(
+    LINK_ID int4 NOT NULL,
+    PARENT_ID int4 NOT NULL,
+    PATH varchar(240) NOT NULL,
+    NAME varchar(80) NOT NULL,
+    VERSION varchar(40),
+    TITLE varchar(100),
+    SHORT_TITLE varchar(40),
+    IS_HIDDEN int2 NOT NULL,
+    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),
+    CONSTRAINT UN_LINK_1 UNIQUE (PATH)
+);
+
+ALTER TABLE LINK
+    ADD CONSTRAINT LINK_PK
+PRIMARY KEY (LINK_ID);
+
+CREATE INDEX IX_LINK_1 ON LINK (PARENT_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- LINK_METADATA
+-----------------------------------------------------------------------------
+
+CREATE TABLE LINK_METADATA
+(
+    METADATA_ID int4 NOT NULL,
+    LINK_ID int4 NOT NULL,
+    NAME varchar(15) NOT NULL,
+    LOCALE varchar(20) NOT NULL,
+    VALUE varchar(100) NOT NULL,
+    CONSTRAINT UN_LINK_METADATA_1 UNIQUE (LINK_ID, NAME, LOCALE, VALUE)
+);
+
+ALTER TABLE LINK_METADATA
+    ADD CONSTRAINT LINK_METADATA_PK
+PRIMARY KEY (METADATA_ID);
+
+CREATE INDEX IX_LINK_METADATA_1 ON LINK_METADATA (LINK_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- LINK_CONSTRAINT
+-----------------------------------------------------------------------------
+
+CREATE TABLE LINK_CONSTRAINT
+(
+    CONSTRAINT_ID int4 NOT NULL,
+    LINK_ID int4 NOT NULL,
+    APPLY_ORDER int4 NOT NULL,
+    USER_PRINCIPALS_ACL varchar(120),
+    ROLE_PRINCIPALS_ACL varchar(120),
+    GROUP_PRINCIPALS_ACL varchar(120),
+    PERMISSIONS_ACL varchar(120)
+);
+
+ALTER TABLE LINK_CONSTRAINT
+    ADD CONSTRAINT LINK_CONSTRAINT_PK
+PRIMARY KEY (CONSTRAINT_ID);
+
+CREATE INDEX IX_LINK_CONSTRAINT_1 ON LINK_CONSTRAINT (LINK_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- LINK_CONSTRAINTS_REF
+-----------------------------------------------------------------------------
+
+CREATE TABLE LINK_CONSTRAINTS_REF
+(
+    CONSTRAINTS_REF_ID int4 NOT NULL,
+    LINK_ID int4 NOT NULL,
+    APPLY_ORDER int4 NOT NULL,
+    NAME varchar(40) NOT NULL,
+    CONSTRAINT UN_LINK_CONSTRAINTS_REF_1 UNIQUE (LINK_ID, NAME)
+);
+
+ALTER TABLE LINK_CONSTRAINTS_REF
+    ADD CONSTRAINT LINK_CONSTRAINTS_REF_PK
+PRIMARY KEY (CONSTRAINTS_REF_ID);
+
+CREATE INDEX IX_LINK_CONSTRAINTS_REF_1 ON LINK_CONSTRAINTS_REF (LINK_ID);
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PAGE_SECURITY
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_SECURITY
+(
+    PAGE_SECURITY_ID int4 NOT NULL,
+    PARENT_ID int4 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),
+    CONSTRAINT UN_PAGE_SECURITY_1 UNIQUE (PARENT_ID),
+    CONSTRAINT UN_PAGE_SECURITY_2 UNIQUE (PATH)
+);
+
+ALTER TABLE PAGE_SECURITY
+    ADD CONSTRAINT PAGE_SECURITY_PK
+PRIMARY KEY (PAGE_SECURITY_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PAGE_SEC_CONSTRAINTS_DEF
+-----------------------------------------------------------------------------
+
+CREATE TABLE PAGE_SEC_CONSTRAINTS_DEF
+(
+    CONSTRAINTS_DEF_ID int4 NOT NULL,
+    PAGE_SECURITY_ID int4 NOT NULL,
+    NAME varchar(40) NOT NULL,
+    CONSTRAINT UN_PAGE_SEC_CONSTRAINTS_DEF_1 UNIQUE (PAGE_SECURITY_ID, NAME)
+);
+
+ALTER TABLE PAGE_SEC_CONSTRAINTS_DEF
+    ADD CONSTRAINT PAGE_SEC_CONSTRAINTS_DEF_PK
+PRIMARY KEY (CONSTRAINTS_DEF_ID);
+
+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 int4 NOT NULL,
+    CONSTRAINTS_DEF_ID int4 NOT NULL,
+    APPLY_ORDER int4 NOT NULL,
+    USER_PRINCIPALS_ACL varchar(120),
+    ROLE_PRINCIPALS_ACL varchar(120),
+    GROUP_PRINCIPALS_ACL varchar(120),
+    PERMISSIONS_ACL varchar(120)
+);
+
+ALTER TABLE PAGE_SEC_CONSTRAINT_DEF
+    ADD CONSTRAINT PAGE_SEC_CONSTRAINT_DEF_PK
+PRIMARY KEY (CONSTRAINT_DEF_ID);
+
+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 int4 NOT NULL,
+    PAGE_SECURITY_ID int4 NOT NULL,
+    APPLY_ORDER int4 NOT NULL,
+    NAME varchar(40) NOT NULL,
+    CONSTRAINT UN_PAGE_SEC_CONSTRAINTS_REF_1 UNIQUE (PAGE_SECURITY_ID, NAME)
+);
+
+ALTER TABLE PAGE_SEC_CONSTRAINTS_REF
+    ADD CONSTRAINT PAGE_SEC_CONSTRAINTS_REF_PK
+PRIMARY KEY (CONSTRAINTS_REF_ID);
+
+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)
+);
+
+ALTER TABLE PROFILING_RULE
+    ADD CONSTRAINT PROFILING_RULE_PK
+PRIMARY KEY (RULE_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- RULE_CRITERION
+-----------------------------------------------------------------------------
+
+CREATE TABLE RULE_CRITERION
+(
+    CRITERION_ID varchar(80) NOT NULL,
+    RULE_ID varchar(80) NOT NULL,
+    FALLBACK_ORDER int4 NOT NULL,
+    REQUEST_TYPE varchar(40) NOT NULL,
+    NAME varchar(80) NOT NULL,
+    COLUMN_VALUE varchar(128),
+    FALLBACK_TYPE int4 default 1
+);
+
+ALTER TABLE RULE_CRITERION
+    ADD CONSTRAINT RULE_CRITERION_PK
+PRIMARY KEY (CRITERION_ID);
+
+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
+);
+
+ALTER TABLE PRINCIPAL_RULE_ASSOC
+    ADD CONSTRAINT PRINCIPAL_RULE_ASSOC_PK
+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,
+    CONSTRAINT UN_PROFILE_PAGE_1 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 int4,
+    FOUNDED int4,
+    PITCH varchar(40),
+    NICKNAME varchar(40)
+);
+
+ALTER TABLE CLUBS
+    ADD CONSTRAINT CLUBS_PK
+PRIMARY KEY (NAME);
+
+
+
+
+
+ALTER TABLE FOLDER
+    ADD CONSTRAINT FOLDER_FK_1 FOREIGN KEY (PARENT_ID)
+    REFERENCES FOLDER (FOLDER_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE FOLDER_METADATA
+    ADD CONSTRAINT FOLDER_METADATA_FK_1 FOREIGN KEY (FOLDER_ID)
+    REFERENCES FOLDER (FOLDER_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE FOLDER_CONSTRAINT
+    ADD CONSTRAINT FOLDER_CONSTRAINT_FK_1 FOREIGN KEY (FOLDER_ID)
+    REFERENCES FOLDER (FOLDER_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE FOLDER_CONSTRAINTS_REF
+    ADD CONSTRAINT FOLDER_CONSTRAINTS_REF_FK_1 FOREIGN KEY (FOLDER_ID)
+    REFERENCES FOLDER (FOLDER_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE FOLDER_ORDER
+    ADD CONSTRAINT FOLDER_ORDER_FK_1 FOREIGN KEY (FOLDER_ID)
+    REFERENCES FOLDER (FOLDER_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE FOLDER_MENU
+    ADD CONSTRAINT FOLDER_MENU_FK_1 FOREIGN KEY (PARENT_ID)
+    REFERENCES FOLDER_MENU (MENU_ID)
+ON DELETE CASCADE
+;
+
+ALTER TABLE FOLDER_MENU
+    ADD CONSTRAINT FOLDER_MENU_FK_2 FOREIGN KEY (FOLDER_ID)
+    REFERENCES FOLDER (FOLDER_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE FOLDER_MENU_METADATA
+    ADD CONSTRAINT FOLDER_MENU_METADATA_FK_1 FOREIGN KEY (MENU_ID)
+    REFERENCES FOLDER_MENU (MENU_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE PAGE
+    ADD CONSTRAINT PAGE_FK_1 FOREIGN KEY (PARENT_ID)
+    REFERENCES FOLDER (FOLDER_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE PAGE_METADATA
+    ADD CONSTRAINT PAGE_METADATA_FK_1 FOREIGN KEY (PAGE_ID)
+    REFERENCES PAGE (PAGE_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE PAGE_CONSTRAINT
+    ADD CONSTRAINT PAGE_CONSTRAINT_FK_1 FOREIGN KEY (PAGE_ID)
+    REFERENCES PAGE (PAGE_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE PAGE_CONSTRAINTS_REF
+    ADD CONSTRAINT PAGE_CONSTRAINTS_REF_FK_1 FOREIGN KEY (PAGE_ID)
+    REFERENCES PAGE (PAGE_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE PAGE_MENU
+    ADD CONSTRAINT PAGE_MENU_FK_1 FOREIGN KEY (PARENT_ID)
+    REFERENCES PAGE_MENU (MENU_ID)
+ON DELETE CASCADE
+;
+
+ALTER TABLE PAGE_MENU
+    ADD CONSTRAINT PAGE_MENU_FK_2 FOREIGN KEY (PAGE_ID)
+    REFERENCES PAGE (PAGE_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE PAGE_MENU_METADATA
+    ADD CONSTRAINT PAGE_MENU_METADATA_FK_1 FOREIGN KEY (MENU_ID)
+    REFERENCES PAGE_MENU (MENU_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE FRAGMENT
+    ADD CONSTRAINT FRAGMENT_FK_1 FOREIGN KEY (PARENT_ID)
+    REFERENCES FRAGMENT (FRAGMENT_ID)
+ON DELETE CASCADE
+;
+
+ALTER TABLE FRAGMENT
+    ADD CONSTRAINT FRAGMENT_FK_2 FOREIGN KEY (PAGE_ID)
+    REFERENCES PAGE (PAGE_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE FRAGMENT_CONSTRAINT
+    ADD CONSTRAINT FRAGMENT_CONSTRAINT_FK_1 FOREIGN KEY (FRAGMENT_ID)
+    REFERENCES FRAGMENT (FRAGMENT_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE FRAGMENT_CONSTRAINTS_REF
+    ADD CONSTRAINT FRAGMENT_CONSTRAINTS_REF_FK_1 FOREIGN KEY (FRAGMENT_ID)
+    REFERENCES FRAGMENT (FRAGMENT_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE FRAGMENT_PREF
+    ADD CONSTRAINT FRAGMENT_PREF_FK_1 FOREIGN KEY (FRAGMENT_ID)
+    REFERENCES FRAGMENT (FRAGMENT_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE FRAGMENT_PREF_VALUE
+    ADD CONSTRAINT FRAGMENT_PREF_VALUE_FK_1 FOREIGN KEY (PREF_ID)
+    REFERENCES FRAGMENT_PREF (PREF_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE LINK
+    ADD CONSTRAINT LINK_FK_1 FOREIGN KEY (PARENT_ID)
+    REFERENCES FOLDER (FOLDER_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE LINK_METADATA
+    ADD CONSTRAINT LINK_METADATA_FK_1 FOREIGN KEY (LINK_ID)
+    REFERENCES LINK (LINK_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE LINK_CONSTRAINT
+    ADD CONSTRAINT LINK_CONSTRAINT_FK_1 FOREIGN KEY (LINK_ID)
+    REFERENCES LINK (LINK_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE LINK_CONSTRAINTS_REF
+    ADD CONSTRAINT LINK_CONSTRAINTS_REF_FK_1 FOREIGN KEY (LINK_ID)
+    REFERENCES LINK (LINK_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE PAGE_SECURITY
+    ADD CONSTRAINT PAGE_SECURITY_FK_1 FOREIGN KEY (PARENT_ID)
+    REFERENCES FOLDER (FOLDER_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE PAGE_SEC_CONSTRAINTS_DEF
+    ADD CONSTRAINT PAGE_SEC_CONSTRAINTS_DEF_FK_1 FOREIGN KEY (PAGE_SECURITY_ID)
+    REFERENCES PAGE_SECURITY (PAGE_SECURITY_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE PAGE_SEC_CONSTRAINT_DEF
+    ADD CONSTRAINT PAGE_SEC_CONSTRAINT_DEF_FK_1 FOREIGN KEY (CONSTRAINTS_DEF_ID)
+    REFERENCES PAGE_SEC_CONSTRAINTS_DEF (CONSTRAINTS_DEF_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE PAGE_SEC_CONSTRAINTS_REF
+    ADD CONSTRAINT PAGE_SEC_CONSTRAINTS_REF_FK_1 FOREIGN KEY (PAGE_SECURITY_ID)
+    REFERENCES PAGE_SECURITY (PAGE_SECURITY_ID)
+ON DELETE CASCADE
+;
+
+
+
+
+
+ALTER TABLE RULE_CRITERION
+    ADD CONSTRAINT RULE_CRITERION_FK_1 FOREIGN KEY (RULE_ID)
+    REFERENCES PROFILING_RULE (RULE_ID)
+ON DELETE CASCADE
+;
+
+
+
+
+
+
+
+
+

Added: portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase3ojb-schema.sql
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase3ojb-schema.sql?rev=360210&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase3ojb-schema.sql (added)
+++ portals/jetspeed-2/trunk/etc/sql/postgres/schema/phase3ojb-schema.sql Fri Dec 30 17:03:31 2005
@@ -0,0 +1,178 @@
+
+-----------------------------------------------------------------------------
+-- OJB_HL_SEQ
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_HL_SEQ
+(
+    TABLENAME varchar(175) NOT NULL,
+    FIELDNAME varchar(70) NOT NULL,
+    MAX_KEY int4,
+    GRAB_SIZE int4,
+    VERSION int4
+);
+
+ALTER TABLE OJB_HL_SEQ
+    ADD CONSTRAINT OJB_HL_SEQ_PK
+PRIMARY KEY (TABLENAME,FIELDNAME);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- OJB_LOCKENTRY
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_LOCKENTRY
+(
+    OID_ varchar(250) NOT NULL,
+    TX_ID varchar(50) NOT NULL,
+    TIMESTAMP_ TIMESTAMP,
+    ISOLATIONLEVEL int4,
+    LOCKTYPE int4
+);
+
+ALTER TABLE OJB_LOCKENTRY
+    ADD CONSTRAINT OJB_LOCKENTRY_PK
+PRIMARY KEY (OID_,TX_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- OJB_NRM
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_NRM
+(
+    NAME varchar(250) NOT NULL,
+    OID_ bytea
+);
+
+ALTER TABLE OJB_NRM
+    ADD CONSTRAINT OJB_NRM_PK
+PRIMARY KEY (NAME);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- OJB_DLIST
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_DLIST
+(
+    ID int4 NOT NULL,
+    SIZE_ int4
+);
+
+ALTER TABLE OJB_DLIST
+    ADD CONSTRAINT OJB_DLIST_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- OJB_DLIST_ENTRIES
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_DLIST_ENTRIES
+(
+    ID int4 NOT NULL,
+    DLIST_ID int4,
+    POSITION_ int4,
+    OID_ bytea
+);
+
+ALTER TABLE OJB_DLIST_ENTRIES
+    ADD CONSTRAINT OJB_DLIST_ENTRIES_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- OJB_DSET
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_DSET
+(
+    ID int4 NOT NULL,
+    SIZE_ int4
+);
+
+ALTER TABLE OJB_DSET
+    ADD CONSTRAINT OJB_DSET_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- OJB_DSET_ENTRIES
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_DSET_ENTRIES
+(
+    ID int4 NOT NULL,
+    DLIST_ID int4,
+    POSITION_ int4,
+    OID_ bytea
+);
+
+ALTER TABLE OJB_DSET_ENTRIES
+    ADD CONSTRAINT OJB_DSET_ENTRIES_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- OJB_DMAP
+-----------------------------------------------------------------------------
+
+CREATE TABLE OJB_DMAP
+(
+    ID int4 NOT NULL,
+    SIZE_ int4
+);
+
+ALTER TABLE OJB_DMAP
+    ADD CONSTRAINT OJB_DMAP_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Added: portals/jetspeed-2/trunk/etc/sql/postgres/schema/prefs-schema.sql
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/etc/sql/postgres/schema/prefs-schema.sql?rev=360210&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/etc/sql/postgres/schema/prefs-schema.sql (added)
+++ portals/jetspeed-2/trunk/etc/sql/postgres/schema/prefs-schema.sql Fri Dec 30 17:03:31 2005
@@ -0,0 +1,56 @@
+
+-----------------------------------------------------------------------------
+-- PREFS_PROPERTY_VALUE
+-----------------------------------------------------------------------------
+
+CREATE TABLE PREFS_PROPERTY_VALUE
+(
+    PROPERTY_VALUE_ID int4 NOT NULL,
+    NODE_ID int4,
+    PROPERTY_NAME varchar(100),
+    PROPERTY_VALUE varchar(254),
+    CREATION_DATE TIMESTAMP,
+    MODIFIED_DATE TIMESTAMP
+);
+
+ALTER TABLE PREFS_PROPERTY_VALUE
+    ADD CONSTRAINT PREFS_PROPERTY_VALUE_PK
+PRIMARY KEY (PROPERTY_VALUE_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PREFS_NODE
+-----------------------------------------------------------------------------
+
+CREATE TABLE PREFS_NODE
+(
+    NODE_ID int4 NOT NULL,
+    PARENT_NODE_ID int4,
+    NODE_NAME varchar(100),
+    NODE_TYPE int4,
+    FULL_PATH varchar(254),
+    CREATION_DATE TIMESTAMP,
+    MODIFIED_DATE TIMESTAMP
+);
+
+ALTER TABLE PREFS_NODE
+    ADD CONSTRAINT PREFS_NODE_PK
+PRIMARY KEY (NODE_ID);
+
+
+
+
+
+
+
+ALTER TABLE PREFS_NODE
+    ADD CONSTRAINT PREFS_NODE_FK_1 FOREIGN KEY (PARENT_NODE_ID)
+    REFERENCES PREFS_NODE (NODE_ID)
+;
+
+
+

Added: portals/jetspeed-2/trunk/etc/sql/postgres/schema/registry-schema.sql
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/etc/sql/postgres/schema/registry-schema.sql?rev=360210&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/etc/sql/postgres/schema/registry-schema.sql (added)
+++ portals/jetspeed-2/trunk/etc/sql/postgres/schema/registry-schema.sql Fri Dec 30 17:03:31 2005
@@ -0,0 +1,406 @@
+
+-----------------------------------------------------------------------------
+-- PORTLET_DEFINITION
+-----------------------------------------------------------------------------
+
+CREATE TABLE PORTLET_DEFINITION
+(
+    ID int4 NOT NULL,
+    NAME varchar(80),
+    CLASS_NAME varchar(255),
+    APPLICATION_ID int4 NOT NULL,
+    PORTLET_IDENTIFIER varchar(80),
+    EXPIRATION_CACHE varchar(30),
+    RESOURCE_BUNDLE varchar(255),
+    PREFERENCE_VALIDATOR varchar(255)
+);
+
+ALTER TABLE PORTLET_DEFINITION
+    ADD CONSTRAINT PORTLET_DEFINITION_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PORTLET_APPLICATION
+-----------------------------------------------------------------------------
+
+CREATE TABLE PORTLET_APPLICATION
+(
+    APPLICATION_ID int4 NOT NULL,
+    APP_NAME varchar(80) NOT NULL,
+    APP_IDENTIFIER varchar(80),
+    VERSION varchar(80),
+    APP_TYPE int4,
+    CHECKSUM varchar(80),
+    DESCRIPTION varchar(80),
+    WEB_APP_ID int4 NOT NULL,
+    CONSTRAINT UK_APPLICATION UNIQUE (APP_NAME)
+);
+
+ALTER TABLE PORTLET_APPLICATION
+    ADD CONSTRAINT PORTLET_APPLICATION_PK
+PRIMARY KEY (APPLICATION_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- WEB_APPLICATION
+-----------------------------------------------------------------------------
+
+CREATE TABLE WEB_APPLICATION
+(
+    ID int4 NOT NULL,
+    CONTEXT_ROOT varchar(255) NOT NULL
+);
+
+ALTER TABLE WEB_APPLICATION
+    ADD CONSTRAINT WEB_APPLICATION_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PA_METADATA_FIELDS
+-----------------------------------------------------------------------------
+
+CREATE TABLE PA_METADATA_FIELDS
+(
+    ID int4 NOT NULL,
+    OBJECT_ID int4 NOT NULL,
+    COLUMN_VALUE varchar(2000) NOT NULL,
+    NAME varchar(100) NOT NULL,
+    LOCALE_STRING varchar(50) NOT NULL
+);
+
+ALTER TABLE PA_METADATA_FIELDS
+    ADD CONSTRAINT PA_METADATA_FIELDS_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PD_METADATA_FIELDS
+-----------------------------------------------------------------------------
+
+CREATE TABLE PD_METADATA_FIELDS
+(
+    ID int4 NOT NULL,
+    OBJECT_ID int4 NOT NULL,
+    COLUMN_VALUE varchar(2000) NOT NULL,
+    NAME varchar(100) NOT NULL,
+    LOCALE_STRING varchar(50) NOT NULL
+);
+
+ALTER TABLE PD_METADATA_FIELDS
+    ADD CONSTRAINT PD_METADATA_FIELDS_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- LANGUAGE
+-----------------------------------------------------------------------------
+
+CREATE TABLE LANGUAGE
+(
+    ID int4 NOT NULL,
+    PORTLET_ID int4 NOT NULL,
+    TITLE varchar(100),
+    SHORT_TITLE varchar(100),
+    LOCALE_STRING varchar(50) NOT NULL,
+    KEYWORDS varchar(2000)
+);
+
+ALTER TABLE LANGUAGE
+    ADD CONSTRAINT LANGUAGE_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PORTLET_CONTENT_TYPE
+-----------------------------------------------------------------------------
+
+CREATE TABLE PORTLET_CONTENT_TYPE
+(
+    CONTENT_TYPE_ID int4 NOT NULL,
+    PORTLET_ID int4 NOT NULL,
+    CONTENT_TYPE varchar(30) NOT NULL,
+    MODES varchar(2000)
+);
+
+ALTER TABLE PORTLET_CONTENT_TYPE
+    ADD CONSTRAINT PORTLET_CONTENT_TYPE_PK
+PRIMARY KEY (CONTENT_TYPE_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PARAMETER
+-----------------------------------------------------------------------------
+
+CREATE TABLE PARAMETER
+(
+    PARAMETER_ID int4 NOT NULL,
+    PARENT_ID int4 NOT NULL,
+    CLASS_NAME varchar(255) NOT NULL,
+    NAME varchar(80) NOT NULL,
+    PARAMETER_VALUE varchar(2000) NOT NULL
+);
+
+ALTER TABLE PARAMETER
+    ADD CONSTRAINT PARAMETER_PK
+PRIMARY KEY (PARAMETER_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PORTLET_ENTITY
+-----------------------------------------------------------------------------
+
+CREATE TABLE PORTLET_ENTITY
+(
+    PEID int4 NOT NULL,
+    ID varchar(255) NOT NULL,
+    APP_NAME varchar(255) NOT NULL,
+    PORTLET_NAME varchar(255) NOT NULL,
+    CONSTRAINT UK_ENTITY_ID UNIQUE (ID)
+);
+
+ALTER TABLE PORTLET_ENTITY
+    ADD CONSTRAINT PORTLET_ENTITY_PK
+PRIMARY KEY (PEID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- SECURITY_ROLE_REFERENCE
+-----------------------------------------------------------------------------
+
+CREATE TABLE SECURITY_ROLE_REFERENCE
+(
+    ID int4 NOT NULL,
+    PORTLET_DEFINITION_ID int4 NOT NULL,
+    ROLE_NAME varchar(150) NOT NULL,
+    ROLE_LINK varchar(150)
+);
+
+ALTER TABLE SECURITY_ROLE_REFERENCE
+    ADD CONSTRAINT SECURITY_ROLE_REFERENCE_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- SECURITY_ROLE
+-----------------------------------------------------------------------------
+
+CREATE TABLE SECURITY_ROLE
+(
+    ID int4 NOT NULL,
+    WEB_APPLICATION_ID int4 NOT NULL,
+    ROLE_NAME varchar(150) NOT NULL,
+    DESCRIPTION varchar(150)
+);
+
+ALTER TABLE SECURITY_ROLE
+    ADD CONSTRAINT SECURITY_ROLE_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- USER_ATTRIBUTE_REF
+-----------------------------------------------------------------------------
+
+CREATE TABLE USER_ATTRIBUTE_REF
+(
+    ID int4 NOT NULL,
+    APPLICATION_ID int4 NOT NULL,
+    NAME varchar(150),
+    NAME_LINK varchar(150)
+);
+
+ALTER TABLE USER_ATTRIBUTE_REF
+    ADD CONSTRAINT USER_ATTRIBUTE_REF_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- USER_ATTRIBUTE
+-----------------------------------------------------------------------------
+
+CREATE TABLE USER_ATTRIBUTE
+(
+    ID int4 NOT NULL,
+    APPLICATION_ID int4 NOT NULL,
+    NAME varchar(150),
+    DESCRIPTION varchar(150)
+);
+
+ALTER TABLE USER_ATTRIBUTE
+    ADD CONSTRAINT USER_ATTRIBUTE_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- JETSPEED_SERVICE
+-----------------------------------------------------------------------------
+
+CREATE TABLE JETSPEED_SERVICE
+(
+    ID int4 NOT NULL,
+    APPLICATION_ID int4 NOT NULL,
+    NAME varchar(150)
+);
+
+ALTER TABLE JETSPEED_SERVICE
+    ADD CONSTRAINT JETSPEED_SERVICE_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- LOCALIZED_DESCRIPTION
+-----------------------------------------------------------------------------
+
+CREATE TABLE LOCALIZED_DESCRIPTION
+(
+    ID int4 NOT NULL,
+    OBJECT_ID int4 NOT NULL,
+    CLASS_NAME varchar(255) NOT NULL,
+    DESCRIPTION varchar(2000) NOT NULL,
+    LOCALE_STRING varchar(50) NOT NULL
+);
+
+ALTER TABLE LOCALIZED_DESCRIPTION
+    ADD CONSTRAINT LOCALIZED_DESCRIPTION_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- LOCALIZED_DISPLAY_NAME
+-----------------------------------------------------------------------------
+
+CREATE TABLE LOCALIZED_DISPLAY_NAME
+(
+    ID int4 NOT NULL,
+    OBJECT_ID int4 NOT NULL,
+    CLASS_NAME varchar(255),
+    DISPLAY_NAME varchar(2000) NOT NULL,
+    LOCALE_STRING varchar(50) NOT NULL
+);
+
+ALTER TABLE LOCALIZED_DISPLAY_NAME
+    ADD CONSTRAINT LOCALIZED_DISPLAY_NAME_PK
+PRIMARY KEY (ID);
+
+
+
+
+
+
+
+
+
+
+
+ALTER TABLE PA_METADATA_FIELDS
+    ADD CONSTRAINT PA_METADATA_FIELDS_FK_1 FOREIGN KEY (OBJECT_ID)
+    REFERENCES PORTLET_APPLICATION (APPLICATION_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE PD_METADATA_FIELDS
+    ADD CONSTRAINT PD_METADATA_FIELDS_FK_1 FOREIGN KEY (OBJECT_ID)
+    REFERENCES PORTLET_DEFINITION (ID)
+ON DELETE CASCADE
+;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ALTER TABLE USER_ATTRIBUTE_REF
+    ADD CONSTRAINT USER_ATTRIBUTE_REF_FK_1 FOREIGN KEY (APPLICATION_ID)
+    REFERENCES PORTLET_APPLICATION (APPLICATION_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE USER_ATTRIBUTE
+    ADD CONSTRAINT USER_ATTRIBUTE_FK_1 FOREIGN KEY (APPLICATION_ID)
+    REFERENCES PORTLET_APPLICATION (APPLICATION_ID)
+ON DELETE CASCADE
+;
+
+
+
+
+
+
+
+
+

Added: portals/jetspeed-2/trunk/etc/sql/postgres/schema/security-schema.sql
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/etc/sql/postgres/schema/security-schema.sql?rev=360210&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/etc/sql/postgres/schema/security-schema.sql (added)
+++ portals/jetspeed-2/trunk/etc/sql/postgres/schema/security-schema.sql Fri Dec 30 17:03:31 2005
@@ -0,0 +1,408 @@
+
+-----------------------------------------------------------------------------
+-- SECURITY_PRINCIPAL
+-----------------------------------------------------------------------------
+
+CREATE TABLE SECURITY_PRINCIPAL
+(
+    PRINCIPAL_ID int4 NOT NULL,
+    CLASSNAME varchar(254) NOT NULL,
+    IS_MAPPING_ONLY int2 NOT NULL,
+    IS_ENABLED int2 NOT NULL,
+    FULL_PATH varchar(254) NOT NULL,
+    CREATION_DATE TIMESTAMP NOT NULL,
+    MODIFIED_DATE TIMESTAMP NOT NULL,
+    CONSTRAINT UIX_SECURITY_PRINCIPAL UNIQUE (FULL_PATH)
+);
+
+ALTER TABLE SECURITY_PRINCIPAL
+    ADD CONSTRAINT SECURITY_PRINCIPAL_PK
+PRIMARY KEY (PRINCIPAL_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- SECURITY_PERMISSION
+-----------------------------------------------------------------------------
+
+CREATE TABLE SECURITY_PERMISSION
+(
+    PERMISSION_ID int4 NOT NULL,
+    CLASSNAME varchar(254) NOT NULL,
+    NAME varchar(254) NOT NULL,
+    ACTIONS varchar(254) NOT NULL,
+    CREATION_DATE TIMESTAMP NOT NULL,
+    MODIFIED_DATE TIMESTAMP NOT NULL
+);
+
+ALTER TABLE SECURITY_PERMISSION
+    ADD CONSTRAINT SECURITY_PERMISSION_PK
+PRIMARY KEY (PERMISSION_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- PRINCIPAL_PERMISSION
+-----------------------------------------------------------------------------
+
+CREATE TABLE PRINCIPAL_PERMISSION
+(
+    PRINCIPAL_ID int4 NOT NULL,
+    PERMISSION_ID int4 NOT NULL
+);
+
+ALTER TABLE PRINCIPAL_PERMISSION
+    ADD CONSTRAINT PRINCIPAL_PERMISSION_PK
+PRIMARY KEY (PRINCIPAL_ID,PERMISSION_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- SECURITY_CREDENTIAL
+-----------------------------------------------------------------------------
+
+CREATE TABLE SECURITY_CREDENTIAL
+(
+    CREDENTIAL_ID int4 NOT NULL,
+    PRINCIPAL_ID int4 NOT NULL,
+    COLUMN_VALUE varchar(254) NOT NULL,
+    TYPE int4 NOT NULL,
+    CLASSNAME varchar(254),
+    UPDATE_REQUIRED int2 NOT NULL,
+    IS_ENCODED int2 NOT NULL,
+    IS_ENABLED int2 NOT NULL,
+    AUTH_FAILURES int4 NOT NULL,
+    IS_EXPIRED int2 NOT NULL,
+    CREATION_DATE TIMESTAMP NOT NULL,
+    MODIFIED_DATE TIMESTAMP NOT NULL,
+    PREV_AUTH_DATE TIMESTAMP,
+    LAST_AUTH_DATE TIMESTAMP,
+    EXPIRATION_DATE DATE
+);
+
+ALTER TABLE SECURITY_CREDENTIAL
+    ADD CONSTRAINT SECURITY_CREDENTIAL_PK
+PRIMARY KEY (CREDENTIAL_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- SSO_SITE
+-----------------------------------------------------------------------------
+
+CREATE TABLE SSO_SITE
+(
+    SITE_ID int4 NOT NULL,
+    NAME varchar(254) NOT NULL,
+    URL varchar(254) NOT NULL,
+    ALLOW_USER_SET int2 default 0,
+    REQUIRES_CERTIFICATE int2 default 0,
+    CHALLENGE_RESPONSE_AUTH int2 default 0,
+    FORM_AUTH int2 default 0,
+    FORM_USER_FIELD varchar(128),
+    FORM_PWD_FIELD varchar(128),
+    REALM varchar(128),
+    CONSTRAINT UIX_SITE_URL UNIQUE (URL)
+);
+
+ALTER TABLE SSO_SITE
+    ADD CONSTRAINT SSO_SITE_PK
+PRIMARY KEY (SITE_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- SSO_COOKIE
+-----------------------------------------------------------------------------
+
+CREATE TABLE SSO_COOKIE
+(
+    COOKIE_ID int4 NOT NULL,
+    COOKIE varchar(1024) NOT NULL,
+    CREATE_DATE TIMESTAMP NOT NULL
+);
+
+ALTER TABLE SSO_COOKIE
+    ADD CONSTRAINT SSO_COOKIE_PK
+PRIMARY KEY (COOKIE_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- SSO_SITE_TO_PRINCIPALS
+-----------------------------------------------------------------------------
+
+CREATE TABLE SSO_SITE_TO_PRINCIPALS
+(
+    SITE_ID int4 NOT NULL,
+    PRINCIPAL_ID int4 NOT NULL
+);
+
+ALTER TABLE SSO_SITE_TO_PRINCIPALS
+    ADD CONSTRAINT SSO_SITE_TO_PRINCIPALS_PK
+PRIMARY KEY (SITE_ID,PRINCIPAL_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- SSO_PRINCIPAL_TO_REMOTE
+-----------------------------------------------------------------------------
+
+CREATE TABLE SSO_PRINCIPAL_TO_REMOTE
+(
+    PRINCIPAL_ID int4 NOT NULL,
+    REMOTE_PRINCIPAL_ID int4 NOT NULL
+);
+
+ALTER TABLE SSO_PRINCIPAL_TO_REMOTE
+    ADD CONSTRAINT SSO_PRINCIPAL_TO_REMOTE_PK
+PRIMARY KEY (PRINCIPAL_ID,REMOTE_PRINCIPAL_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- SSO_SITE_TO_REMOTE
+-----------------------------------------------------------------------------
+
+CREATE TABLE SSO_SITE_TO_REMOTE
+(
+    SITE_ID int4 NOT NULL,
+    PRINCIPAL_ID int4 NOT NULL
+);
+
+ALTER TABLE SSO_SITE_TO_REMOTE
+    ADD CONSTRAINT SSO_SITE_TO_REMOTE_PK
+PRIMARY KEY (SITE_ID,PRINCIPAL_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- SSO_COOKIE_TO_REMOTE
+-----------------------------------------------------------------------------
+
+CREATE TABLE SSO_COOKIE_TO_REMOTE
+(
+    COOKIE_ID int4 NOT NULL,
+    REMOTE_PRINCIPAL_ID int4 NOT NULL
+);
+
+ALTER TABLE SSO_COOKIE_TO_REMOTE
+    ADD CONSTRAINT SSO_COOKIE_TO_REMOTE_PK
+PRIMARY KEY (COOKIE_ID,REMOTE_PRINCIPAL_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- SECURITY_USER_ROLE
+-----------------------------------------------------------------------------
+
+CREATE TABLE SECURITY_USER_ROLE
+(
+    USER_ID int4 NOT NULL,
+    ROLE_ID int4 NOT NULL
+);
+
+ALTER TABLE SECURITY_USER_ROLE
+    ADD CONSTRAINT SECURITY_USER_ROLE_PK
+PRIMARY KEY (USER_ID,ROLE_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- SECURITY_USER_GROUP
+-----------------------------------------------------------------------------
+
+CREATE TABLE SECURITY_USER_GROUP
+(
+    USER_ID int4 NOT NULL,
+    GROUP_ID int4 NOT NULL
+);
+
+ALTER TABLE SECURITY_USER_GROUP
+    ADD CONSTRAINT SECURITY_USER_GROUP_PK
+PRIMARY KEY (USER_ID,GROUP_ID);
+
+
+
+
+
+
+-----------------------------------------------------------------------------
+-- SECURITY_GROUP_ROLE
+-----------------------------------------------------------------------------
+
+CREATE TABLE SECURITY_GROUP_ROLE
+(
+    GROUP_ID int4 NOT NULL,
+    ROLE_ID int4 NOT NULL
+);
+
+ALTER TABLE SECURITY_GROUP_ROLE
+    ADD CONSTRAINT SECURITY_GROUP_ROLE_PK
+PRIMARY KEY (GROUP_ID,ROLE_ID);
+
+
+
+
+
+
+
+
+
+ALTER TABLE PRINCIPAL_PERMISSION
+    ADD CONSTRAINT PRINCIPAL_PERMISSION_FK_1 FOREIGN KEY (PERMISSION_ID)
+    REFERENCES SECURITY_PERMISSION (PERMISSION_ID)
+ON DELETE CASCADE
+;
+
+ALTER TABLE PRINCIPAL_PERMISSION
+    ADD CONSTRAINT PRINCIPAL_PERMISSION_FK_2 FOREIGN KEY (PRINCIPAL_ID)
+    REFERENCES SECURITY_PRINCIPAL (PRINCIPAL_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE SECURITY_CREDENTIAL
+    ADD CONSTRAINT SECURITY_CREDENTIAL_FK_1 FOREIGN KEY (PRINCIPAL_ID)
+    REFERENCES SECURITY_PRINCIPAL (PRINCIPAL_ID)
+ON DELETE CASCADE
+;
+
+
+
+
+
+
+
+ALTER TABLE SSO_SITE_TO_PRINCIPALS
+    ADD CONSTRAINT SSO_SITE_TO_PRINCIPALS_FK_1 FOREIGN KEY (SITE_ID)
+    REFERENCES SSO_SITE (SITE_ID)
+ON DELETE CASCADE
+;
+
+ALTER TABLE SSO_SITE_TO_PRINCIPALS
+    ADD CONSTRAINT SSO_SITE_TO_PRINCIPALS_FK_2 FOREIGN KEY (PRINCIPAL_ID)
+    REFERENCES SECURITY_PRINCIPAL (PRINCIPAL_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE SSO_PRINCIPAL_TO_REMOTE
+    ADD CONSTRAINT SSO_PRINCIPAL_TO_REMOTE_FK_1 FOREIGN KEY (PRINCIPAL_ID)
+    REFERENCES SECURITY_PRINCIPAL (PRINCIPAL_ID)
+ON DELETE CASCADE
+;
+
+ALTER TABLE SSO_PRINCIPAL_TO_REMOTE
+    ADD CONSTRAINT SSO_PRINCIPAL_TO_REMOTE_FK_2 FOREIGN KEY (REMOTE_PRINCIPAL_ID)
+    REFERENCES SECURITY_PRINCIPAL (PRINCIPAL_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE SSO_SITE_TO_REMOTE
+    ADD CONSTRAINT SSO_SITE_TO_REMOTE_FK_1 FOREIGN KEY (SITE_ID)
+    REFERENCES SSO_SITE (SITE_ID)
+ON DELETE CASCADE
+;
+
+ALTER TABLE SSO_SITE_TO_REMOTE
+    ADD CONSTRAINT SSO_SITE_TO_REMOTE_FK_2 FOREIGN KEY (PRINCIPAL_ID)
+    REFERENCES SECURITY_PRINCIPAL (PRINCIPAL_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE SSO_COOKIE_TO_REMOTE
+    ADD CONSTRAINT SSO_COOKIE_TO_REMOTE_FK_1 FOREIGN KEY (COOKIE_ID)
+    REFERENCES SSO_COOKIE (COOKIE_ID)
+ON DELETE CASCADE
+;
+
+ALTER TABLE SSO_COOKIE_TO_REMOTE
+    ADD CONSTRAINT SSO_COOKIE_TO_REMOTE_FK_2 FOREIGN KEY (REMOTE_PRINCIPAL_ID)
+    REFERENCES SECURITY_PRINCIPAL (PRINCIPAL_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE SECURITY_USER_ROLE
+    ADD CONSTRAINT SECURITY_USER_ROLE_FK_1 FOREIGN KEY (ROLE_ID)
+    REFERENCES SECURITY_PRINCIPAL (PRINCIPAL_ID)
+ON DELETE CASCADE
+;
+
+ALTER TABLE SECURITY_USER_ROLE
+    ADD CONSTRAINT SECURITY_USER_ROLE_FK_2 FOREIGN KEY (USER_ID)
+    REFERENCES SECURITY_PRINCIPAL (PRINCIPAL_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE SECURITY_USER_GROUP
+    ADD CONSTRAINT SECURITY_USER_GROUP_FK_1 FOREIGN KEY (GROUP_ID)
+    REFERENCES SECURITY_PRINCIPAL (PRINCIPAL_ID)
+ON DELETE CASCADE
+;
+
+ALTER TABLE SECURITY_USER_GROUP
+    ADD CONSTRAINT SECURITY_USER_GROUP_FK_2 FOREIGN KEY (USER_ID)
+    REFERENCES SECURITY_PRINCIPAL (PRINCIPAL_ID)
+ON DELETE CASCADE
+;
+
+
+
+ALTER TABLE SECURITY_GROUP_ROLE
+    ADD CONSTRAINT SECURITY_GROUP_ROLE_FK_1 FOREIGN KEY (GROUP_ID)
+    REFERENCES SECURITY_PRINCIPAL (PRINCIPAL_ID)
+ON DELETE CASCADE
+;
+
+ALTER TABLE SECURITY_GROUP_ROLE
+    ADD CONSTRAINT SECURITY_GROUP_ROLE_FK_2 FOREIGN KEY (ROLE_ID)
+    REFERENCES SECURITY_PRINCIPAL (PRINCIPAL_ID)
+ON DELETE CASCADE
+;
+
+
+



---------------------------------------------------------------------
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