20190307234537_add_approved_to_users.rb 337 B

123456789101112131415161718192021
  1. # frozen_string_literal: true
  2. class AddApprovedToUsers < ActiveRecord::Migration[5.2]
  3. disable_ddl_transaction!
  4. def up
  5. safety_assured do
  6. add_column(
  7. :users,
  8. :approved,
  9. :bool,
  10. null: false,
  11. default: true
  12. )
  13. end
  14. end
  15. def down
  16. remove_column :users, :approved
  17. end
  18. end