Sha256: 2cd9b462fcd34cb737c91b0ddcc5ed1063584cc21e42380f06e981e0f7c6c982

Contents?: true

Size: 535 Bytes

Versions: 6

Compression:

Stored size: 535 Bytes

Contents

# This migration comes from spree (originally 20130211190146)
class CreateSpreeStockItems < ActiveRecord::Migration[4.2]
  def change
    create_table :spree_stock_items do |t|
      t.belongs_to :stock_location
      t.belongs_to :variant
      t.integer :count_on_hand, null: false, default: 0
      t.integer :lock_version

      t.timestamps null: false
    end
    add_index :spree_stock_items, :stock_location_id
    add_index :spree_stock_items, [:stock_location_id, :variant_id], name: 'stock_item_by_loc_and_var_id'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
spree_purchase_order-3.6.0 spec/dummy/db/migrate/20180516181862_create_spree_stock_items.spree.rb
spree_purchase_order-3.5.0 spec/dummy/db/migrate/20180516181862_create_spree_stock_items.spree.rb
spree_purchase_order-3.5.0.rc1 spec/dummy/db/migrate/20180516181862_create_spree_stock_items.spree.rb
spree_purchase_order-3.4.0 spec/dummy/db/migrate/20180516181862_create_spree_stock_items.spree.rb
spree_purchase_order-3.3.0 spec/dummy/db/migrate/20180516181862_create_spree_stock_items.spree.rb
spree_purchase_order-3.2.0 spec/dummy/db/migrate/20180516181862_create_spree_stock_items.spree.rb