mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Move class definitions in adjustment migration
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user