Sha256: 176f6c37e10e590ac5fc9a5024e6c44225ef4646197d02b21ede58ff838820c7

Contents?: true

Size: 532 Bytes

Versions: 2

Compression:

Stored size: 532 Bytes

Contents

# This migration comes from spree (originally 20130211190146)
class CreateSpreeStockItems < ActiveRecord::Migration
  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: true
    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

2 entries across 2 versions & 1 rubygems

Version Path
spree_order_reporting-0.0.2 spec/dummy/db/migrate/20160707103376_create_spree_stock_items.spree.rb
spree_order_reporting-0.0.1 spec/dummy/db/migrate/20160706112328_create_spree_stock_items.spree.rb