From 58711a79d0cc58b9a19c15b7abd2e6ec1b8b5c41 Mon Sep 17 00:00:00 2001 From: Alex S Date: Wed, 17 Apr 2019 14:24:11 +0700 Subject: [PATCH] removing useless transaction --- .../20190414125034_migrate_old_bookmarks.exs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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