Move class definitions in adjustment migration

This commit is contained in:
Matt-Yorkley
2021-01-19 13:16:39 +00:00
parent 334e270a11
commit 79b86f535d

View File

@@ -1,13 +1,14 @@
class AddOrderToAdjustments < ActiveRecord::Migration
def up
class Spree::Adjustment < ActiveRecord::Base
belongs_to :adjustable, polymorphic: true
belongs_to :order, class_name: "Spree::Order"
end
class Spree::LineItem < ActiveRecord::Base
belongs_to :order, class_name: "Spree::Order"
end
class Spree::Adjustment < ActiveRecord::Base
belongs_to :adjustable, polymorphic: true
belongs_to :order, class_name: "Spree::Order"
end
class Spree::LineItem < ActiveRecord::Base
belongs_to :order, class_name: "Spree::Order"
end
def up
add_column :spree_adjustments, :order_id, :integer
# Ensure migration can use the new column