socialforge/db/migrate/20161228070235_change_work_...

13 lines
327 B
Ruby
Raw Normal View History

2016-12-30 10:30:21 +08:00
class ChangeWorkColumn < ActiveRecord::Migration
def up
change_column :works, :score_open, :boolean, :default => false
add_column :works, :online_evaluation, :boolean, :default => false
add_column :works, :score_valid, :boolean, :default => true
Work.update_all(:score_open => 0)
end
def down
end
end