[vhffs-dev] [1645] Added ON DELETE SET NULL to vhffs_history user foreign key to allow user deletion even if he made something sometime .

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1645
Author:   beuss
Date:     2011-01-19 18:44:29 +0100 (Wed, 19 Jan 2011)
Log Message:
-----------
Added ON DELETE SET NULL to vhffs_history user foreign key to allow user deletion even if he made something sometime.

Modified Paths:
--------------
    trunk/vhffs-backend/src/pgsql/initdb.sql.in

Modified: trunk/vhffs-backend/src/pgsql/initdb.sql.in
===================================================================
--- trunk/vhffs-backend/src/pgsql/initdb.sql.in	2010-12-12 17:21:21 UTC (rev 1644)
+++ trunk/vhffs-backend/src/pgsql/initdb.sql.in	2011-01-19 17:44:29 UTC (rev 1645)
@@ -650,7 +650,7 @@
 
 ALTER TABLE vhffs_history ADD CONSTRAINT fk_vhffs_history_vhffs_object FOREIGN KEY (object_id) REFERENCES vhffs_object(object_id) ON DELETE CASCADE;
 
-ALTER TABLE vhffs_history ADD CONSTRAINT fk_vhffs_history_vhffs_users FOREIGN KEY (source_uid) REFERENCES vhffs_users(uid);
+ALTER TABLE vhffs_history ADD CONSTRAINT fk_vhffs_history_vhffs_users FOREIGN KEY (source_uid) REFERENCES vhffs_users(uid) ON DELETE SET NULL;
 
 ALTER TABLE vhffs_httpd ADD CONSTRAINT fk_vhffs_httpd_vhffs_object FOREIGN KEY (object_id) REFERENCES vhffs_object(object_id) ON DELETE CASCADE;
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/