Fix test
This commit is contained in:
parent
93fe0708cd
commit
bd40486b00
10 changed files with 12 additions and 12 deletions
|
@ -12,7 +12,7 @@ class AddNoInsertFeedsToAntennas < ActiveRecord::Migration[7.0]
|
|||
|
||||
def up
|
||||
safety_assured do
|
||||
add_column_with_default :antennas, :insert_feeds, :boolean, default: false, allow_null: false
|
||||
add_column :antennas, :insert_feeds, :boolean, default: false, null: false
|
||||
Antenna.where(insert_feeds: false).update_all(insert_feeds: true)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ class AddLtlToAntennas < ActiveRecord::Migration[7.0]
|
|||
|
||||
def change
|
||||
safety_assured do
|
||||
add_column_with_default :antennas, :ltl, :boolean, default: false, allow_null: false
|
||||
add_column :antennas, :ltl, :boolean, default: false, null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@ class AddQuoteToStatusReferences < ActiveRecord::Migration[7.0]
|
|||
|
||||
def up
|
||||
safety_assured do
|
||||
add_column_with_default :status_references, :quote, :boolean, default: false, allow_null: false
|
||||
add_column :status_references, :quote, :boolean, default: false, null: false
|
||||
StatusReference.where(attribute_type: 'QT').update_all(quote: true)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@ class AddQuoteToStatuses < ActiveRecord::Migration[7.0]
|
|||
|
||||
def up
|
||||
safety_assured do
|
||||
add_column_with_default :statuses, :quote_of_id, :bigint, default: nil, allow_null: true
|
||||
add_column :statuses, :quote_of_id, :bigint, default: nil, null: true
|
||||
|
||||
StatusReference.transaction do
|
||||
StatusReference.where(quote: true).includes(:status).find_each do |ref|
|
||||
|
|
|
@ -9,7 +9,7 @@ class AddWithQuoteToCustomFilters < ActiveRecord::Migration[7.0]
|
|||
|
||||
def change
|
||||
safety_assured do
|
||||
add_column_with_default :custom_filters, :with_quote, :boolean, default: true, allow_null: false
|
||||
add_column :custom_filters, :with_quote, :boolean, default: true, null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ class AddRejectFriendToDomainBlocks < ActiveRecord::Migration[7.0]
|
|||
|
||||
def change
|
||||
safety_assured do
|
||||
add_column_with_default :domain_blocks, :reject_friend, :boolean, default: false, allow_null: false
|
||||
add_column :domain_blocks, :reject_friend, :boolean, default: false, null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ class AddDeliveryLocalToFriendDomains < ActiveRecord::Migration[7.0]
|
|||
|
||||
def up
|
||||
safety_assured do
|
||||
add_column_with_default :friend_domains, :delivery_local, :boolean, default: true, allow_null: false
|
||||
add_column :friend_domains, :delivery_local, :boolean, default: true, null: false
|
||||
remove_column :friend_domains, :unlocked
|
||||
end
|
||||
end
|
||||
|
@ -17,7 +17,7 @@ class AddDeliveryLocalToFriendDomains < ActiveRecord::Migration[7.0]
|
|||
def down
|
||||
safety_assured do
|
||||
remove_column :friend_domains, :delivery_local
|
||||
add_column_with_default :friend_domains, :unlocked, :boolean, default: false, allow_null: false
|
||||
add_column :friend_domains, :unlocked, :boolean, default: false, null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ class AddNotifyToList < ActiveRecord::Migration[7.0]
|
|||
|
||||
def change
|
||||
safety_assured do
|
||||
add_column_with_default :lists, :notify, :boolean, default: false, allow_null: false
|
||||
add_column :lists, :notify, :boolean, default: false, null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ class AddMasterSettingsToAccounts < ActiveRecord::Migration[7.1]
|
|||
|
||||
def down
|
||||
safety_assured do
|
||||
add_column_with_default :accounts, :dissubscribable, :boolean, default: false, allow_null: false
|
||||
add_column :accounts, :dissubscribable, :boolean, default: false, null: false
|
||||
|
||||
ActiveRecord::Base.connection.execute("UPDATE accounts SET dissubscribable = TRUE WHERE master_settings ->> 'subscription_policy' = 'block'")
|
||||
ActiveRecord::Base.connection.execute("UPDATE accounts SET dissubscribable = FALSE WHERE master_settings ->> 'subscription_policy' = 'allow'")
|
||||
|
|
|
@ -9,8 +9,8 @@ class AddInboxURLToConversations < ActiveRecord::Migration[7.1]
|
|||
|
||||
def change
|
||||
safety_assured do
|
||||
add_column_with_default :conversations, :inbox_url, :string, default: nil, allow_null: true
|
||||
add_column_with_default :conversations, :ancestor_status_id, :bigint, default: nil, allow_null: true
|
||||
add_column :conversations, :inbox_url, :string, default: nil, null: true
|
||||
add_column :conversations, :ancestor_status_id, :bigint, default: nil, null: true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue