aboutsummaryrefslogtreecommitdiffstats
path: root/guides/code/getting_started/db/migrate/20130122045842_create_comments.rb
blob: 3e51f9c0f7832972b9c5e1dc243dbfaf4c68c5cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
class CreateComments < ActiveRecord::Migration
  def change
    create_table :comments do |t|
      t.string :commenter
      t.text :body
      t.references :post, index: true

      t.timestamps
    end
  end
end