mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-06 22:36:07 +00:00
Fix migration - dependency on modified model relations
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
class CreateDistributorsPaymentMethods < ActiveRecord::Migration
|
||||
class Spree::PaymentMethod < ActiveRecord::Base
|
||||
belongs_to :distributor, class_name: 'Enterprise'
|
||||
has_and_belongs_to_many :distributors, join_table: 'distributors_payment_methods', :class_name => 'Enterprise', association_foreign_key: 'distributor_id'
|
||||
end
|
||||
|
||||
def up
|
||||
create_table :distributors_payment_methods, :id => false do |t|
|
||||
t.references :distributor
|
||||
|
||||
Reference in New Issue
Block a user