Sha256: 60ddc69e9a3bf2d069aa40b5e9b263fa86f5f555e1d16d24a125c62a1de55b8e
Contents?: true
Size: 668 Bytes
Versions: 37
Compression:
Stored size: 668 Bytes
Contents
class ConvertAllDecimalFields < ActiveRecord::Migration def up change_column :line_items, :price, :decimal, :precision => 10, :scale => 2 change_column :line_items, :unit_price, :decimal, :precision => 10, :scale => 2, :null => false, :defualt => 0.0 change_column :orders, :total, :decimal, :precision => 10, :scale => 2, :null => false change_column :orders, :total_due, :decimal, :precision => 10, :scale => 2, :null => false end def down change_column :line_items, :price, :decimal change_column :line_items, :unit_price, :decimal change_column :orders, :total, :decimal change_column :orders, :total_due, :decimal end end
Version data entries
37 entries across 37 versions & 2 rubygems