class QuestionableMigration

Public Instance Methods

change() click to toggle source
# File lib/templates/questionable_migration.rb, line 2
def change
  create_table :questions do |t|
    t.integer :questionable_id
    t.string :questionable_type
    t.string :subject

    t.timestamps
  end

  create_table :answers do |t|
    t.integer :question_id
    t.string :text

    t.timestamps
  end
end