Sha256: 100dea7ebdbd702ee549d289b3ffdeb50b3128d3e33b8ce049a39371218d34ab

Contents?: true

Size: 400 Bytes

Versions: 8

Compression:

Stored size: 400 Bytes

Contents

class CreateComableStocks < ActiveRecord::Migration
  def change
    create_table :comable_stocks do |t|
      t.references :product, null: false
      t.string :code, null: false
      t.integer :quantity, null: false, default: 0
      t.string :sku_h_choice_name
      t.string :sku_v_choice_name
      t.timestamps null: false
    end

    add_index :comable_stocks, :code, unique: true
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
comable-core-0.7.1 db/migrate/20140502060116_create_comable_stocks.rb
comable-core-0.7.0 db/migrate/20140502060116_create_comable_stocks.rb
comable-core-0.7.0.beta2 db/migrate/20140502060116_create_comable_stocks.rb
comable-core-0.7.0.beta1 db/migrate/20140502060116_create_comable_stocks.rb
comable-core-0.6.0 db/migrate/20140502060116_create_comable_stocks.rb
comable_core-0.5.0 db/migrate/20140502060116_create_comable_stocks.rb
comable_core-0.4.2 db/migrate/20140502060116_create_comable_stocks.rb
comable_core-0.4.1 db/migrate/20140502060116_create_comable_stocks.rb