diff options
author | feld <feld@feld.me> | 2024-02-12 19:37:17 +0000 |
---|---|---|
committer | feld <feld@feld.me> | 2024-02-12 19:37:17 +0000 |
commit | 769e02d0de48484d9396fadb030bf5f708f4fd84 (patch) | |
tree | e338311cdb2a4764704dd91bac78fb8f55ce665a | |
parent | 991807080bfb35caf32f2403d61dd6ced66a9a50 (diff) | |
parent | cb4d3db8c69104960f18be740cb7253add8c00e4 (diff) | |
download | pleroma-769e02d0de48484d9396fadb030bf5f708f4fd84.tar.gz pleroma-769e02d0de48484d9396fadb030bf5f708f4fd84.zip |
Merge branch 'notifications-query' into 'develop'
Fix notifications query to use the index
See merge request pleroma/pleroma!4058
-rw-r--r-- | changelog.d/.search_config.fix.swp | bin | 0 -> 12288 bytes | |||
-rw-r--r-- | changelog.d/notifications-index.fix | 1 | ||||
-rw-r--r-- | lib/pleroma/notification.ex | 2 |
3 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/.search_config.fix.swp b/changelog.d/.search_config.fix.swp Binary files differnew file mode 100644 index 000000000..e310fa87e --- /dev/null +++ b/changelog.d/.search_config.fix.swp diff --git a/changelog.d/notifications-index.fix b/changelog.d/notifications-index.fix new file mode 100644 index 000000000..4617cbec0 --- /dev/null +++ b/changelog.d/notifications-index.fix @@ -0,0 +1 @@ +Fix notifications query which was not using the index properly diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index 48d467c59..368e609d2 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -88,7 +88,7 @@ defmodule Pleroma.Notification do where: q.seen == true, select: type(q.id, :string), limit: 1, - order_by: [desc: :id] + order_by: fragment("? desc nulls last", q.id) ) end |