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
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 New Issue
Block a user