diff --git a/db/migrate/20181106162211_update_weight_calculator_type_class_name.rb b/db/migrate/20181106162211_update_weight_calculator_type_class_name.rb new file mode 100644 index 0000000000..f8e15b3414 --- /dev/null +++ b/db/migrate/20181106162211_update_weight_calculator_type_class_name.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 18f7177b86..49dae1fa6e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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