removing useless transaction

This commit is contained in:
Alex S 2019-04-17 14:24:11 +07:00
parent 6322c1e123
commit 58711a79d0
1 changed files with 5 additions and 7 deletions

View File

@ -14,7 +14,6 @@ def up do
select: %{id: u.id, old_bookmarks: u.old_bookmarks} select: %{id: u.id, old_bookmarks: u.old_bookmarks}
) )
Repo.transaction(fn ->
Repo.stream(query) Repo.stream(query)
|> Enum.each(fn user -> |> Enum.each(fn user ->
Enum.each(user.old_bookmarks, fn id -> Enum.each(user.old_bookmarks, fn id ->
@ -22,7 +21,6 @@ def up do
{:ok, _} = Bookmark.create(user.id, activity.id) {:ok, _} = Bookmark.create(user.id, activity.id)
end) end)
end) end)
end)
end end
def down do def down do