mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:29:52 +01:00
12 lines
262 B
Ruby
12 lines
262 B
Ruby
class CreateComments < ActiveRecord::Migration[4.2]
|
|
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
|