Merge pull request #4054 from eileenmcnaughton/CRM-15237
[civicrm-core.git] / CRM / Upgrade / Incremental / sql / 3.0.4.mysql.tpl
1 -- CRM-5636
2 {if $addDeceasedStatus}
3 SELECT @maxWeight := MAX(ROUND(weight)) FROM civicrm_membership_status;
4 {if $multilingual}
5 INSERT INTO civicrm_membership_status
6 ( {foreach from=$locales item=locale}name_{$locale}, {/foreach} is_current_member, is_admin, is_active, is_reserved, weight, is_default )
7 VALUES
8 ( {foreach from=$locales item=locale}'Deceased',{/foreach} 0, 1, 1, 1, (SELECT @maxWeight := @maxWeight + 1), 0 );
9 {else}
10 INSERT INTO civicrm_membership_status
11 ( name, is_current_member, is_admin, is_active, is_reserved, weight, is_default )
12 VALUES
13 ( 'Deceased', 0, 1, 1, 1, (SELECT @maxWeight := @maxWeight + 1), 0 );
14 {/if}
15 {/if}