From: Egor Kislitsyn Date: Mon, 14 Oct 2019 07:16:57 +0000 (+0700) Subject: Skip deactivated users in followers import X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=8ad015ef64e0d2a4cd9f2979ff08d28be3a635e5;p=akkoma Skip deactivated users in followers import --- diff --git a/priv/repo/migrations/20191008132217_migrate_following_relationships.exs b/priv/repo/migrations/20191008132217_migrate_following_relationships.exs index 7f996f5a5..c9bc890aa 100644 --- a/priv/repo/migrations/20191008132217_migrate_following_relationships.exs +++ b/priv/repo/migrations/20191008132217_migrate_following_relationships.exs @@ -55,6 +55,7 @@ defmodule Pleroma.Repo.Migrations.MigrateFollowingRelationships do WHERE activities.data ->> 'type' = 'Follow' AND activities.data ->> 'state' IN ('accept', 'pending', 'reject') + AND NOT (followers.info ? 'deactivated' AND followers.info -> 'deactivated' @> 'true') ORDER BY activities.updated_at DESC ON CONFLICT DO NOTHING """