mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
14 lines
488 B
Ruby
14 lines
488 B
Ruby
class SwitchPaypalMethods < ActiveRecord::Migration
|
|
def up
|
|
Spree::PaymentMethod.connection.execute <<EOS
|
|
UPDATE spree_payment_methods
|
|
SET type='Spree::Gateway::PayPalExpress'
|
|
WHERE type IN ('Spree::BillingIntegration::PaypalExpress', 'Spree::BillingIntegration::PaypalExpressUk')
|
|
EOS
|
|
end
|
|
|
|
def down
|
|
Spree::PaymentMethod.connection.execute "UPDATE spree_payment_methods SET type='Spree::BillingIntegration::PaypalExpress' WHERE type='Spree::Gateway::PayPalExpress'"
|
|
end
|
|
end
|