Sha256: d729685b783d604dac1a01aecbd3948a57cfb81e3485e338500547d2e4c49d33

Contents?: true

Size: 549 Bytes

Versions: 3

Compression:

Stored size: 549 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, precision: 6
    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

3 entries across 3 versions & 2 rubygems

Version Path
spree_purchase_order-3.7.0 spec/dummy/db/migrate/20191113195733_create_spree_stock_items.spree.rb
spree_billing_sisow-0.9.2 spec/dummy/db/migrate/20190729091674_create_spree_stock_items.spree.rb
spree_billing_sisow-0.9.1 spec/dummy/db/migrate/20190729091674_create_spree_stock_items.spree.rb