Sha256: 4a00313eb7dbe4b8af1ff192415d34ee0d3207570fc5193cab834e548e4f4f94

Contents?: true

Size: 320 Bytes

Versions: 9

Compression:

Stored size: 320 Bytes

Contents

class AddVendorIdToSpreeModels < SpreeExtension::Migration[4.2]
  def change
    SpreeMultiVendor.vendorized_models.each do |klass|
      add_reference klass.table_name, :vendor, index: true
    rescue
      message = "Could not add vendor_id column to spree_#{klass}"
      Rails.logger.error message
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
spree_multi_vendor-2.5.0 db/migrate/20170406102944_add_vendor_id_to_spree_models.rb
spree_multi_vendor-2.4.1 db/migrate/20170406102944_add_vendor_id_to_spree_models.rb
atkhayar-dev-spree-multi-vendor-0.0.0 db/migrate/20170406102944_add_vendor_id_to_spree_models.rb
spree_multi_vendor-2.4.0 db/migrate/20170406102944_add_vendor_id_to_spree_models.rb
spree_multi_vendor-2.3.0 db/migrate/20170406102944_add_vendor_id_to_spree_models.rb
spree_multi_vendor-2.2.0 db/migrate/20170406102944_add_vendor_id_to_spree_models.rb
spree_multi_vendor-2.1.0 db/migrate/20170406102944_add_vendor_id_to_spree_models.rb
spree_multi_vendor-2.0.2 db/migrate/20170406102944_add_vendor_id_to_spree_models.rb
spree_multi_vendor-2.0.1 db/migrate/20170406102944_add_vendor_id_to_spree_models.rb