Merge pull request #4054 from eileenmcnaughton/CRM-15237
[civicrm-core.git] / CRM / Upgrade / Incremental / sql / 3.1.beta5.mysql.tpl
CommitLineData
6a488035
TO
1-- CRM-5628
2SELECT @country_id := id from civicrm_country where name = 'Haiti';
3
cff67e98 4INSERT IGNORE INTO civicrm_state_province ( country_id, abbreviation, name ) VALUES
6a488035
TO
5( @country_id, 'AR', 'Artibonite' ),
6( @country_id, 'CE', 'Centre' ),
7( @country_id, 'NI', 'Nippes' ),
8( @country_id, 'ND', 'Nord' );
9
10 UPDATE civicrm_state_province state
10824d34 11INNER JOIN civicrm_country country ON ( country.id = state.country_id )
6a488035
TO
12 SET state.name = 'Nord-Est'
13 WHERE state.name = 'Nord-Eat'
14 AND country.name = 'Haiti';
15
16INSERT INTO civicrm_acl
17 (name, deny, entity_table, entity_id, operation, object_table, object_id, acl_table, acl_id, is_active)
18VALUES
19 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile create', NULL, NULL, NULL, 1),
20 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile edit', NULL, NULL, NULL, 1),
21 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile listings', NULL, NULL, NULL, 1),
22 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile view', NULL, NULL, NULL, 1);
23
24-- CRM-5648
25SELECT @option_group_id_mt := max(id) from civicrm_option_group where name = 'mapping_type';
26SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_mt;
27SELECT @max_wt := MAX(ROUND(val.weight)) FROM civicrm_option_value val WHERE val.option_group_id = @option_group_id_mt;
28
29INSERT INTO civicrm_option_value
10824d34 30 (`option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`)
6a488035
TO
31VALUES
32 (@option_group_id_mt, {localize}'Export Grant'{/localize}, (SELECT @max_val := @max_val+1), 'Export Grant', NULL, 0, 0, (SELECT @max_wt := @max_wt+1), 0, 1, 1);