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
Binary file not shown.
|
@ -0,0 +1 @@
|
||||||
|
Fix notifications query which was not using the index properly
|
|
@ -88,7 +88,7 @@ def last_read_query(user) 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