This commit is contained in:
KMY 2024-12-06 12:25:12 +09:00
parent 3c3ee557d0
commit 96869333da

View file

@ -4,6 +4,9 @@ class RemoveBoostsWideningAudience < ActiveRecord::Migration[5.2]
disable_ddl_transaction! disable_ddl_transaction!
def up def up
add_column :statuses, :searchability, :integer
add_column :statuses, :limited_scope, :integer
public_boosts = Status.find_by_sql(<<-SQL.squish) public_boosts = Status.find_by_sql(<<-SQL.squish)
SELECT boost.id SELECT boost.id
FROM statuses AS boost FROM statuses AS boost
@ -17,6 +20,9 @@ class RemoveBoostsWideningAudience < ActiveRecord::Migration[5.2]
SQL SQL
RemovalWorker.push_bulk(public_boosts.pluck(:id)) RemovalWorker.push_bulk(public_boosts.pluck(:id))
remove_column :statuses, :searchability
remove_column :statuses, :limited_scope
end end
def down def down