Skip to content

Commit

Permalink
Merge pull request #14187 from seamuslee001/dev_core_931
Browse files Browse the repository at this point in the history
Resolve dev/core#931 by not doing translation on the query if field e…
seamuslee001 authored May 2, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 35f9da7 + e00be4f commit 9633590
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CRM/Upgrade/Incremental/Base.php
Original file line number Diff line number Diff line change
@@ -156,12 +156,12 @@ public static function addColumn($ctx, $table, $column, $properties, $localizabl
$domain = new CRM_Core_DAO_Domain();
$domain->find(TRUE);
$queries = [];
if (!CRM_Core_BAO_SchemaHandler::checkIfFieldExists($table, $column)) {
if (!CRM_Core_BAO_SchemaHandler::checkIfFieldExists($table, $column, FALSE)) {
if ($domain->locales) {
if ($localizable) {
$locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales);
foreach ($locales as $locale) {
if (!CRM_Core_BAO_SchemaHandler::checkIfFieldExists($table, "{$column}_{$locale}")) {
if (!CRM_Core_BAO_SchemaHandler::checkIfFieldExists($table, "{$column}_{$locale}", FALSE)) {
$queries[] = "ALTER TABLE `$table` ADD COLUMN `{$column}_{$locale}` $properties";
}
}

0 comments on commit 9633590

Please sign in to comment.