class MigrateDisciplinesDefault < ActiveRecord::Migration[5.2] def change change_column_default :disciplines, :subject, from: nil, to: 1 change_column_default :disciplines, :shixun, from: nil, to: 1 change_column_default :disciplines, :question, from: nil, to: 1 change_column_default :sub_disciplines, :subject, from: nil, to: 1 change_column_default :sub_disciplines, :shixun, from: nil, to: 1 change_column_default :sub_disciplines, :question, from: nil, to: 1 change_column_default :tag_disciplines, :subject, from: nil, to: 1 change_column_default :tag_disciplines, :shixun, from: nil, to: 1 change_column_default :tag_disciplines, :question, from: nil, to: 1 end end