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/20190905070821_change_publi...

21 lines
761 B

class ChangePublicModelDefaultValue < ActiveRecord::Migration[5.2]
def change
#试卷的默认值的修改
change_column_default :exercises,:show_result,0
change_column_default :exercises, :answer_open, false
change_column_default :exercises, :score_open, false
#问卷的默认值的修改
change_column_default :polls, :show_result, 0
#实训作业/普通作业/分组作业
change_column_default :homework_commons, :score_open, false
change_column_default :homework_commons, :work_public, false
change_column_default :homework_commons, :answer_public, false
#毕设任务
change_column_default :graduation_tasks, :open_score, false
change_column_default :graduation_tasks, :open_work, false
end
end