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/20190415090426_change_homew...

14 lines
555 B

class ChangeHomeworkCommonColumns < ActiveRecord::Migration[5.2]
def up
change_column :homework_commons, :score_open, :boolean, default: 1
change_column :homework_commons, :anonymous_comment, :boolean, default: 1
change_column :homework_commons, :anonymous_appeal, :boolean, default: 0
end
def down
change_column :homework_commons, :score_open, :int, default: 1
change_column :homework_commons, :anonymous_comment, :int, default: 1
change_column :homework_commons, :anonymous_appeal, :int, default: 0
end
end