roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r500413 - in /incubator/roller/trunk/metadata/database: 310-to-320-migration.vm createdb.vm
Date Fri, 26 Jan 2007 23:43:24 GMT
Author: agilliland
Date: Fri Jan 26 15:43:22 2007
New Revision: 500413

URL: http://svn.apache.org/viewvc?view=rev&rev=500413
Log:
roller_user_permissions table should have foreign key constraints against rolleruser(id) and
website(id).


Modified:
    incubator/roller/trunk/metadata/database/310-to-320-migration.vm
    incubator/roller/trunk/metadata/database/createdb.vm

Modified: incubator/roller/trunk/metadata/database/310-to-320-migration.vm
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/metadata/database/310-to-320-migration.vm?view=diff&rev=500413&r1=500412&r2=500413
==============================================================================
--- incubator/roller/trunk/metadata/database/310-to-320-migration.vm (original)
+++ incubator/roller/trunk/metadata/database/310-to-320-migration.vm Fri Jan 26 15:43:22 2007
@@ -44,3 +44,10 @@
 create index we_combo1_idx on weblogentry(status, pubtime, websiteid);
 create index we_combo2_idx on weblogentry(websiteid, pubtime, status);
 create index rc_combo1_idx on roller_comment(approved, spam, posttime);
+
+-- some missing foreign key constraints
+alter table roller_user_permissions add constraint up_userid_fk
+    foreign key ( user_id ) references rolleruser( id ) $!ADDL_FK_PARAMS ;
+
+alter table roller_user_permissions add constraint up_websiteid_fk
+    foreign key ( website_id ) references website( id ) $!ADDL_FK_PARAMS ;

Modified: incubator/roller/trunk/metadata/database/createdb.vm
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/metadata/database/createdb.vm?view=diff&rev=500413&r1=500412&r2=500413
==============================================================================
--- incubator/roller/trunk/metadata/database/createdb.vm (original)
+++ incubator/roller/trunk/metadata/database/createdb.vm Fri Jan 26 15:43:22 2007
@@ -489,13 +489,19 @@
 -- *****************************************************
 -- Now add the foreign key relationships
 
--- user, role and website
+-- user, role, website, and permissions
 
 alter table website add constraint ws_userid_fk
     foreign key ( userid ) references rolleruser ( id ) $!ADDL_FK_PARAMS ;
 
 alter table userrole add constraint ur_userid_fk
     foreign key ( userid ) references rolleruser( id ) $!ADDL_FK_PARAMS ;
+
+alter table roller_user_permissions add constraint up_userid_fk
+    foreign key ( user_id ) references rolleruser( id ) $!ADDL_FK_PARAMS ;
+
+alter table roller_user_permissions add constraint up_websiteid_fk
+    foreign key ( website_id ) references website( id ) $!ADDL_FK_PARAMS ;
 
 -- page, entry, category, comment
 



Mime
View raw message