Sha256: ddeccc77c49c965b19fbee344e061169457c5249e79db73f96d2ebc64fdc2ece

Contents?: true

Size: 569 Bytes

Versions: 4

Compression:

Stored size: 569 Bytes

Contents

class CreateSpreeVolumePriceModels < ActiveRecord::Migration
  def change
    create_table :spree_volume_price_models do |t|
      t.string :name
      t.timestamps
    end

    create_table :spree_variants_volume_price_models do |t|
      t.belongs_to :volume_price_model
      t.belongs_to :variant
    end

    add_reference :spree_volume_prices, :volume_price_model

    add_index :spree_variants_volume_price_models, :volume_price_model_id, name: 'volume_price_model_id'
    add_index :spree_variants_volume_price_models, :variant_id, name: 'variant_id'
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
solidus_volume_pricing-0.2.1 db/migrate/20150603143015_create_spree_volume_price_models.rb
solidus_volume_pricing-0.1.1 db/migrate/20150603143015_create_spree_volume_price_models.rb
solidus_volume_pricing-0.2.0 db/migrate/20150603143015_create_spree_volume_price_models.rb
solidus_volume_pricing-0.1.0 db/migrate/20150603143015_create_spree_volume_price_models.rb