Skip to content
Snippets Groups Projects
Commit ce33da5a authored by Seamus Lee's avatar Seamus Lee
Browse files

Resolve #931 by not doing translation on the query if field exists...

Resolve #931 by not doing translation on the query if field exists during the upgrade process
parent 06c6fed9
Branches
Tags
No related merge requests found
......@@ -156,12 +156,12 @@ class CRM_Upgrade_Incremental_Base {
$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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment