X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=priv%2Frepo%2Fmigrations%2F20200415181818_update_markers.exs;h=bb9d8e860192d4057880dd607d013d014ce3180c;hb=cc4c5f22f4e6946c40bfc4c9517eaeb28f39a27d;hp=b7c611333020ba13a06624524e1bda7b37048c70;hpb=d8dd945a0319692b05370f16f289d8a231217ee6;p=akkoma diff --git a/priv/repo/migrations/20200415181818_update_markers.exs b/priv/repo/migrations/20200415181818_update_markers.exs index b7c611333..bb9d8e860 100644 --- a/priv/repo/migrations/20200415181818_update_markers.exs +++ b/priv/repo/migrations/20200415181818_update_markers.exs @@ -33,9 +33,9 @@ defmodule Pleroma.Repo.Migrations.UpdateMarkers do end) markers_attrs - |> Enum.chunk(1000) - |> Enum.each(fn marker_attrs -> - Repo.insert_all("markers", markers_attrs, + |> Enum.chunk_every(1000) + |> Enum.each(fn markers_attrs_chunked -> + Repo.insert_all("markers", markers_attrs_chunked, on_conflict: {:replace, [:last_read_id]}, conflict_target: [:user_id, :timeline] )