Show More
Commit Description:
update migration
Commit Description:
update migration
File last commit:
Show/Diff file:
Action:
db/migrate/029_add_test_allowed_to_problems.rb | 15 lines | 335 B | text/x-ruby | RubyLexer |
class AddTestAllowedToProblems < ActiveRecord::Migration[4.2]
def self.up
add_column :problems, :test_allowed, :boolean
Problem.reset_column_information
Problem.all.each do |problem|
problem.test_allowed = true
problem.save
end
end
def self.down
remove_column :problems, :test_allowed
end
end