summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20171212164525_fill_recipients_in_activities.exs
diff options
context:
space:
mode:
Diffstat (limited to 'priv/repo/migrations/20171212164525_fill_recipients_in_activities.exs')
-rw-r--r--priv/repo/migrations/20171212164525_fill_recipients_in_activities.exs8
1 files changed, 5 insertions, 3 deletions
diff --git a/priv/repo/migrations/20171212164525_fill_recipients_in_activities.exs b/priv/repo/migrations/20171212164525_fill_recipients_in_activities.exs
index 6dfa93716..db5cc2d30 100644
--- a/priv/repo/migrations/20171212164525_fill_recipients_in_activities.exs
+++ b/priv/repo/migrations/20171212164525_fill_recipients_in_activities.exs
@@ -1,3 +1,7 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Repo.Migrations.FillRecipientsInActivities do
use Ecto.Migration
alias Pleroma.{Repo, Activity}
@@ -14,9 +18,7 @@ defmodule Pleroma.Repo.Migrations.FillRecipientsInActivities do
max = min + 10_000
execute("""
- update activities set recipients = array(select jsonb_array_elements_text(data->'to')) where id > #{
- min
- } and id <= #{max};
+ update activities set recipients = array(select jsonb_array_elements_text(data->'to')) where id > #{min} and id <= #{max};
""")
|> IO.inspect()
end)