Merge pull request #4054 from eileenmcnaughton/CRM-15237
[civicrm-core.git] / CRM / Upgrade / Incremental / sql / 3.4.1.mysql.tpl
CommitLineData
10824d34 1-- CRM-7796
6a488035
TO
2
3ALTER TABLE `civicrm_dashboard` ADD `fullscreen_url` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'fullscreen url for dashlet';
4
5UPDATE `civicrm_dashboard` SET fullscreen_url='civicrm/dashlet/activity&reset=1&snippet=4&context=dashletFullscreen' WHERE url='civicrm/dashlet/activity&reset=1&snippet=4';
6UPDATE `civicrm_dashboard` SET fullscreen_url='civicrm/dashlet/myCases&reset=1&snippet=4&context=dashletFullscreen' WHERE url='civicrm/dashlet/myCases&reset=1&snippet=4';
7UPDATE `civicrm_dashboard` SET fullscreen_url='civicrm/dashlet/allCases&reset=1&snippet=4&context=dashletFullscreen' WHERE url='civicrm/dashlet/allCases&reset=1&snippet=4';
8
9-- CRM-7956
10DELETE FROM civicrm_navigation where name = 'CiviCampaign';
11DELETE FROM civicrm_navigation where name = 'Survey Types';
12DELETE FROM civicrm_navigation where name = 'Campaign Types';
13DELETE FROM civicrm_navigation where name = 'Campaign Status';
14DELETE FROM civicrm_navigation where name = 'Engagement Index';
15
16SELECT @administerID := MAX(id) FROM civicrm_navigation where name = 'Administer';
17SELECT @adminCampaignWeight := MAX(weight)+1 FROM civicrm_navigation where parent_id = @administerID;
18
19INSERT INTO civicrm_navigation
20 ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
10824d34 21VALUES
6a488035
TO
22 ( {$domainID}, NULL, '{ts escape="sql" skip="true"}CiviCampaign{/ts}', 'CiviCampaign', 'administer CiviCampaign,administer CiviCRM', 'AND', @administerID, '1', NULL, @adminCampaignWeight );
23
24SET @adminCampaignID:=LAST_INSERT_ID();
25
26INSERT INTO civicrm_navigation
27 ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
10824d34 28VALUES
6a488035
TO
29 ( {$domainID}, 'civicrm/admin/campaign/surveyType&reset=1', '{ts escape="sql" skip="true"}Survey Types{/ts}', 'Survey Types', 'administer CiviCampaign', '', @adminCampaignID, '1', NULL, 1 ),
30 ( {$domainID}, 'civicrm/admin/options/campaign_type&group=campaign_type&reset=1', '{ts escape="sql" skip="true"}Campaign Types{/ts}', 'Campaign Types', 'administer CiviCampaign', '', @adminCampaignID, '1', NULL, 2 ),
31 ( {$domainID}, 'civicrm/admin/options/campaign_status&group=campaign_status&reset=1', '{ts escape="sql" skip="true"}Campaign Status{/ts}', 'Campaign Status', 'administer CiviCampaign', '', @adminCampaignID, '1', NULL, 3 ),
32 ( {$domainID}, 'civicrm/admin/options/engagement_index&group=engagement_index&reset=1','{ts escape="sql" skip="true"}Engagement Index{/ts}', 'Engagement Index', 'administer CiviCampaign', '', @adminCampaignID, '1', NULL, 4 );
33
34-- CRM-7976
35DELETE FROM civicrm_navigation where name = 'Manage CiviCRM Extensions';
36
37SELECT @customizeID := MAX(id) FROM civicrm_navigation where name = 'Customize';
38SELECT @extensionsWeight := MAX(weight)+1 FROM civicrm_navigation where parent_id = @customizeID;
39
40INSERT INTO civicrm_navigation
41 ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
10824d34 42VALUES
6a488035
TO
43 ( {$domainID}, 'civicrm/admin/extensions&reset=1', '{ts escape="sql" skip="true"}Manage CiviCRM Extensions{/ts}', 'Manage CiviCRM Extensions', 'administer CiviCRM', '', @customizeID, '1', NULL, @extensionsWeight );
44
45-- CRM-7878
46-- insert drupal wysiwyg editor option
47SELECT @option_group_id_we := max(id) from civicrm_option_group where name = 'wysiwyg_editor';
48
10824d34 49INSERT INTO civicrm_option_value
6a488035 50 ( option_group_id, {localize field='label'}label{/localize}, value, name, grouping, filter, is_default, weight, {localize field='description'}description{/localize}, is_optgroup, is_active, component_id, domain_id, visibility_id )
10824d34 51VALUES
6a488035
TO
52 ( @option_group_id_we, {localize}'Drupal Default Editor'{/localize}, 4, NULL, NULL, 0, NULL, 4, {localize}NULL{/localize}, 0, 1, 1, NULL, NULL );
53
54-- CRM-7988 allow negative start and end date offsets for custom fields
55ALTER TABLE civicrm_custom_field MODIFY start_date_years INT(10);
56ALTER TABLE civicrm_custom_field MODIFY end_date_years INT(10);
57
58-- CRM-8009
cff67e98 59INSERT IGNORE INTO civicrm_state_province
6a488035
TO
60 (`name`, `abbreviation`, `country_id` )
61VALUES
62 ( 'Toledo' , 'TO', '1198' ),
63 ( 'Córdoba', 'CO', '1198' );