mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 10:46:22 +00:00
14 lines
416 B
Ruby
14 lines
416 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
# Algunes quedaron como genéricxs
|
||
|
class RemoveActorModerations2 < ActiveRecord::Migration[6.1]
|
||
|
def up
|
||
|
actor_uris = ActivityPub::Activity.where(type: 'ActivityPub::Activity::Delete').distinct.pluck(Arel.sql("content->>'object'"))
|
||
|
actor_ids = ActivityPub::Actor.where(uri: actor_uris).ids
|
||
|
|
||
|
ActorModeration.where(actor_id: actor_ids).remove_all!
|
||
|
end
|
||
|
|
||
|
def down; end
|
||
|
end
|