From 825131e20e840879d8e720c305ca6a5b270f559e Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Thu, 5 Sep 2019 15:32:31 +0800 Subject: [PATCH] change_course_public_default --- ...70821_change_public_model_default_value.rb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 db/migrate/20190905070821_change_public_model_default_value.rb diff --git a/db/migrate/20190905070821_change_public_model_default_value.rb b/db/migrate/20190905070821_change_public_model_default_value.rb new file mode 100644 index 000000000..09d4af61a --- /dev/null +++ b/db/migrate/20190905070821_change_public_model_default_value.rb @@ -0,0 +1,20 @@ +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