Sha256: c7cc790f37275be6f636cb346d7e910f0769de43225958a399a600981ed2d30e

Contents?: true

Size: 602 Bytes

Versions: 8

Compression:

Stored size: 602 Bytes

Contents

class CreateComableOrderItems < ActiveRecord::Migration
  def change
    create_table :comable_order_items do |t|
      t.references :order, null: false
      t.references :stock, null: false
      t.string :name, null: false
      t.string :code, null: false
      t.integer :price, null: false
      t.string :sku_h_item_name
      t.string :sku_v_item_name
      t.string :sku_h_choice_name
      t.string :sku_v_choice_name
      t.integer :quantity, default: 1, null: false
      t.timestamps null: false
    end

    add_index :comable_order_items, [:order_id, :stock_id], unique: true
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

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