Permalink
Browse files

- Disable FOREIGN_KEY_CHECKS for update from 0.7

  • Loading branch information...
1 parent b98e719 commit 323f15b289c1354750baaec940293f8165884c5d @alecpl alecpl committed Jan 11, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 SQL/mysql.update.sql
@@ -219,6 +219,8 @@ ALTER TABLE `session` CHANGE `sess_id` `sess_id` varchar(128) NOT NULL;
-- Updates from version 0.7
+/*!40014 SET FOREIGN_KEY_CHECKS=0 */;
+
ALTER TABLE `contacts` DROP FOREIGN KEY `user_id_fk_contacts`;
ALTER TABLE `contacts` DROP INDEX `user_contacts_index`;
ALTER TABLE `contacts` MODIFY `email` text NOT NULL DEFAULT '';
@@ -235,3 +237,5 @@ ALTER TABLE `contactgroups` ALTER `user_id` DROP DEFAULT;
ALTER TABLE `contactgroupmembers` ALTER `contact_id` DROP DEFAULT;
ALTER TABLE `identities` ALTER `user_id` DROP DEFAULT;
ALTER TABLE `searches` ALTER `user_id` DROP DEFAULT;
+
+/*!40014 SET FOREIGN_KEY_CHECKS=1 */;

0 comments on commit 323f15b

Please sign in to comment.