5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-21 22:26:22 +00:00
panel/db/migrate/20240307201510_remove_actor_moderations.rb

13 lines
357 B
Ruby

# frozen_string_literal: true
# Mover todes les actores eliminades
class RemoveActorModerations < ActiveRecord::Migration[6.1]
def up
actor_ids =
ActivityPub.where(aasm_state: 'removed', object_type: 'ActivityPub::Object::Person').distinct.pluck(:actor_id)
ActorModeration.where(actor_id: actor_ids).remove_all!
end
def down; end
end