Skip deactivated users in followers import

This commit is contained in:
Egor Kislitsyn 2019-10-14 14:16:57 +07:00
parent 1d46944fbd
commit 8ad015ef64
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805

View file

@ -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
"""