Skip to content

Commit

Permalink
SQL Upgrade for CRM-19464
Browse files Browse the repository at this point in the history
  • Loading branch information
aydun committed Mar 8, 2017
1 parent 9c87c3a commit 90149d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CRM/Upgrade/Incremental/sql/4.7.18.mysql.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,11 @@ INSERT IGNORE INTO civicrm_state_province (country_id, abbreviation, name) VALUE
(@country_id, "46", "Wajir"),
(@country_id, "47", "West Pokot");

-- CRM-19464 renumber address options to add in 'Supplemental Address 3'
SELECT @option_group_id_adOpt := max(id) from civicrm_option_group where name = 'address_options';
UPDATE civicrm_option_value SET value = value + 1, weight = weight + 1 WHERE option_group_id = @option_group_id_adOpt AND value > 3;
INSERT INTO
`civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`, `icon`)
VALUES
(@option_group_id_adOpt, '{ts escape="sql"}Supplemental Address 3{/ts}', 4, 'supplemental_address_3', NULL, 0, NULL, 4, NULL, 0, 0, 1, NULL, NULL, NULL);

0 comments on commit 90149d8

Please sign in to comment.