mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
Merge branch 'notifications-query' into 'develop'
Fix notifications query to use the index See merge request pleroma/pleroma!4058
This commit is contained in:
commit
769e02d0de
3 changed files with 2 additions and 1 deletions
BIN
changelog.d/.search_config.fix.swp
Normal file
BIN
changelog.d/.search_config.fix.swp
Normal file
Binary file not shown.
1
changelog.d/notifications-index.fix
Normal file
1
changelog.d/notifications-index.fix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Fix notifications query which was not using the index properly
|
|
@ -88,7 +88,7 @@ defmodule Pleroma.Notification do
|
||||||
where: q.seen == true,
|
where: q.seen == true,
|
||||||
select: type(q.id, :string),
|
select: type(q.id, :string),
|
||||||
limit: 1,
|
limit: 1,
|
||||||
order_by: [desc: :id]
|
order_by: fragment("? desc nulls last", q.id)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue