class PollQuestionMigration < ActiveRecord::Migration
def up
pqs = PollQuestion.where(:question_type => 4)
pqs.each do |pq|
if pq.poll_answers.empty?
pq.update_column("question_type", 3)
end
def down