Posted By

Feb30th1712 on 10/19/08


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

webstic


002_add_price.rb


 / Published in: Rails
 

URL: http://www.google.com/notebook/public/14791221385681490756/BDRKWDAoQrZnEq9Ej#SDQ8rDAoQvNDfl88j

  1. class AddPrice < ActiveRecord::Migration
  2. def self.up
  3. add_column :products, :price, :decimal, :precision => 8, :scale =>2, :default => 0
  4. end
  5.  
  6. def self.down
  7. remove_column :products, :price
  8. end
  9. end

Report this snippet  

You need to login to post a comment.