Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Jan 12, 2024
1 parent 93fe070 commit bd40486
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Antenna < ApplicationRecord

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
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20230911022527_add_ltl_to_antennas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class StatusReference < ApplicationRecord; end

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
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20231001031337_add_quote_to_statuses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class StatusReference < ApplicationRecord

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|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ 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

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
2 changes: 1 addition & 1 deletion db/migrate/20231028005948_add_notify_to_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def up

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'")
Expand Down
4 changes: 2 additions & 2 deletions db/migrate/20231115001356_add_inbox_url_to_conversations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bd40486

Please sign in to comment.