summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-06-14 18:56:52 +0000
committeralecpl <alec@alec.pl>2010-06-14 18:56:52 +0000
commit1aaeaaaaa65e8191923dec8448cbc42fefa52be0 (patch)
treec9d9f5ec3f77d8f70e002e71434d8c981df6788b
parent8062c0426dc442860f2c3ba1520f75685af455fa (diff)
- fix foreign keys defs unintentionally broken in r3333
-rw-r--r--SQL/mysql.update.sql8
1 files changed, 4 insertions, 4 deletions
diff --git a/SQL/mysql.update.sql b/SQL/mysql.update.sql
index 49811c1e9..fa9a016a8 100644
--- a/SQL/mysql.update.sql
+++ b/SQL/mysql.update.sql
@@ -69,13 +69,13 @@ ALTER TABLE `contacts` DROP FOREIGN KEY `user_id_fk_contacts`;
ALTER TABLE `identities` DROP FOREIGN KEY `user_id_fk_identities`;
ALTER TABLE `messages` ADD CONSTRAINT `user_id_fk_messages` FOREIGN KEY (`user_id`)
- REFERENCES `users`(`user_id`);
+ REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `cache` ADD CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`)
- REFERENCES `users`(`user_id`);
+ REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `contacts` ADD CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`)
- REFERENCES `users`(`user_id`);
+ REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `identities` ADD CONSTRAINT `user_id_fk_identities` FOREIGN KEY (`user_id`)
- REFERENCES `users`(`user_id`);
+ REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `contacts` ALTER `name` SET DEFAULT '';
ALTER TABLE `contacts` ALTER `firstname` SET DEFAULT '';