From 150676ad6cbc822c8e0c5ec7a1679e51be3166a7 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Tue, 23 May 2017 10:00:56 +1000 Subject: [PATCH] CRM-20263 Ensure that after using the Add Column method that Multilingual schema is rebuilt properly --- CRM/Upgrade/Incremental/Base.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CRM/Upgrade/Incremental/Base.php b/CRM/Upgrade/Incremental/Base.php index cef0d215efa9..1aab7f9511c8 100644 --- a/CRM/Upgrade/Incremental/Base.php +++ b/CRM/Upgrade/Incremental/Base.php @@ -155,6 +155,12 @@ public static function addColumn($ctx, $table, $column, $properties) { CRM_Core_DAO::executeQuery("ALTER TABLE `$table` ADD COLUMN `$column` $properties", array(), TRUE, NULL, FALSE, FALSE); } + $domain = new CRM_Core_DAO_Domain(); + $domain->find(TRUE); + if ($domain->locales) { + $locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales); + CRM_Core_I18n_Schema::rebuildMultilingualSchema($locales, NULL); + } return TRUE; }