diff --git a/db/migrate/20260129230557_add_api_customer_credit_payment_method.rb b/db/migrate/20260129230557_add_api_customer_credit_payment_method.rb index 063784b815..2fc4100f49 100644 --- a/db/migrate/20260129230557_add_api_customer_credit_payment_method.rb +++ b/db/migrate/20260129230557_add_api_customer_credit_payment_method.rb @@ -3,14 +3,14 @@ class AddApiCustomerCreditPaymentMethod < ActiveRecord::Migration[7.1] def up # Create payment method - execute(<<-SQL.squish + execute(<<~SQL.squish INSERT INTO spree_payment_methods ( type, name, description, environment, active, display_on, created_at, updated_at) VALUES ('Spree::PaymentMethod::Check', 'api_payment_method.name', 'api_payment_method.description', '#{Rails.env}', true, 'back_end', NOW(), NOW()) SQL ) # Link to existing hub - execute(<<-SQL.squish + execute(<<~SQL.squish INSERT INTO distributors_payment_methods (distributor_id, payment_method_id, created_at, updated_at) SELECT id, (SELECT id FROM spree_payment_methods WHERE name = 'api_payment_method.name') as payment_method_id, NOW() as created_at, NOW() as updated_at FROM enterprises WHERE sells != 'none' @@ -19,13 +19,13 @@ class AddApiCustomerCreditPaymentMethod < ActiveRecord::Migration[7.1] end def down - execute(<<-SQL.squish + execute(<<~SQL.squish DELETE FROM distributors_payment_methods WHERE payment_method_id = (SELECT id FROM spree_payment_methods WHERE name = 'api_payment_method.name') SQL ) - execute(<<-SQL.squish + execute(<<~SQL.squish DELETE FROM spree_payment_methods WHERE name = 'api_payment_method.name' SQL ) diff --git a/db/migrate/20260206054509_add_customer_credit_payment_method.rb b/db/migrate/20260206054509_add_customer_credit_payment_method.rb index 6b940ccdce..603cee7127 100644 --- a/db/migrate/20260206054509_add_customer_credit_payment_method.rb +++ b/db/migrate/20260206054509_add_customer_credit_payment_method.rb @@ -3,14 +3,14 @@ class AddCustomerCreditPaymentMethod < ActiveRecord::Migration[7.1] def up # Create payment method - execute(<<-SQL.squish + execute(<<~SQL.squish INSERT INTO spree_payment_methods ( type, name, description, environment, active, display_on, created_at, updated_at) VALUES ('Spree::PaymentMethod::CustomerCredit', 'credit_payment_method.name', 'credit_payment_method.description', '#{Rails.env}', true, 'both', NOW(), NOW()) SQL ) # Link to existing hub - execute(<<-SQL.squish + execute(<<~SQL.squish INSERT INTO distributors_payment_methods (distributor_id, payment_method_id, created_at, updated_at) SELECT id, (SELECT id FROM spree_payment_methods WHERE name = 'credit_payment_method.name' LIMIT 1) as payment_method_id, NOW() as created_at, NOW() as updated_at FROM enterprises WHERE sells != 'none' @@ -19,13 +19,13 @@ class AddCustomerCreditPaymentMethod < ActiveRecord::Migration[7.1] end def down - execute(<<-SQL.squish + execute(<<~SQL.squish DELETE FROM distributors_payment_methods WHERE payment_method_id = (SELECT id FROM spree_payment_methods WHERE name = 'credit_payment_method.name') SQL ) - execute(<<-SQL.squish + execute(<<~SQL.squish DELETE FROM spree_payment_methods WHERE name = 'credit_payment_method.name' SQL )