retrospring/db/migrate/20140801174930_create_questions.rb

17 lines
362 B
Ruby
Raw Normal View History

2023-10-20 01:37:34 +02:00
# frozen_string_literal: true
class CreateQuestions < ActiveRecord::Migration[4.2]
2014-10-28 06:36:38 +01: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 12:54:02 +01:00
t.integer :user_id
2014-10-28 06:36:38 +01:00
t.timestamps
end
2023-10-20 01:37:34 +02:00
add_index :questions, %i[user_id created_at]
2014-10-28 06:36:38 +01:00
end
end