Skip to content

Commit

Permalink
Move upgrade tasks to the correct version
Browse files Browse the repository at this point in the history
Fixes misplaced upgrade steps that should be in 4.7.16 instead of 4.7.15.
  • Loading branch information
colemanw committed Jan 4, 2017
1 parent cd063b1 commit 73c5338
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
14 changes: 7 additions & 7 deletions CRM/Upgrade/Incremental/php/FourSeven.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,8 @@ public function upgrade_4_7_14($rev) {
* @param string $rev
*/
public function upgrade_4_7_15($rev) {
$this->addTask('CRM-19723 - Add icon column to civicrm_option_value', 'addColumn',
'civicrm_option_value', 'icon', "varchar(255) COMMENT 'crm-i icon class' DEFAULT NULL");
$this->addTask('CRM-19626 - Add min_amount column to civicrm_price_set', 'addColumn',
'civicrm_price_set', 'min_amount', "INT(10) UNSIGNED DEFAULT '0' COMMENT 'Minimum Amount required for this set.'");
$this->addTask('CRM-19769 - Add color column to civicrm_tag', 'addColumn',
'civicrm_tag', 'color', "varchar(255) COMMENT 'Hex color value e.g. #ffffff' DEFAULT NULL");
$this->addTask('CRM-19779 - Add color column to civicrm_option_value', 'addColumn',
'civicrm_option_value', 'color', "varchar(255) COMMENT 'Hex color value e.g. #ffffff' DEFAULT NULL");
$this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev);
}

Expand All @@ -297,10 +291,16 @@ public function upgrade_4_7_15($rev) {
* @param string $rev
*/
public function upgrade_4_7_16($rev) {
$this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev);
$this->addTask('CRM-19723 - Add icon column to civicrm_option_value', 'addColumn',
'civicrm_option_value', 'icon', "varchar(255) COMMENT 'crm-i icon class' DEFAULT NULL");
$this->addTask('CRM-19769 - Add color column to civicrm_tag', 'addColumn',
'civicrm_tag', 'color', "varchar(255) COMMENT 'Hex color value e.g. #ffffff' DEFAULT NULL");
$this->addTask('CRM-19779 - Add color column to civicrm_option_value', 'addColumn',
'civicrm_option_value', 'color', "varchar(255) COMMENT 'Hex color value e.g. #ffffff' DEFAULT NULL");
$this->addTask('Add new CiviMail fields', 'addMailingTemplateType');
$this->addTask('CRM-19770 - Add is_star column to civicrm_activity', 'addColumn',
'civicrm_activity', 'is_star', "tinyint DEFAULT '0' COMMENT 'Activity marked as favorite.'");
$this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev);
}

/*
Expand Down
21 changes: 0 additions & 21 deletions CRM/Upgrade/Incremental/sql/4.7.15.mysql.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,3 @@

-- CRM-19685 (fix for inconsistencies)
UPDATE civicrm_contact SET preferred_mail_format = 'Both' WHERE preferred_mail_format IS NULL;

-- CRM-19723 add icons
SELECT @option_group_id_act := max(id) from civicrm_option_group where name = 'activity_type';
UPDATE civicrm_option_value SET icon = 'fa-slideshare' WHERE option_group_id = @option_group_id_act AND name = 'Meeting';
UPDATE civicrm_option_value SET icon = 'fa-phone' WHERE option_group_id = @option_group_id_act AND name = 'Phone Call';
UPDATE civicrm_option_value SET icon = 'fa-envelope-o' WHERE option_group_id = @option_group_id_act AND name = 'Email';
UPDATE civicrm_option_value SET icon = 'fa-mobile' WHERE option_group_id = @option_group_id_act AND name = 'SMS';
UPDATE civicrm_option_value SET icon = 'fa-file-pdf-o' WHERE option_group_id = @option_group_id_act AND name = 'Print PDF Letter';
UPDATE civicrm_option_value SET icon = 'fa-folder-open-o' WHERE option_group_id = @option_group_id_act AND name = 'Open Case';
UPDATE civicrm_option_value SET icon = 'fa-share-square-o' WHERE option_group_id = @option_group_id_act AND name = 'Follow up';
UPDATE civicrm_option_value SET icon = 'fa-random' WHERE option_group_id = @option_group_id_act AND name = 'Change Case Type';
UPDATE civicrm_option_value SET icon = 'fa-pencil-square-o' WHERE option_group_id = @option_group_id_act AND name = 'Change Case Status';
UPDATE civicrm_option_value SET icon = 'fa-calendar' WHERE option_group_id = @option_group_id_act AND name = 'Change Case Start Date';
UPDATE civicrm_option_value SET icon = 'fa-user-plus' WHERE option_group_id = @option_group_id_act AND name = 'Assign Case Role';
UPDATE civicrm_option_value SET icon = 'fa-user-times' WHERE option_group_id = @option_group_id_act AND name = 'Remove Case Role';
UPDATE civicrm_option_value SET icon = 'fa-file-pdf-o' WHERE option_group_id = @option_group_id_act AND name = 'Print PDF Letter';
UPDATE civicrm_option_value SET icon = 'fa-compress' WHERE option_group_id = @option_group_id_act AND name = 'Merge Case';
UPDATE civicrm_option_value SET icon = 'fa-user-circle-o' WHERE option_group_id = @option_group_id_act AND name = 'Reassigned Case';
UPDATE civicrm_option_value SET icon = 'fa-link' WHERE option_group_id = @option_group_id_act AND name = 'Link Cases';
UPDATE civicrm_option_value SET icon = 'fa-tags' WHERE option_group_id = @option_group_id_act AND name = 'Change Case Tags';
UPDATE civicrm_option_value SET icon = 'fa-users' WHERE option_group_id = @option_group_id_act AND name = 'Add Client To Case';
21 changes: 21 additions & 0 deletions CRM/Upgrade/Incremental/sql/4.7.16.mysql.tpl
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
{* file to handle db changes in 4.7.16 during upgrade *}

-- CRM-19723 add icons
SELECT @option_group_id_act := max(id) from civicrm_option_group where name = 'activity_type';
UPDATE civicrm_option_value SET icon = 'fa-slideshare' WHERE option_group_id = @option_group_id_act AND name = 'Meeting';
UPDATE civicrm_option_value SET icon = 'fa-phone' WHERE option_group_id = @option_group_id_act AND name = 'Phone Call';
UPDATE civicrm_option_value SET icon = 'fa-envelope-o' WHERE option_group_id = @option_group_id_act AND name = 'Email';
UPDATE civicrm_option_value SET icon = 'fa-mobile' WHERE option_group_id = @option_group_id_act AND name = 'SMS';
UPDATE civicrm_option_value SET icon = 'fa-file-pdf-o' WHERE option_group_id = @option_group_id_act AND name = 'Print PDF Letter';
UPDATE civicrm_option_value SET icon = 'fa-folder-open-o' WHERE option_group_id = @option_group_id_act AND name = 'Open Case';
UPDATE civicrm_option_value SET icon = 'fa-share-square-o' WHERE option_group_id = @option_group_id_act AND name = 'Follow up';
UPDATE civicrm_option_value SET icon = 'fa-random' WHERE option_group_id = @option_group_id_act AND name = 'Change Case Type';
UPDATE civicrm_option_value SET icon = 'fa-pencil-square-o' WHERE option_group_id = @option_group_id_act AND name = 'Change Case Status';
UPDATE civicrm_option_value SET icon = 'fa-calendar' WHERE option_group_id = @option_group_id_act AND name = 'Change Case Start Date';
UPDATE civicrm_option_value SET icon = 'fa-user-plus' WHERE option_group_id = @option_group_id_act AND name = 'Assign Case Role';
UPDATE civicrm_option_value SET icon = 'fa-user-times' WHERE option_group_id = @option_group_id_act AND name = 'Remove Case Role';
UPDATE civicrm_option_value SET icon = 'fa-file-pdf-o' WHERE option_group_id = @option_group_id_act AND name = 'Print PDF Letter';
UPDATE civicrm_option_value SET icon = 'fa-compress' WHERE option_group_id = @option_group_id_act AND name = 'Merge Case';
UPDATE civicrm_option_value SET icon = 'fa-user-circle-o' WHERE option_group_id = @option_group_id_act AND name = 'Reassigned Case';
UPDATE civicrm_option_value SET icon = 'fa-link' WHERE option_group_id = @option_group_id_act AND name = 'Link Cases';
UPDATE civicrm_option_value SET icon = 'fa-tags' WHERE option_group_id = @option_group_id_act AND name = 'Change Case Tags';
UPDATE civicrm_option_value SET icon = 'fa-users' WHERE option_group_id = @option_group_id_act AND name = 'Add Client To Case';

0 comments on commit 73c5338

Please sign in to comment.