Skip to content

Instantly share code, notes, and snippets.

Created July 24, 2008 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/2313 to your computer and use it in GitHub Desktop.
Save anonymous/2313 to your computer and use it in GitHub Desktop.
class AddPriceToProduct < ActiveRecord::Migration
def self.up
add_column :products, :price, :decimal
:precision => 8, :scale => 2, :default => 0
end
def self.down
remove_column :products, :price
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment