Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85710264
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/priv/repo/migrations/20191029101340_migrate_missing_follow_requests.exs b/priv/repo/migrations/20191029101340_migrate_missing_follow_requests.exs
index 1b2666f3a..90b18efc8 100644
--- a/priv/repo/migrations/20191029101340_migrate_missing_follow_requests.exs
+++ b/priv/repo/migrations/20191029101340_migrate_missing_follow_requests.exs
@@ -1,35 +1,35 @@
-defmodule Pleroma.Repo.Migrations.MigrateFollowingRelationships do
+defmodule Pleroma.Repo.Migrations.MigrateMissingFollowingRelationships do
use Ecto.Migration
def change do
execute(import_pending_follows_from_activities(), "")
end
defp import_pending_follows_from_activities do
"""
INSERT INTO
following_relationships (
follower_id,
following_id,
state,
inserted_at,
updated_at
)
SELECT
followers.id,
following.id,
activities.data ->> 'state',
(activities.data ->> 'published') :: timestamp,
now()
FROM
activities
JOIN users AS followers ON (activities.actor = followers.ap_id)
JOIN users AS following ON (activities.data ->> 'object' = following.ap_id)
WHERE
activities.data ->> 'type' = 'Follow'
AND activities.data ->> 'state' = 'pending'
ORDER BY activities.updated_at DESC
ON CONFLICT DO NOTHING
"""
end
end
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Sep 18, 11:08 PM (3 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1768434
Default Alt Text
(1 KB)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment