Merge pull request #4054 from eileenmcnaughton/CRM-15237
[civicrm-core.git] / CRM / Upgrade / Incremental / sql / 3.2.4.mysql.tpl
1 -- CRM-5461
2 SELECT @option_group_id_act := MAX(id) from civicrm_option_group where name = 'activity_type';
3 SELECT @activity_type_max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_act;
4 SELECT @activity_type_max_wt := MAX(ROUND(val.weight)) FROM civicrm_option_value val where val.option_group_id = @option_group_id_act;
5
6 UPDATE civicrm_option_value val
7 SET val.value = @activity_type_max_val+1,
8 val.weight = @activity_type_max_wt+1
9 WHERE val.option_group_id = @option_group_id_act
10 AND val.name = 'Print PDF Letter';
11