Remove add_column_with_default
migration helper (#28654)
This commit is contained in:
parent
36b46ea3b5
commit
ea1c0feb86
29 changed files with 37 additions and 188 deletions
|
@ -1,10 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
|
||||
|
||||
class RemoveWholeWordFromCustomFilters < ActiveRecord::Migration[6.1]
|
||||
include Mastodon::MigrationHelpers
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
|
@ -15,7 +11,7 @@ class RemoveWholeWordFromCustomFilters < ActiveRecord::Migration[6.1]
|
|||
|
||||
def down
|
||||
safety_assured do
|
||||
add_column_with_default :custom_filters, :whole_word, :boolean, default: true, allow_null: false
|
||||
add_column :custom_filters, :whole_word, :boolean, default: true, null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
|
||||
|
||||
class RemoveIrreversibleFromCustomFilters < ActiveRecord::Migration[6.1]
|
||||
include Mastodon::MigrationHelpers
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
|
@ -15,7 +11,7 @@ class RemoveIrreversibleFromCustomFilters < ActiveRecord::Migration[6.1]
|
|||
|
||||
def down
|
||||
safety_assured do
|
||||
add_column_with_default :custom_filters, :irreversible, :boolean, allow_null: false, default: false
|
||||
add_column :custom_filters, :irreversible, :boolean, null: false, default: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue