portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r499108 - /portals/jetspeed-1/trunk/src/sql/external/turbine-mysql.sql
Date Tue, 23 Jan 2007 19:38:38 GMT
Author: taylor
Date: Tue Jan 23 11:38:35 2007
New Revision: 499108

URL: http://svn.apache.org/viewvc?view=rev&rev=499108
Log:
missing delete cascade constraints

Modified:
    portals/jetspeed-1/trunk/src/sql/external/turbine-mysql.sql

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=499108&r1=499107&r2=499108
==============================================================================
--- portals/jetspeed-1/trunk/src/sql/external/turbine-mysql.sql (original)
+++ portals/jetspeed-1/trunk/src/sql/external/turbine-mysql.sql Tue Jan 23 11:38:35 2007
@@ -27,97 +27,97 @@
 
 CREATE TABLE TURBINE_USER
 (
-                            USER_ID INTEGER NOT NULL AUTO_INCREMENT,
-                    LOGIN_NAME VARCHAR (32) NOT NULL,
-                    PASSWORD_VALUE VARCHAR (32) NOT NULL,
-                    FIRST_NAME VARCHAR (99) NOT NULL,
-                    LAST_NAME VARCHAR (99) NOT NULL,
-                    EMAIL VARCHAR (99),
-                    CONFIRM_VALUE VARCHAR (99),
-                    MODIFIED TIMESTAMP,
-                    CREATED TIMESTAMP,
-                    LAST_LOGIN TIMESTAMP,
-                    DISABLED CHAR (1),
-                    OBJECTDATA BLOB,
-                    PASSWORD_CHANGED TIMESTAMP,
+    USER_ID INTEGER NOT NULL AUTO_INCREMENT,
+    LOGIN_NAME VARCHAR (32) NOT NULL,
+    PASSWORD_VALUE VARCHAR (32) NOT NULL,
+    FIRST_NAME VARCHAR (99) NOT NULL,
+    LAST_NAME VARCHAR (99) NOT NULL,
+    EMAIL VARCHAR (99),
+    CONFIRM_VALUE VARCHAR (99),
+    MODIFIED TIMESTAMP,
+    CREATED TIMESTAMP,
+    LAST_LOGIN TIMESTAMP,
+    DISABLED CHAR (1),
+    OBJECTDATA BLOB,
+    PASSWORD_CHANGED TIMESTAMP,
     PRIMARY KEY(USER_ID),
     UNIQUE (LOGIN_NAME)
 );
 CREATE TABLE TURBINE_ROLE
 (
-                            ROLE_ID INTEGER NOT NULL AUTO_INCREMENT,
-                    ROLE_NAME VARCHAR (99) NOT NULL,
-                    OBJECTDATA BLOB,
+    ROLE_ID INTEGER NOT NULL AUTO_INCREMENT,
+    ROLE_NAME VARCHAR (99) NOT NULL,
+    OBJECTDATA BLOB,
     PRIMARY KEY(ROLE_ID),
     UNIQUE (ROLE_NAME)
 );
 CREATE TABLE TURBINE_GROUP
 (
-                            GROUP_ID INTEGER NOT NULL AUTO_INCREMENT,
-                    GROUP_NAME VARCHAR (99) NOT NULL,
-                    OBJECTDATA BLOB,
+    GROUP_ID INTEGER NOT NULL AUTO_INCREMENT,
+    GROUP_NAME VARCHAR (99) NOT NULL,
+    OBJECTDATA BLOB,
     PRIMARY KEY(GROUP_ID),
     UNIQUE (GROUP_NAME)
 );
 CREATE TABLE TURBINE_PERMISSION
 (
-                            PERMISSION_ID INTEGER NOT NULL AUTO_INCREMENT,
-                    PERMISSION_NAME VARCHAR (99) NOT NULL,
-                    OBJECTDATA BLOB,
+    PERMISSION_ID INTEGER NOT NULL AUTO_INCREMENT,
+    PERMISSION_NAME VARCHAR (99) NOT NULL,
+    OBJECTDATA BLOB,
     PRIMARY KEY(PERMISSION_ID),
     UNIQUE (PERMISSION_NAME)
 );
 CREATE TABLE TURBINE_ROLE_PERMISSION
 (
-        ROLE_ID INTEGER NOT NULL,
-        PERMISSION_ID INTEGER NOT NULL,
+    ROLE_ID INTEGER NOT NULL,
+    PERMISSION_ID INTEGER NOT NULL,
     PRIMARY KEY(ROLE_ID,PERMISSION_ID),
-    FOREIGN KEY (ROLE_ID) REFERENCES TURBINE_ROLE (ROLE_ID),
-    FOREIGN KEY (PERMISSION_ID) REFERENCES TURBINE_PERMISSION (PERMISSION_ID)
+    FOREIGN KEY (ROLE_ID) REFERENCES TURBINE_ROLE (ROLE_ID) ON DELETE CASCADE,
+    FOREIGN KEY (PERMISSION_ID) REFERENCES TURBINE_PERMISSION (PERMISSION_ID) ON DELETE CASCADE

 );
 CREATE TABLE TURBINE_USER_GROUP_ROLE
 (
-        USER_ID INTEGER NOT NULL,
-        GROUP_ID INTEGER NOT NULL,
-        ROLE_ID INTEGER NOT NULL,
+    USER_ID INTEGER NOT NULL,
+    GROUP_ID INTEGER NOT NULL,
+    ROLE_ID INTEGER NOT NULL,
     PRIMARY KEY(USER_ID,GROUP_ID,ROLE_ID),
-    FOREIGN KEY (USER_ID) REFERENCES TURBINE_USER (USER_ID),
-    FOREIGN KEY (GROUP_ID) REFERENCES TURBINE_GROUP (GROUP_ID),
-    FOREIGN KEY (ROLE_ID) REFERENCES TURBINE_ROLE (ROLE_ID)
+    FOREIGN KEY (USER_ID) REFERENCES TURBINE_USER (USER_ID) ON DELETE CASCADE ,
+    FOREIGN KEY (GROUP_ID) REFERENCES TURBINE_GROUP (GROUP_ID) ON DELETE CASCADE ,
+    FOREIGN KEY (ROLE_ID) REFERENCES TURBINE_ROLE (ROLE_ID) ON DELETE CASCADE 
 );
 CREATE TABLE JETSPEED_USER_PROFILE
 (
-                            PSML_ID INTEGER NOT NULL AUTO_INCREMENT,
-                    USER_NAME VARCHAR (32) NOT NULL,
-                    MEDIA_TYPE VARCHAR (99),
-                    LANGUAGE VARCHAR (2),
-                    COUNTRY VARCHAR (2),
-                    PAGE VARCHAR (99),
-                    PROFILE BLOB,
+    PSML_ID INTEGER NOT NULL AUTO_INCREMENT,
+    USER_NAME VARCHAR (32) NOT NULL,
+    MEDIA_TYPE VARCHAR (99),
+    LANGUAGE VARCHAR (2),
+    COUNTRY VARCHAR (2),
+    PAGE VARCHAR (99),
+    PROFILE BLOB,
     PRIMARY KEY(PSML_ID),
     UNIQUE (USER_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
 );
 CREATE TABLE JETSPEED_GROUP_PROFILE
 (
-                            PSML_ID INTEGER NOT NULL AUTO_INCREMENT,
-                    GROUP_NAME VARCHAR (99) NOT NULL,
-                    MEDIA_TYPE VARCHAR (99),
-                    LANGUAGE VARCHAR (2),
-                    COUNTRY VARCHAR (2),
-                    PAGE VARCHAR (99),
-                    PROFILE BLOB,
+    PSML_ID INTEGER NOT NULL AUTO_INCREMENT,
+    GROUP_NAME VARCHAR (99) NOT NULL,
+    MEDIA_TYPE VARCHAR (99),
+    LANGUAGE VARCHAR (2),
+    COUNTRY VARCHAR (2),
+    PAGE VARCHAR (99),
+    PROFILE BLOB,
     PRIMARY KEY(PSML_ID),
     UNIQUE (GROUP_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
 );
 CREATE TABLE JETSPEED_ROLE_PROFILE
 (
-                            PSML_ID INTEGER NOT NULL AUTO_INCREMENT,
-                    ROLE_NAME VARCHAR (99) NOT NULL,
-                    MEDIA_TYPE VARCHAR (99),
-                    LANGUAGE VARCHAR (2),
-                    COUNTRY VARCHAR (2),
-                    PAGE VARCHAR (99),
-                    PROFILE BLOB,
+    PSML_ID INTEGER NOT NULL AUTO_INCREMENT,
+    ROLE_NAME VARCHAR (99) NOT NULL,
+    MEDIA_TYPE VARCHAR (99),
+    LANGUAGE VARCHAR (2),
+    COUNTRY VARCHAR (2),
+    PAGE VARCHAR (99),
+    PROFILE BLOB,
     PRIMARY KEY(PSML_ID),
     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