summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs12
1 files 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