Merge develop
This commit is contained in:
commit
8a383707ae
138 changed files with 2976 additions and 1977 deletions
|
|
@ -32,9 +32,13 @@ defmodule Pleroma.Repo.Migrations.UpdateMarkers do
|
|||
|> Map.put_new(:updated_at, now)
|
||||
end)
|
||||
|
||||
Repo.insert_all("markers", markers_attrs,
|
||||
on_conflict: {:replace, [:last_read_id]},
|
||||
conflict_target: [:user_id, :timeline]
|
||||
)
|
||||
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]
|
||||
)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ defmodule Pleroma.Repo.Migrations.InsertSkeletonsForDeletedUsers do
|
|||
Repo,
|
||||
"select distinct unnest(nonexistent_locals.recipients) from activities, lateral (select array_agg(recipient) as recipients from unnest(activities.recipients) as recipient where recipient similar to '#{
|
||||
instance_uri
|
||||
}/users/[A-Za-z0-9]*' and not(recipient in (select ap_id from users where local = true))) nonexistent_locals;",
|
||||
}/users/[A-Za-z0-9]*' and not(recipient in (select ap_id from users))) nonexistent_locals;",
|
||||
[],
|
||||
timeout: :infinity
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue