From 5d89a0ff83aab5cd439a94cff5921c2b42065e2d Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 30 Dec 2021 10:47:05 -0600 Subject: CombineActivitiesAndObjects: ON CONFLICT DO NOTHING Apparently some AP servers like WordPress will use the same AP ID for Create and Note. This is invalid in ActivityPub so we'll skip them. A small price to pay. https://github.com/pfefferle/wordpress-activitypub/issues/135 --- priv/repo/migrations/20211218181647_combine_activities_and_objects.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/priv/repo/migrations/20211218181647_combine_activities_and_objects.exs b/priv/repo/migrations/20211218181647_combine_activities_and_objects.exs index 846a2a71c..478ee5a57 100644 --- a/priv/repo/migrations/20211218181647_combine_activities_and_objects.exs +++ b/priv/repo/migrations/20211218181647_combine_activities_and_objects.exs @@ -24,7 +24,7 @@ defmodule Pleroma.Repo.Migrations.CombineActivitiesAndObjects do ) # Copy all activities into the newly formatted objects table - execute("INSERT INTO objects (SELECT * FROM activities)") + execute("INSERT INTO objects (SELECT * FROM activities) ON CONFLICT DO NOTHING") # Update notifications foreign key execute("alter table notifications drop constraint notifications_activity_id_fkey") -- cgit v1.2.3