-- /**************************************************************************** -- * -- * MySQL Script for civicrm database/tables - upgradation from 2.1.1 -> 2.1.2 -- * -- *****************************************************************************/ -- fix constraint ALTER TABLE `civicrm_group_nesting` DROP FOREIGN KEY `FK_civicrm_group_nesting_child_group_id`; ALTER TABLE `civicrm_group_nesting` ADD CONSTRAINT `FK_civicrm_group_nesting_child_group_id` FOREIGN KEY (`child_group_id`) REFERENCES `civicrm_group` (`id`) ON DELETE CASCADE; -- CRM-3749 UPDATE civicrm_uf_field SET field_type = 'Contact' WHERE field_name IN ('address_name','city','contact_sub_type','contact_type','country','custom_greeting','display_name','do_not_email','do_not_mail','do_not_phone','do_not_trade','email','external_identifier','geo_code_1','geo_code_2','group','im','image_URL','id','nick_name','is_opt_out','on_hold','openid','phone','postal_code','postal_code_suffix','preferred_communication_method','preferred_mail_format','sort_name','contact_source','state_province','street_address','supplemental_address_1','supplemental_address_2','tag','user_unique_id','is_bulkmail','world_region'); -- civicrm_note constraint fix ALTER TABLE civicrm_note DROP FOREIGN KEY `FK_civicrm_note_contact_id`; ALTER TABLE `civicrm_note` ADD CONSTRAINT `FK_civicrm_note_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL;