cirandas.net

ref: master

db/migrate/20110316171323_change_discount_to_decimal.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
class ChangeDiscountToDecimal < ActiveRecord::Migration
  def self.up
    change_table :products do |t|
      t.change :discount, :decimal
    end
  end

  def self.down
    change_table :products do |t|
      t.change :discount, :float
    end
  end
end