From ed5cb00f45bda6315b84b1b1c68130fd3616fc67 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 3 Jan 2025 15:40:51 +1100 Subject: [PATCH] Remove unused app config options This has been defined in ENV for a while --- app/models/spree/app_configuration.rb | 3 --- ...delete_checkout_zone_and_currency_preferences.rb | 13 +++++++++++++ db/schema.rb | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20250103043626_delete_checkout_zone_and_currency_preferences.rb diff --git a/app/models/spree/app_configuration.rb b/app/models/spree/app_configuration.rb index f624928703b..ca6e71f17d2 100644 --- a/app/models/spree/app_configuration.rb +++ b/app/models/spree/app_configuration.rb @@ -33,9 +33,6 @@ class AppConfiguration < Preferences::Configuration preference :allow_backorder_shipping, :boolean, default: false preference :allow_checkout_on_gateway_error, :boolean, default: false preference :allow_guest_checkout, :boolean, default: true - # Replace with the name of a zone if you would like to limit the countries - preference :checkout_zone, :string, default: nil - preference :currency, :string, default: "USD" preference :currency_decimal_mark, :string, default: "." preference :currency_symbol_position, :string, default: "before" preference :currency_thousands_separator, :string, default: "," diff --git a/db/migrate/20250103043626_delete_checkout_zone_and_currency_preferences.rb b/db/migrate/20250103043626_delete_checkout_zone_and_currency_preferences.rb new file mode 100644 index 00000000000..0b6f5939eb6 --- /dev/null +++ b/db/migrate/20250103043626_delete_checkout_zone_and_currency_preferences.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class DeleteCheckoutZoneAndCurrencyPreferences < ActiveRecord::Migration[7.0] + def up + execute <<~SQL + DELETE FROM spree_preferences + WHERE key IN ( + '/spree/app_configuration/checkout_zone', + '/spree/app_configuration/currency' + ) + SQL + end +end diff --git a/db/schema.rb b/db/schema.rb index be371a9499d..fbec4d3ac72 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2024_11_12_230401) do +ActiveRecord::Schema[7.0].define(version: 2025_01_03_043626) do # These are extensions that must be enabled in order to support this database enable_extension "pg_stat_statements" enable_extension "plpgsql"