[vhffs-dev] [1646] Added compat for vhffs_history set null foreign key constraint

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


Revision: 1646
Author:   beuss
Date:     2011-01-19 18:53:39 +0100 (Wed, 19 Jan 2011)
Log Message:
-----------
Added compat for vhffs_history set null foreign key constraint

Modified Paths:
--------------
    trunk/vhffs-compat/from-4.2-to-4.3.sql

Modified: trunk/vhffs-compat/from-4.2-to-4.3.sql
===================================================================
--- trunk/vhffs-compat/from-4.2-to-4.3.sql	2011-01-19 17:44:29 UTC (rev 1645)
+++ trunk/vhffs-compat/from-4.2-to-4.3.sql	2011-01-19 17:53:39 UTC (rev 1646)
@@ -40,3 +40,8 @@
 CREATE INDEX idx_vhffs_bazaar_public ON vhffs_bazaar(public);
 CREATE INDEX idx_vhffs_bazaar_object_id ON vhffs_bazaar(object_id);
 ALTER TABLE vhffs_bazaar ADD CONSTRAINT fk_vhffs_bazaar_vhffs_object FOREIGN KEY (object_id) REFERENCES vhffs_object(object_id) ON DELETE CASCADE;
+
+ALTER TABLE vhffs_history ADD CONSTRAINT fk_vhffs_history_vhffs_users2 FOREIGN KEY (source_uid) REFERENCES vhffs_users(uid) ON DELETE SET NULL;
+ALTER TABLE vhffs_history DROP CONSTRAINT fk_vhffs_history_vhffs_users;
+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_history DROP CONSTRAINT fk_vhffs_history_vhffs_users2;


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