Created
July 7, 2011 02:55
-
-
Save noahhendrix/1068816 to your computer and use it in GitHub Desktop.
Product Migration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreateProducts < ActiveRecord::Migration | |
def self.up | |
create_table :products do |t| | |
t.string :title | |
t.text :description | |
t.string :image_url | |
t.decimal :price, :precision => 8, :scale => 2 | |
t.timestamps | |
end | |
end | |
def self.down | |
drop_table :products | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment