From a46d1547abbec83d21f7d66b94b35dbfc2730e27 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Thu, 16 Jan 2025 14:53:58 +1100 Subject: [PATCH] FIX: Add a DB migration to update font site settings types (#30813) This PR is a follow-up to #30636. The previous change altered the `data_type` of the `base_font` and `heading_font` site settings, but didn't update the corresponding entries in the `site_settings` table to match. --- .../20250116024516_update_font_site_settings_type.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 db/migrate/20250116024516_update_font_site_settings_type.rb diff --git a/db/migrate/20250116024516_update_font_site_settings_type.rb b/db/migrate/20250116024516_update_font_site_settings_type.rb new file mode 100644 index 00000000000..24c7cf68547 --- /dev/null +++ b/db/migrate/20250116024516_update_font_site_settings_type.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true +class UpdateFontSiteSettingsType < ActiveRecord::Migration[7.2] + def up + execute "UPDATE site_settings SET data_type=8 WHERE name IN('base_font', 'heading_font')" + end + + def down + execute "UPDATE site_settings SET data_type=7 WHERE name IN('base_font', 'heading_font')" + end +end