Don't abort if state_province already exists when upgrading
authorMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Fri, 1 Mar 2019 19:39:33 +0000 (19:39 +0000)
committerMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Fri, 1 Mar 2019 19:39:33 +0000 (19:39 +0000)
CRM/Upgrade/Incremental/sql/4.7.30.mysql.tpl
CRM/Upgrade/Incremental/sql/4.7.32.mysql.tpl

index bd097d6381316dfd862bcb69387d1cff0cad09eb..e9a748170c58a781fa52a0081ad783daba8b8a59 100644 (file)
@@ -12,5 +12,5 @@ INSERT INTO civicrm_mailing_bounce_pattern (bounce_type_id, pattern) VALUES (@bo
 
 -- CRM-21532 Add French state/departments
 SELECT @country_id := id from civicrm_country where name = 'France' AND iso_code = 'FR';
-INSERT INTO `civicrm_state_province` (`id`, `country_id`, `abbreviation`, `name`) VALUES
+INSERT IGNORE INTO `civicrm_state_province` (`id`, `country_id`, `abbreviation`, `name`) VALUES
 (NULL, @country_id, "52", "Haute-Marne");
\ No newline at end of file
index 08267008b5ba5e26dee55564dd991f318e85db57..b542246f427e7b44b42756e47b39a97292084c83 100644 (file)
@@ -2,7 +2,7 @@
 
 -- CRM-21837 - Missing states for Gabon
 SELECT @country_id := id from civicrm_country where name = 'Gabon' AND iso_code = 'GA';
-INSERT INTO `civicrm_state_province` (`id`, `country_id`, `abbreviation`, `name`) VALUES
+INSERT IGNORE INTO `civicrm_state_province` (`id`, `country_id`, `abbreviation`, `name`) VALUES
 (NULL, @country_id, "01", "Estuaire"),
 (NULL, @country_id, "02", "Haut-OgoouĂ©"),
 (NULL, @country_id, "03", "Moyen-OgoouĂ©"),