2020-04-19 09:10:31 -07:00
|
|
|
class CreateComments < ActiveRecord::Migration[4.2]
|
2014-10-27 22:36:38 -07:00
|
|
|
def change
|
|
|
|
create_table :comments do |t|
|
|
|
|
t.string :content
|
|
|
|
t.integer :answer_id
|
|
|
|
t.integer :user_id
|
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
add_index :comments, [:user_id, :created_at]
|
|
|
|
end
|
|
|
|
end
|