aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-12-20 20:39:02 -0600
committerAlex Gleason <alex@alexgleason.me>2021-12-20 20:39:02 -0600
commit79c7ba7f5d74596c6e2ef741b17e23e731cd5b8a (patch)
treefed971da215c2c7d10f9ce776a785aeb52b47c5c
parent0f81adf4486a76772dd2bed0a3671f3604c1e31b (diff)
downloadpleroma-79c7ba7f5d74596c6e2ef741b17e23e731cd5b8a.tar.gz
thread_visibility(): a JOIN on objects is no longer needed
-rw-r--r--priv/repo/migrations/20211218181647_add_activity_fields_to_objects.exs2
1 files changed, 0 insertions, 2 deletions
diff --git a/priv/repo/migrations/20211218181647_add_activity_fields_to_objects.exs b/priv/repo/migrations/20211218181647_add_activity_fields_to_objects.exs
index b003fe814..8c9fd42d4 100644
--- a/priv/repo/migrations/20211218181647_add_activity_fields_to_objects.exs
+++ b/priv/repo/migrations/20211218181647_add_activity_fields_to_objects.exs
@@ -91,7 +91,6 @@ defmodule Pleroma.Repo.Migrations.AddActivityFieldsToObjects do
--- Normalize the child object into child.
SELECT * INTO child FROM objects
- INNER JOIN objects ON COALESCE(objects.data->'object'->>'id', objects.data->>'object') = objects.data->>'id'
WHERE COALESCE(object.data->'object'->>'id', object.data->>'object') = objects.data->>'id';
--- Fetch the author's AS2 following collection.
@@ -112,7 +111,6 @@ defmodule Pleroma.Repo.Migrations.AddActivityFieldsToObjects do
--- If there's a parent, load it and do this all over again.
IF (child.data->'inReplyTo' IS NOT NULL) AND (child.data->'inReplyTo' != 'null'::jsonb) THEN
SELECT * INTO object FROM objects
- INNER JOIN objects ON COALESCE(objects.data->'object'->>'id', objects.data->>'object') = objects.data->>'id'
WHERE child.data->>'inReplyTo' = objects.data->>'id';
ELSE
RETURN true;