mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
12 lines
236 B
Ruby
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
|