Sha256: 558dea18c57237f7119ac19d7e017b99ce8ab1be7e1b77884dcd583c59f8a1a6
Contents?: true
Size: 412 Bytes
Versions: 2
Compression:
Stored size: 412 Bytes
Contents
# This migration comes from piggybak_engine (originally 20120627144001) class AddPriceToLineItem < ActiveRecord::Migration def up add_column :line_items, :price, :decimal, :null => false, :default => 0.0 #Piggybak::LineItem.all.each do |line_item| # line_item.update_attribute(:price, line_item.total/line_item.quantity) #end end def down remove_column :line_items, :price end end
Version data entries
2 entries across 2 versions & 1 rubygems