You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/db/migrate/20190410033511_change_colum...

13 lines
746 B

class ChangeColumnInHomeworks < ActiveRecord::Migration[5.2]
def change
change_column_default :homework_commons, :late_penalty, from: nil, to: 5
change_column_default :homework_commons, :anonymous_comment, from: 0, to: 1
change_column_default :homework_commons, :work_efficiency, from: 1, to: 0
change_column_default :homework_commons, :eff_score, from: 20, to: 0
change_column_default :homework_detail_manuals, :ta_proportion, from: nil, to: 0
change_column_default :homework_detail_manuals, :comment_status, from: nil, to: 0
change_column_default :homework_detail_manuals, :evaluation_num, from: nil, to: 0
change_column_default :homework_detail_manuals, :absence_penalty, from: 1, to: 0
end
end