mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 14:19:53 +01:00
16 lines
362 B
Ruby
16 lines
362 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreateQuestions < ActiveRecord::Migration[4.2]
|
|
def change
|
|
create_table :questions do |t|
|
|
t.string :content
|
|
t.boolean :author_is_anonymous
|
|
t.string :author_name
|
|
t.string :author_email
|
|
t.integer :user_id
|
|
|
|
t.timestamps
|
|
end
|
|
add_index :questions, %i[user_id created_at]
|
|
end
|
|
end
|