Class: AddCorrectAnswerIdToQuestions

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/surveyor/templates/db/migrate/add_correct_answer_id_to_questions.rb

Class Method Summary collapse

Class Method Details

.downObject



7
8
9
# File 'lib/generators/surveyor/templates/db/migrate/add_correct_answer_id_to_questions.rb', line 7

def self.down
  remove_column :questions, :correct_answer_id
end

.upObject



3
4
5
# File 'lib/generators/surveyor/templates/db/migrate/add_correct_answer_id_to_questions.rb', line 3

def self.up
  add_column :questions, :correct_answer_id, :integer
end