2023-07-12 07:47:08 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-07-13 01:12:25 +00:00
|
|
|
class FixNullBooleans < ActiveRecord::Migration[5.1]
|
|
|
|
def change
|
2019-12-29 04:39:08 +00:00
|
|
|
safety_assured do
|
2024-12-11 15:50:50 +00:00
|
|
|
change_column_default :domain_blocks, :reject_media, false # rubocop:disable Rails/ReversibleMigration
|
2019-12-29 04:39:08 +00:00
|
|
|
change_column_null :domain_blocks, :reject_media, false, false
|
2017-07-13 01:12:25 +00:00
|
|
|
|
2024-12-11 15:50:50 +00:00
|
|
|
change_column_default :imports, :approved, false # rubocop:disable Rails/ReversibleMigration
|
2019-12-29 04:39:08 +00:00
|
|
|
change_column_null :imports, :approved, false, false
|
2017-07-13 01:12:25 +00:00
|
|
|
|
2019-12-29 04:39:08 +00:00
|
|
|
change_column_null :statuses, :sensitive, false, false
|
|
|
|
change_column_null :statuses, :reply, false, false
|
2017-07-13 01:12:25 +00:00
|
|
|
|
2019-12-29 04:39:08 +00:00
|
|
|
change_column_null :users, :admin, false, false
|
2017-07-13 01:12:25 +00:00
|
|
|
|
2024-12-11 15:50:50 +00:00
|
|
|
change_column_default :users, :otp_required_for_login, false # rubocop:disable Rails/ReversibleMigration
|
2019-12-29 04:39:08 +00:00
|
|
|
change_column_null :users, :otp_required_for_login, false, false
|
|
|
|
end
|
2017-07-13 01:12:25 +00:00
|
|
|
end
|
|
|
|
end
|