From: Alex S Date: Wed, 17 Apr 2019 07:24:11 +0000 (+0700) Subject: removing useless transaction X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=58711a79d0cc58b9a19c15b7abd2e6ec1b8b5c41;p=akkoma removing useless transaction --- diff --git a/priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs b/priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs index c30c302f7..09f02c223 100644 --- a/priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs +++ b/priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs @@ -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