diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-12-30 10:47:05 -0600 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-12-30 10:47:05 -0600 |
commit | 5d89a0ff83aab5cd439a94cff5921c2b42065e2d (patch) | |
tree | 0d7c13555c83bbeeb067bf376a5b907b36118b73 | |
parent | 0af8adb265faa8ff123e663608675540d1f0e326 (diff) | |
download | pleroma-5d89a0ff83aab5cd439a94cff5921c2b42065e2d.tar.gz |
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
-rw-r--r-- | priv/repo/migrations/20211218181647_combine_activities_and_objects.exs | 2 |
1 files changed, 1 insertions, 1 deletions
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") |