1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/guides/code/getting_started/db/migrate/20110901012815_create_comments.rb
2012-03-17 08:32:49 -07:00

12 lines
236 B
Ruby

class CreateComments < ActiveRecord::Migration
def change
create_table :comments do |t|
t.string :commenter
t.text :body
t.references :post
t.timestamps
end
add_index :comments, :post_id
end
end