2020-04-19 09:10:31 -07:00
|
|
|
class CreateQuestions < ActiveRecord::Migration[4.2]
|
2014-10-27 22:36:38 -07:00
|
|
|
def change
|
|
|
|
create_table :questions do |t|
|
|
|
|
t.string :content
|
|
|
|
t.boolean :author_is_anonymous
|
|
|
|
t.string :author_name
|
|
|
|
t.string :author_email
|
2014-11-03 03:54:02 -08:00
|
|
|
t.integer :user_id
|
2014-10-27 22:36:38 -07:00
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
add_index :questions, [:user_id, :created_at]
|
|
|
|
end
|
|
|
|
end
|