mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-17 23:38:19 +00:00
removing useless transaction
This commit is contained in:
parent
6322c1e123
commit
58711a79d0
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue