Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-20927 Migrate Upgrade code from mysql.tpl to PHP for saftey and s… #10858

Merged
merged 2 commits into from Aug 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions CRM/Upgrade/Incremental/php/FourSeven.php
Expand Up @@ -404,6 +404,18 @@ public function upgrade_4_7_23($rev) {
$this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev);
}

/**
* Upgrade function.
*
* @param string $rev
*/
public function upgrade_4_7_25($rev) {
$this->addTask("CRM-20927 - Add column to 'civicrm_menu' for additional metadata", 'addColumn',
'civicrm_menu', 'module_data', "text COMMENT 'All other menu metadata not stored in other fields'");
$this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev);
}


/*
* Important! All upgrade functions MUST add a 'runSql' task.
* Uncomment and use the following template for a new upgrade version
Expand Down
3 changes: 0 additions & 3 deletions CRM/Upgrade/Incremental/sql/4.7.25.mysql.tpl
@@ -1,7 +1,4 @@
{* file to handle db changes in 4.7.25 during upgrade *}

ALTER TABLE `civicrm_menu`
ADD COLUMN `module_data` text COMMENT 'All other menu metadata not stored in other fields';

--CRM-21061 Increase report_id size from 64 to 512 to match civicrm_option_value.value column
ALTER TABLE civicrm_report_instance CHANGE COLUMN report_id report_id varchar(512) COMMENT 'FK to civicrm_option_value for the report template';