class CreateSpreeStoreCreditPaymentMethod < ActiveRecord::Migration
  def up
    return if Spree::PaymentMethod.find_by_type("Spree::PaymentMethod::StoreCredit")
    Spree::PaymentMethod.create(type: "Spree::PaymentMethod::StoreCredit", name: "Store Credit", description: "Store credit.", active: true, environment: Rails.env)
  end
end

class CreateSpreeStoreCreditPaymentMethod < ActiveRecord::Migration
  def up
    return if Spree::PaymentMethod.find_by_type("Spree::PaymentMethod::StoreCredit")
    Spree::PaymentMethod.create(type: "Spree::PaymentMethod::StoreCredit", name: "Store Credit", description: "Store credit.", active: true)
  end
end

Fix migration by removing environment column from PaymentMethod.
Fix migration by removing environment column from PaymentMethod.