portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r497236 - in /portals/jetspeed-1/trunk: maven.xml src/sql/external/drops.sql src/sql/external/populate-postgres.sql src/sql/external/turbine-mysql.sql src/sql/external/turbine-postgres.sql
Date Wed, 17 Jan 2007 23:15:05 GMT
Author: taylor
Date: Wed Jan 17 15:15:05 2007
New Revision: 497236

URL: http://svn.apache.org/viewvc?view=rev&rev=497236
Log:
http://issues.apache.org/jira/browse/JS1-565

Full support for Postgresql with Add User support
Updated Postgresql scripts
Added a little tester goals for creating and population db (dbdrops, db, dbpop)

Requirements to run:
1. Postgresql version of torque-om jar
2. only tested on Postgresql server  8.1.5 
3. only tested on driver postgresql-8.1-407.jdbc3.jar
4. only tested on Jetspeed trunk

Added:
    portals/jetspeed-1/trunk/src/sql/external/drops.sql
Modified:
    portals/jetspeed-1/trunk/maven.xml
    portals/jetspeed-1/trunk/src/sql/external/populate-postgres.sql
    portals/jetspeed-1/trunk/src/sql/external/turbine-mysql.sql
    portals/jetspeed-1/trunk/src/sql/external/turbine-postgres.sql

Modified: portals/jetspeed-1/trunk/maven.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-1/trunk/maven.xml?view=diff&rev=497236&r1=497235&r2=497236
==============================================================================
--- portals/jetspeed-1/trunk/maven.xml (original)
+++ portals/jetspeed-1/trunk/maven.xml Wed Jan 17 15:15:05 2007
@@ -484,5 +484,44 @@
       <fail message="Required property *${required.property}* undefined. Please define
this property before continuing with build."
           unless="${required.property}"/>		
 	</goal>
-		
+
+ <goal name="db">
+    <sql driver="${torque.database.driver}"
+         url="${torque.database.url}"
+         userid="${torque.database.user}"
+         password="${torque.database.password}"
+         src="src/sql/external/turbine-postgres.sql"
+        >
+      <classpath>
+        <pathelement path="${torque.database.drivers}"/>
+      </classpath>             
+    </sql>
+ </goal>     
+
+ <goal name="dbdrops">
+    <sql driver="${torque.database.driver}"
+         url="${torque.database.url}"
+         userid="${torque.database.user}"
+         password="${torque.database.password}"
+         src="src/sql/external/drops.sql"
+        >
+      <classpath>
+        <pathelement path="${torque.database.drivers}"/>
+      </classpath>             
+    </sql>
+ </goal>     
+        
+ <goal name="dbpop">
+    <sql driver="${torque.database.driver}"
+         url="${torque.database.url}"
+         userid="${torque.database.user}"
+         password="${torque.database.password}"
+         src="src/sql/external/populate-postgres.sql"
+        >
+      <classpath>
+        <pathelement path="${torque.database.drivers}"/>
+      </classpath>             
+    </sql>
+ </goal>     
+    		
 </project>

Added: portals/jetspeed-1/trunk/src/sql/external/drops.sql
URL: http://svn.apache.org/viewvc/portals/jetspeed-1/trunk/src/sql/external/drops.sql?view=auto&rev=497236
==============================================================================
--- portals/jetspeed-1/trunk/src/sql/external/drops.sql (added)
+++ portals/jetspeed-1/trunk/src/sql/external/drops.sql Wed Jan 17 15:15:05 2007
@@ -0,0 +1,13 @@
+drop table TURBINE_ROLE_PERMISSION CASCADE;
+drop table TURBINE_PERMISSION CASCADE;
+drop table TURBINE_USER_GROUP_ROLE CASCADE;
+drop table TURBINE_ROLE CASCADE;
+drop table TURBINE_GROUP CASCADE;
+drop table TURBINE_USER CASCADE;
+drop table TURBINE_SCHEDULED_JOB CASCADE;
+drop table ID_TABLE CASCADE;
+DROP TABLE COFFEES CASCADE;
+DROP TABLE EMAIL_INBOX CASCADE;
+DROP TABLE JETSPEED_ROLE_PROFILE;
+DROP TABLE JETSPEED_GROUP_PROFILE;
+DROP TABLE JETSPEED_USER_PROFILE;

Modified: portals/jetspeed-1/trunk/src/sql/external/populate-postgres.sql
URL: http://svn.apache.org/viewvc/portals/jetspeed-1/trunk/src/sql/external/populate-postgres.sql?view=diff&rev=497236&r1=497235&r2=497236
==============================================================================
--- portals/jetspeed-1/trunk/src/sql/external/populate-postgres.sql (original)
+++ portals/jetspeed-1/trunk/src/sql/external/populate-postgres.sql Wed Jan 17 15:15:05 2007
@@ -11,9 +11,9 @@
 INSERT INTO TURBINE_ROLE VALUES(3,'guest',NULL);
 INSERT INTO TURBINE_GROUP VALUES(1,'Jetspeed',NULL);
 INSERT INTO TURBINE_GROUP VALUES(2,'apache',NULL);
-INSERT INTO TURBINE_USER VALUES(1,'admin','jetspeed','Raphael','Admin','raphael@apache.org','CONFIRMED',NULL,NULL,NULL,'F',NULL);
-INSERT INTO TURBINE_USER VALUES(2,'turbine','turbine','David','Turbine','taylor@apache.org','CONFIRMED',NULL,NULL,NULL,'F',NULL);
-INSERT INTO TURBINE_USER VALUES(3,'anon','anon','Anonymous','User','david@bluesunrise.com','CONFIRMED',NULL,NULL,'2001-11-11
18:45:41.671','F',NULL);
+INSERT INTO TURBINE_USER VALUES(1,'admin','jetspeed','Raphael','Admin','raphael@apache.org','CONFIRMED',NULL,NULL,NULL,'F',NULL,NULL);
+INSERT INTO TURBINE_USER VALUES(2,'turbine','turbine','David','Turbine','taylor@apache.org','CONFIRMED',NULL,NULL,NULL,'F',NULL,NULL);
+INSERT INTO TURBINE_USER VALUES(3,'anon','anon','Anonymous','User','david@bluesunrise.com','CONFIRMED',NULL,NULL,'2001-11-11
18:45:41.671','F',NULL,NULL);
 INSERT INTO TURBINE_ROLE_PERMISSION VALUES(1,1);
 INSERT INTO TURBINE_ROLE_PERMISSION VALUES(1,2);
 INSERT INTO TURBINE_ROLE_PERMISSION VALUES(1,3);

Modified: portals/jetspeed-1/trunk/src/sql/external/turbine-mysql.sql
URL: http://svn.apache.org/viewvc/portals/jetspeed-1/trunk/src/sql/external/turbine-mysql.sql?view=diff&rev=497236&r1=497235&r2=497236
==============================================================================
--- portals/jetspeed-1/trunk/src/sql/external/turbine-mysql.sql (original)
+++ portals/jetspeed-1/trunk/src/sql/external/turbine-mysql.sql Wed Jan 17 15:15:05 2007
@@ -13,11 +13,17 @@
 #-- See the License for the specific language governing permissions and
 #-- limitations under the License.
 #-----------------------------------------------------------------------------
-    
-# -----------------------------------------------------------------------
-# TURBINE_USER
-# -----------------------------------------------------------------------
+drop table if exists TURBINE_USER_GROUP_ROLE;
+drop table if exists TURBINE_ROLE_PERMISSION;
 drop table if exists TURBINE_USER;
+drop table if exists TURBINE_ROLE;
+drop table if exists TURBINE_GROUP;
+drop table if exists TURBINE_PERMISSION;
+drop table if exists JETSPEED_ROLE_PROFILE;
+drop table if exists JETSPEED_GROUP_PROFILE;
+drop table if exists JETSPEED_USER_PROFILE;
+drop table if exists TURBINE_ROLE_PERMISSION;
+drop table if exists COFFEES;
 
 CREATE TABLE TURBINE_USER
 (
@@ -37,12 +43,6 @@
     PRIMARY KEY(USER_ID),
     UNIQUE (LOGIN_NAME)
 );
-
-# -----------------------------------------------------------------------
-# TURBINE_ROLE
-# -----------------------------------------------------------------------
-drop table if exists TURBINE_ROLE;
-
 CREATE TABLE TURBINE_ROLE
 (
                             ROLE_ID INTEGER NOT NULL AUTO_INCREMENT,
@@ -51,12 +51,6 @@
     PRIMARY KEY(ROLE_ID),
     UNIQUE (ROLE_NAME)
 );
-
-# -----------------------------------------------------------------------
-# TURBINE_GROUP
-# -----------------------------------------------------------------------
-drop table if exists TURBINE_GROUP;
-
 CREATE TABLE TURBINE_GROUP
 (
                             GROUP_ID INTEGER NOT NULL AUTO_INCREMENT,
@@ -65,12 +59,6 @@
     PRIMARY KEY(GROUP_ID),
     UNIQUE (GROUP_NAME)
 );
-
-# -----------------------------------------------------------------------
-# TURBINE_PERMISSION
-# -----------------------------------------------------------------------
-drop table if exists TURBINE_PERMISSION;
-
 CREATE TABLE TURBINE_PERMISSION
 (
                             PERMISSION_ID INTEGER NOT NULL AUTO_INCREMENT,
@@ -79,12 +67,6 @@
     PRIMARY KEY(PERMISSION_ID),
     UNIQUE (PERMISSION_NAME)
 );
-
-# -----------------------------------------------------------------------
-# TURBINE_ROLE_PERMISSION
-# -----------------------------------------------------------------------
-drop table if exists TURBINE_ROLE_PERMISSION;
-
 CREATE TABLE TURBINE_ROLE_PERMISSION
 (
         ROLE_ID INTEGER NOT NULL,
@@ -93,12 +75,6 @@
     FOREIGN KEY (ROLE_ID) REFERENCES TURBINE_ROLE (ROLE_ID),
     FOREIGN KEY (PERMISSION_ID) REFERENCES TURBINE_PERMISSION (PERMISSION_ID)
 );
-
-# -----------------------------------------------------------------------
-# TURBINE_USER_GROUP_ROLE
-# -----------------------------------------------------------------------
-drop table if exists TURBINE_USER_GROUP_ROLE;
-
 CREATE TABLE TURBINE_USER_GROUP_ROLE
 (
         USER_ID INTEGER NOT NULL,
@@ -109,13 +85,6 @@
     FOREIGN KEY (GROUP_ID) REFERENCES TURBINE_GROUP (GROUP_ID),
     FOREIGN KEY (ROLE_ID) REFERENCES TURBINE_ROLE (ROLE_ID)
 );
-  
-
-# -----------------------------------------------------------------------
-# JETSPEED_USER_PROFILE
-# -----------------------------------------------------------------------
-drop table if exists JETSPEED_USER_PROFILE;
-
 CREATE TABLE JETSPEED_USER_PROFILE
 (
                             PSML_ID INTEGER NOT NULL AUTO_INCREMENT,
@@ -128,12 +97,6 @@
     PRIMARY KEY(PSML_ID),
     UNIQUE (USER_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
 );
-
-# -----------------------------------------------------------------------
-# JETSPEED_GROUP_PROFILE
-# -----------------------------------------------------------------------
-drop table if exists JETSPEED_GROUP_PROFILE;
-
 CREATE TABLE JETSPEED_GROUP_PROFILE
 (
                             PSML_ID INTEGER NOT NULL AUTO_INCREMENT,
@@ -146,12 +109,6 @@
     PRIMARY KEY(PSML_ID),
     UNIQUE (GROUP_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
 );
-
-# -----------------------------------------------------------------------
-# JETSPEED_ROLE_PROFILE
-# -----------------------------------------------------------------------
-drop table if exists JETSPEED_ROLE_PROFILE;
-
 CREATE TABLE JETSPEED_ROLE_PROFILE
 (
                             PSML_ID INTEGER NOT NULL AUTO_INCREMENT,
@@ -164,12 +121,6 @@
     PRIMARY KEY(PSML_ID),
     UNIQUE (ROLE_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
 );
- 
-
-# -----------------------------------------------------------------------
-# COFFEES
-# -----------------------------------------------------------------------
-drop table if exists COFFEES;
 
 CREATE TABLE COFFEES
 (
@@ -181,152 +132,3 @@
    TOTAL INTEGER,
    PRIMARY KEY(COFFEE_ID)
 );
-    
-
-
-#-----------------------------------------------------------------------------
-#-- EMAIL
-#-----------------------------------------------------------------------------
-drop table if exists EMAIL_INBOX;
-
-CREATE TABLE EMAIL_INBOX (
-  EMAIL_INBOX_ID integer(11) NOT NULL auto_increment,
-  MESSAGE_ID varchar(255) default NULL,
-  FILENAME varchar(255) default NULL,
-  ATTACHMENT longblob,
-  READFLAG int(11) default NULL,
-  PRIMARY KEY  (EMAIL_INBOX_ID)
-);
-
-# -----------------------------------------------------------------------
-# portlet
-# -----------------------------------------------------------------------
-drop table if exists portlet;
-
-CREATE TABLE portlet
-(
-                    ID BIGINT NOT NULL AUTO_INCREMENT,
-                    NAME VARCHAR (128) NOT NULL,
-                    HIDDEN INTEGER default 0,
-                    CLASSNAME VARCHAR (255),
-                    TYPE VARCHAR (32) NOT NULL,
-                    APPLICATION INTEGER default 0,
-                    PARENT VARCHAR (128),
-                    URL VARCHAR (255),
-                    CACHED_ON_URL INTEGER default 1,
-                    TITLE VARCHAR (128),
-                    DESCRIPTION VARCHAR (255),
-                    IMAGE VARCHAR (128),
-                    SECURITY VARCHAR (128),
-    PRIMARY KEY(ID),
-    UNIQUE (NAME)
-);
-
-# -----------------------------------------------------------------------
-# portlet_category
-# -----------------------------------------------------------------------
-drop table if exists portlet_category;
-
-CREATE TABLE portlet_category
-(
-                    ID BIGINT NOT NULL AUTO_INCREMENT,
-                    NAME VARCHAR (128) NOT NULL,
-                    GROUPE VARCHAR (128) NOT NULL,
-                    PORTLET_ID BIGINT,
-    PRIMARY KEY(ID),
-    FOREIGN KEY (PORTLET_ID) REFERENCES portlet (ID)
-        ON DELETE CASCADE 
-  
-);
-
-# -----------------------------------------------------------------------
-# portlet_parameter
-# -----------------------------------------------------------------------
-drop table if exists portlet_parameter;
-
-CREATE TABLE portlet_parameter
-(
-                    ID BIGINT NOT NULL AUTO_INCREMENT,
-                    NAME VARCHAR (128) NOT NULL,
-                    VALUE VARCHAR (255) default '0',
-                    TYPE VARCHAR (64),
-                    HIDDEN INTEGER default 0,
-                    CACHED_ON_VALUE INTEGER default 1,
-                    CACHED_ON_NAME INTEGER default 1,
-                    TITLE VARCHAR (128),
-                    DESCRIPTION VARCHAR (255),
-                    IMAGE VARCHAR (128),
-                    PORTLET_ID BIGINT,
-                    SECURITY VARCHAR (128),
-    PRIMARY KEY(ID),
-    FOREIGN KEY (PORTLET_ID) REFERENCES portlet (ID)
-        ON DELETE CASCADE 
-  
-);
-
-# -----------------------------------------------------------------------
-# portlet_mediatype
-# -----------------------------------------------------------------------
-drop table if exists portlet_mediatype;
-
-CREATE TABLE portlet_mediatype
-(
-                    ID BIGINT NOT NULL AUTO_INCREMENT,
-                    NAME VARCHAR (128) NOT NULL,
-                    PORTLET_ID BIGINT,
-    PRIMARY KEY(ID),
-    FOREIGN KEY (PORTLET_ID) REFERENCES portlet (ID)
-        ON DELETE CASCADE 
-  
-);
-
-# -----------------------------------------------------------------------
-# security_entry
-# -----------------------------------------------------------------------
-drop table if exists security_entry;
-
-CREATE TABLE security_entry
-(
-                    ID BIGINT NOT NULL AUTO_INCREMENT,
-                    NAME VARCHAR (128) NOT NULL,
-                    TITLE VARCHAR (128),
-                    DESCRIPTION VARCHAR (255),
-    PRIMARY KEY(ID),
-    UNIQUE (NAME)
-);
-
-# -----------------------------------------------------------------------
-# security_access
-# -----------------------------------------------------------------------
-drop table if exists security_access;
-
-CREATE TABLE security_access
-(
-                    ID BIGINT NOT NULL AUTO_INCREMENT,
-                    ACTION VARCHAR (32) NOT NULL,
-                    ENTRY_ID BIGINT,
-    PRIMARY KEY(ID),
-    FOREIGN KEY (ENTRY_ID) REFERENCES security_entry (ID)
-        ON DELETE CASCADE 
-  
-);
-
-# -----------------------------------------------------------------------
-# security_allow
-# -----------------------------------------------------------------------
-drop table if exists security_allow;
-
-CREATE TABLE security_allow
-(
-                    ID BIGINT NOT NULL AUTO_INCREMENT,
-                    ALLOW_TYPE VARCHAR (32) NOT NULL,
-                    ALLOW_VALUE VARCHAR (32) NOT NULL,
-                    ALLOW_GROUP VARCHAR (32),
-                    ACCESS_ID BIGINT,
-    PRIMARY KEY(ID),
-    FOREIGN KEY (ACCESS_ID) REFERENCES security_access (ID)
-        ON DELETE CASCADE 
-  
-);
-  
-  

Modified: portals/jetspeed-1/trunk/src/sql/external/turbine-postgres.sql
URL: http://svn.apache.org/viewvc/portals/jetspeed-1/trunk/src/sql/external/turbine-postgres.sql?view=diff&rev=497236&r1=497235&r2=497236
==============================================================================
--- portals/jetspeed-1/trunk/src/sql/external/turbine-postgres.sql (original)
+++ portals/jetspeed-1/trunk/src/sql/external/turbine-postgres.sql Wed Jan 17 15:15:05 2007
@@ -13,19 +13,39 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 -----------------------------------------------------------------------------
-    
+drop table TURBINE_ROLE_PERMISSION CASCADE;
+drop table TURBINE_PERMISSION CASCADE;
+drop table TURBINE_USER_GROUP_ROLE CASCADE;
+drop table TURBINE_ROLE CASCADE;
+drop table TURBINE_GROUP CASCADE;
+drop table TURBINE_USER CASCADE;
+drop table TURBINE_SCHEDULED_JOB CASCADE;
+drop table ID_TABLE CASCADE;
+DROP TABLE COFFEES CASCADE;
+DROP TABLE EMAIL_INBOX CASCADE;
+DROP TABLE JETSPEED_ROLE_PROFILE;
+DROP TABLE JETSPEED_GROUP_PROFILE;
+DROP TABLE JETSPEED_USER_PROFILE;
+
+drop sequence TURBINE_PERMISSION_SEQ;
+drop sequence TURBINE_ROLE_SEQ;
+drop sequence TURBINE_GROUP_SEQ;    
+drop sequence TURBINE_USER_SEQ;
+drop sequence COFFEES_SEQ;
+drop sequence EMAIL_INBOX_SEQ;
+drop sequence JETSPEED_ROLE_PROFILE_SEQ;
+drop sequence JETSPEED_GROUP_PROFILE_SEQ;
+drop sequence JETSPEED_USER_PROFILE_SEQ;
+
 -----------------------------------------------------------------------------
 -- TURBINE_PERMISSION
 -----------------------------------------------------------------------------
-drop table TURBINE_PERMISSION;
-drop sequence TURBINE_PERMI_PERMISSION_ID_SEQ;
-
+CREATE SEQUENCE TURBINE_PERMISSION_SEQ START WITH 10;
 CREATE TABLE TURBINE_PERMISSION
 (
-    PERMISSION_ID serial,
+    PERMISSION_ID integer primary key default nextval('TURBINE_PERMISSION_SEQ'),
     PERMISSION_NAME varchar (99) NOT NULL,
-    OBJECTDATA oid,
-    PRIMARY KEY(PERMISSION_ID),
+    OBJECTDATA BYTEA,
     UNIQUE (PERMISSION_NAME)
 );
 
@@ -33,15 +53,12 @@
 -----------------------------------------------------------------------------
 -- TURBINE_ROLE
 -----------------------------------------------------------------------------
-drop table TURBINE_ROLE;
-drop sequence TURBINE_ROLE_ROLE_ID_SEQ;
-
+CREATE SEQUENCE TURBINE_ROLE_SEQ START WITH 10;
 CREATE TABLE TURBINE_ROLE
 (
-    ROLE_ID serial,
+    ROLE_ID integer primary key default nextval('TURBINE_ROLE_SEQ'),
     ROLE_NAME varchar (99) NOT NULL,
-    OBJECTDATA oid,
-    PRIMARY KEY(ROLE_ID),
+    OBJECTDATA BYTEA,
     UNIQUE (ROLE_NAME)
 );
 
@@ -49,15 +66,12 @@
 -----------------------------------------------------------------------------
 -- TURBINE_GROUP
 -----------------------------------------------------------------------------
-drop table TURBINE_GROUP;
-drop sequence TURBINE_GROUP_GROUP_ID_SEQ;
-
+CREATE SEQUENCE TURBINE_GROUP_SEQ START WITH 10;
 CREATE TABLE TURBINE_GROUP
 (
-    GROUP_ID serial,
+    GROUP_ID integer primary key default nextval('TURBINE_GROUP_SEQ'),
     GROUP_NAME varchar (99) NOT NULL,
-    OBJECTDATA oid,
-    PRIMARY KEY(GROUP_ID),
+    OBJECTDATA BYTEA,
     UNIQUE (GROUP_NAME)
 );
 
@@ -65,8 +79,6 @@
 -----------------------------------------------------------------------------
 -- TURBINE_ROLE_PERMISSION
 -----------------------------------------------------------------------------
-drop table TURBINE_ROLE_PERMISSION;
-
 CREATE TABLE TURBINE_ROLE_PERMISSION
 (
     ROLE_ID integer NOT NULL,
@@ -81,11 +93,10 @@
 -----------------------------------------------------------------------------
 -- TURBINE_USER
 -----------------------------------------------------------------------------
-drop table TURBINE_USER;
-
+CREATE SEQUENCE TURBINE_USER_SEQ START WITH 10;
 CREATE TABLE TURBINE_USER
 (
-    USER_ID integer NOT NULL,
+    USER_ID integer primary key default nextval('TURBINE_USER_SEQ'),
     LOGIN_NAME varchar (32) NOT NULL,
     PASSWORD_VALUE varchar (32) NOT NULL,
     FIRST_NAME varchar (99) NOT NULL,
@@ -96,17 +107,14 @@
     CREATED timestamp,
     LAST_LOGIN timestamp,
     DISABLED VARCHAR(1),
-    OBJECTDATA oid,
-    PRIMARY KEY(USER_ID),
+    OBJECTDATA BYTEA,
+    PASSWORD_CHANGED timestamp,    
     UNIQUE (LOGIN_NAME)
 );
-
    
 -----------------------------------------------------------------------------
 -- TURBINE_USER_GROUP_ROLE
 -----------------------------------------------------------------------------
-drop table TURBINE_USER_GROUP_ROLE;
-
 CREATE TABLE TURBINE_USER_GROUP_ROLE
 (
     USER_ID integer NOT NULL,
@@ -123,8 +131,6 @@
 -----------------------------------------------------------------------------
 -- TURBINE_SCHEDULED_JOB
 -----------------------------------------------------------------------------
-drop table TURBINE_SCHEDULED_JOB;
-
 CREATE TABLE TURBINE_SCHEDULED_JOB
 (
     JOB_ID integer NOT NULL,
@@ -135,16 +141,13 @@
     DAY_OF_MONTH integer default -1 NOT NULL,
     TASK varchar (99) NOT NULL,
     EMAIL varchar (99),
-    PROPERTY oid,
+    PROPERTY BYTEA,
     PRIMARY KEY(JOB_ID)
 );
 
 -----------------------------------------------------------------------------
 -- ID_TABLE
 -----------------------------------------------------------------------------
-
-drop table ID_TABLE;
-
 CREATE TABLE ID_TABLE
 (
     ID_TABLE_ID integer NOT NULL,
@@ -158,35 +161,74 @@
 -----------------------------------------------------------------------------
 -- COFFEES
 -----------------------------------------------------------------------------
-DROP TABLE COFFEES;
-DROP SEQUENCE COFFEES_SEQ;
-
-CREATE SEQUENCE COFFEES_SEQ;
-
+CREATE SEQUENCE COFFEES_SEQ START WITH 20;
 CREATE TABLE COFFEES
 (
-    COFFEE_ID serial,
+    COFFEE_ID integer primary key default nextval('COFFEES_SEQ'),
     COFFEE_NAME varchar (50),
     SUPPLIER_ID integer,
     PRICE float,
     SALES integer,
-    TOTAL integer,
-    PRIMARY KEY (COFFEE_ID)
+    TOTAL integer
 );
 
 -----------------------------------------------------------------------------
 -- EMAIL
 -----------------------------------------------------------------------------
-DROP TABLE EMAIL_INBOX;
-DROP SEQUENCE EMAIL_INBOX_SEQ;
-
+CREATE SEQUENCE EMAIL_INBOX_SEQ START WITH 10;
 CREATE TABLE EMAIL_INBOX (
-  EMAIL_INBOX_ID integer(11) NOT NULL auto_increment,
+  EMAIL_INBOX_ID integer primary key default nextval('EMAIL_INBOX_SEQ'),
   MESSAGE_ID varchar(255) default NULL,
   FILENAME varchar(255) default NULL,
   ATTACHMENT BYTEA,
-  READFLAG int(11) default NULL,
-  PRIMARY KEY  (EMAIL_INBOX_ID)
+  READFLAG integer default NULL
+);
+
+-----------------------------------------------------------------------------
+-- JETSPEED_USER_PROFILE
+-----------------------------------------------------------------------------
+CREATE SEQUENCE JETSPEED_USER_PROFILE_SEQ;
+CREATE TABLE JETSPEED_USER_PROFILE
+(
+    PSML_ID integer primary key default nextval('JETSPEED_USER_PROFILE_SEQ'),
+    USER_NAME VARCHAR (32) NOT NULL,
+    MEDIA_TYPE VARCHAR (99),
+    LANGUAGE VARCHAR (2),
+    COUNTRY VARCHAR (2),
+    PAGE VARCHAR (99),
+    PROFILE BYTEA,
+    UNIQUE (USER_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
 );
 
+-----------------------------------------------------------------------------
+-- JETSPEED_GROUP_PROFILE
+-----------------------------------------------------------------------------
+CREATE SEQUENCE JETSPEED_GROUP_PROFILE_SEQ;
+CREATE TABLE JETSPEED_GROUP_PROFILE
+(
+    PSML_ID integer primary key default nextval('JETSPEED_GROUP_PROFILE_SEQ'),
+    GROUP_NAME VARCHAR (99) NOT NULL,
+    MEDIA_TYPE VARCHAR (99),
+    LANGUAGE VARCHAR (2),
+    COUNTRY VARCHAR (2),
+    PAGE VARCHAR (99),
+    PROFILE BYTEA,
+    UNIQUE (GROUP_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
+);
+
+-----------------------------------------------------------------------------
+-- JETSPEED_ROLE_PROFILE
+-----------------------------------------------------------------------------
+CREATE SEQUENCE JETSPEED_ROLE_PROFILE_SEQ;
+CREATE TABLE JETSPEED_ROLE_PROFILE
+(
+    PSML_ID integer primary key default nextval('JETSPEED_ROLE_PROFILE_SEQ'),
+    ROLE_NAME VARCHAR (99) NOT NULL,
+    MEDIA_TYPE VARCHAR (99),
+    LANGUAGE VARCHAR (2),
+    COUNTRY VARCHAR (2),
+    PAGE VARCHAR (99),
+    PROFILE BYTEA,
+    UNIQUE (ROLE_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
+);
 



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