Skip to content
Snippets Groups Projects
Commit 58711a79 authored by Alexander Strizhakov's avatar Alexander Strizhakov
Browse files

removing useless transaction

parent 6322c1e1
No related branches found
No related tags found
No related merge requests found
......@@ -14,13 +14,11 @@ defmodule Pleroma.Repo.Migrations.MigrateOldBookmarks do
select: %{id: u.id, old_bookmarks: u.old_bookmarks}
)
Repo.transaction(fn ->
Repo.stream(query)
|> Enum.each(fn user ->
Enum.each(user.old_bookmarks, fn id ->
activity = Activity.get_create_by_object_ap_id(id)
{:ok, _} = Bookmark.create(user.id, activity.id)
end)
Repo.stream(query)
|> Enum.each(fn user ->
Enum.each(user.old_bookmarks, fn id ->
activity = Activity.get_create_by_object_ap_id(id)
{:ok, _} = Bookmark.create(user.id, activity.id)
end)
end)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment