From 017ff391ccf886f2236796bee5144cb75b627b87 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 8 Sep 2023 08:32:07 +1000 Subject: [PATCH] [REF] Ensure that any NULL values in the title field are fixed prior to changing the column --- CRM/Upgrade/Incremental/sql/5.63.alpha1.mysql.tpl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CRM/Upgrade/Incremental/sql/5.63.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.63.alpha1.mysql.tpl index d96fd227a1..62361f6bb0 100644 --- a/CRM/Upgrade/Incremental/sql/5.63.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/5.63.alpha1.mysql.tpl @@ -21,11 +21,19 @@ UPDATE civicrm_contribution_page SET `name` = `id`; -- Add name field, make frontend_title required (in conjunction with php function) {if $multilingual} {foreach from=$locales item=locale} + UPDATE `civicrm_contribution_page` + SET `title_{$locale}` = '' + WHERE `title_{$locale}` IS NULL; + UPDATE `civicrm_contribution_page` SET `frontend_title_{$locale}` = `title_{$locale}` WHERE `frontend_title_{$locale}` IS NULL OR `frontend_title_{$locale}` = ''; {/foreach} {else} + UPDATE `civicrm_contribution_page` + SET `title` = '' + WHERE `title` IS NULL; + UPDATE `civicrm_contribution_page` SET `frontend_title` = `title` WHERE `frontend_title` IS NULL OR `frontend_title` = ''; -- 2.25.1