Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | -- /**************************************************************************** |
2 | -- * | |
3 | -- * MySQL Script for civicrm database/tables - upgradation from 2.1.1 -> 2.1.2 | |
4 | -- * | |
5 | -- *****************************************************************************/ | |
6 | -- fix constraint | |
10824d34 | 7 | ALTER TABLE `civicrm_group_nesting` |
6a488035 | 8 | DROP FOREIGN KEY `FK_civicrm_group_nesting_child_group_id`; |
10824d34 | 9 | ALTER TABLE `civicrm_group_nesting` |
6a488035 TO |
10 | ADD CONSTRAINT `FK_civicrm_group_nesting_child_group_id` FOREIGN KEY (`child_group_id`) REFERENCES `civicrm_group` (`id`) ON DELETE CASCADE; |
11 | ||
12 | -- CRM-3749 | |
10824d34 | 13 | UPDATE civicrm_uf_field SET field_type = 'Contact' |
6a488035 TO |
14 | 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'); |
15 | ||
16 | -- civicrm_note constraint fix | |
10824d34 | 17 | ALTER TABLE civicrm_note |
6a488035 TO |
18 | DROP FOREIGN KEY `FK_civicrm_note_contact_id`; |
19 | ALTER TABLE `civicrm_note` | |
20 | ADD CONSTRAINT `FK_civicrm_note_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL; |