Sha256: 3f60b2f48c808697789255bc429e7832fa877ca97e9b57a26d5efd4aabb14d44

Contents?: true

Size: 374 Bytes

Versions: 2

Compression:

Stored size: 374 Bytes

Contents

class AddQuantityToOrderLineItems < ActiveRecord::Migration
  def up
    unless columns(:order_line_items).collect {|c| c.name}.include?('quantity')
      add_column :order_line_items, :quantity, :integer
    end
  end

  def down
    if columns(:order_line_items).collect {|c| c.name}.include?('quantity')
      remove_column :order_line_items, :quantity
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
erp_orders-4.0.0 db/migrate/20130620203217_add_quantity_to_order_line_items.rb
erp_orders-3.1.1 db/migrate/20130620203217_add_quantity_to_order_line_items.rb