From 2721cd128781e2519639a581eaef807b41755324 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 5 Dec 2023 15:08:09 +1300 Subject: [PATCH] Update CustomField default_value to NULL instead of '' for floats --- CRM/Upgrade/Incremental/sql/5.69.alpha1.mysql.tpl | 3 +++ 1 file changed, 3 insertions(+) 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'); -- 2.25.1