From: Eileen McNaughton Date: Tue, 5 Dec 2023 02:08:09 +0000 (+1300) Subject: Update CustomField default_value to NULL instead of '' for floats X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2721cd128781e2519639a581eaef807b41755324;p=civicrm-core.git Update CustomField default_value to NULL instead of '' for floats --- diff --git a/CRM/Upgrade/Incremental/sql/5.69.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.69.alpha1.mysql.tpl index d06b3d37ac..ef02c7c641 100644 --- a/CRM/Upgrade/Incremental/sql/5.69.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/5.69.alpha1.mysql.tpl @@ -1,4 +1,7 @@ {* file to handle db changes in 5.69.alpha1 during upgrade *} +-- Fix default for any custom fields of data-type float to be NULL rather than empty string -- +UPDATE civicrm_custom_field SET default_value = NULL WHERE default_value = '' AND data_type = 'Float'; + -- Add missing provinces for Zambia SELECT @country_id := id FROM civicrm_country WHERE name = 'Zambia'; INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'C', 'Central');