Add migration to update calculator class name of weight calculators

This commit is contained in:
luisramos0
2018-11-06 16:31:40 +00:00
parent 9490da329a
commit b7ffde795a
2 changed files with 10 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
class UpdateWeightCalculatorTypeClassName < ActiveRecord::Migration
def up
Spree::Calculator.connection.execute("UPDATE spree_calculators SET type = 'Calculator::Weight' WHERE type = 'OpenFoodNetwork::Calculator::Weight'")
end
def down
Spree::Calculator.connection.execute("UPDATE spree_calculators SET type = 'OpenFoodNetwork::Calculator::Weight' WHERE type = 'Calculator::Weight'")
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20181031105158) do
ActiveRecord::Schema.define(:version => 20181106162211) do
create_table "account_invoices", :force => true do |t|
t.integer "user_id", :null => false