Merge pull request #4054 from eileenmcnaughton/CRM-15237
[civicrm-core.git] / CRM / Upgrade / Incremental / sql / 4.1.beta3.mysql.tpl
CommitLineData
6a488035
TO
1-- Fix invalid api actions in Job table and insert missing job
2UPDATE `civicrm_job`
3SET api_action = 'process_membership_reminder_date' WHERE api_action = 'process_process_membership_reminder_date';
4UPDATE `civicrm_job`
5SET api_action = 'mail_report' WHERE api_action = 'mail_reports';
6
7SELECT @domainID := min(id) FROM civicrm_domain;
8INSERT INTO `civicrm_job`
c55ee104 9 ( domain_id, run_frequency, last_run, name, description, api_prefix, api_entity, api_action, parameters, is_active )
10VALUES
6a488035
TO
11 ( @domainID, 'Always' , NULL, '{ts escape="sql" skip="true"}Process Survey Respondents{/ts}', '{ts escape="sql" skip="true"}Releases reserved survey respondents when they have been reserved for longer than the Release Frequency days specified for that survey.{/ts}','civicrm_api3', 'job', 'process_respondent','version=3\r\n', 0);
12
13-- Job table was initially delivered with invalid and not-used parameters. Clearing them out. Most jobs do not need any parameters.
14UPDATE `civicrm_job`
15SET parameters = NULL;
16
17-- Insert Schedule Jobs admin menu item
c55ee104 18SELECT @systemSettingsID := id FROM civicrm_navigation where name = 'System Settings' AND domain_id = @domainID;
6a488035
TO
19
20INSERT INTO civicrm_navigation
21 ( domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight )
22VALUES
23 ( @domainID, 'civicrm/admin/job&reset=1', '{ts escape="sql" skip="true"}Scheduled Jobs{/ts}', 'Scheduled Jobs', 'administer CiviCRM', '', @systemSettingsID, '1', NULL, 15 );
24
25-- CRM-9468
26-- update Serbia/Montenegro provinces
27UPDATE civicrm_state_province SET country_id = 1243 WHERE id = 5112;
28UPDATE civicrm_state_province SET country_id = 1242 WHERE id = 5113;
29UPDATE civicrm_state_province SET country_id = 1242 WHERE id = 5114;
30UPDATE civicrm_state_province SET country_id = 1242 WHERE id = 5115;
31
32-- CRM-9523
33ALTER TABLE `civicrm_note` MODIFY `privacy` VARCHAR(255) COMMENT 'Foreign Key to Note Privacy Level (which is an option value pair and hence an implicit FK)';