From 306d05168c2a9c7ed9b3dd44b5fc0e5f458f240f Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Mon, 20 May 2013 21:53:04 -0400 Subject: [PATCH] CRM-12466, upgrade related fixes --- CRM/Upgrade/Incremental/sql/4.3.4.mysql.tpl | 25 ++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/CRM/Upgrade/Incremental/sql/4.3.4.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.3.4.mysql.tpl index ea0b70fa50..4f1ee85ff3 100644 --- a/CRM/Upgrade/Incremental/sql/4.3.4.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.3.4.mysql.tpl @@ -1 +1,24 @@ -{* placeholder file for upgrade*} +{* file to handle db changes in 4.3.4 during upgrade*} + +-- CRM-12466 +INSERT INTO +civicrm_option_group (name, {localize field='title'}title{/localize}, is_reserved, is_active) +VALUES +('contact_smart_group_display', {localize}'{ts escape="sql"}Contact Smart Group View Options{/ts}'{/localize}, 1, 1); + +SELECT @option_group_id_csgOpt := max(id) FROM civicrm_option_group WHERE name = 'contact_smart_group_display'; + +INSERT INTO +civicrm_option_value (option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, +is_default, weight) +VALUES +(@option_group_id_csgOpt, {localize}'Show Smart Groups on Demand'{/localize}, 1, 'showondemand', NULL, 0, 0, 1), +(@option_group_id_csgOpt, {localize}'Always Show Smart Groups'{/localize}, 2, 'alwaysshow', NULL, 0, 0, 2), +(@option_group_id_csgOpt, {localize}'Hide Smart Groups'{/localize}, 3, 'hide' , NULL, 0, 0, 3); + + +INSERT INTO civicrm_setting +(domain_id, contact_id, is_domain, group_name, name, value) +VALUES +({$domainID}, NULL, 1, 'CiviCRM Preferences', 'contact_smart_group_display', '{serialize}1{/serialize}'); + -- 2.25.1