mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 16:41:36 +01:00
Fix syntax error in grouped notifications CTE on some PostgreSQL versions (#31098)
This commit is contained in:
parent
0397df9bef
commit
2774980589
1 changed files with 2 additions and 2 deletions
|
@ -149,7 +149,7 @@ class Notification < ApplicationRecord
|
|||
.with_recursive(
|
||||
grouped_notifications: [
|
||||
query
|
||||
.select('notifications.*', "ARRAY[COALESCE(notifications.group_key, 'ungrouped-' || notifications.id)] groups")
|
||||
.select('notifications.*', "ARRAY[COALESCE(notifications.group_key, 'ungrouped-' || notifications.id)] AS groups")
|
||||
.limit(1),
|
||||
query
|
||||
.joins('CROSS JOIN grouped_notifications')
|
||||
|
@ -177,7 +177,7 @@ class Notification < ApplicationRecord
|
|||
.with_recursive(
|
||||
grouped_notifications: [
|
||||
query
|
||||
.select('notifications.*', "ARRAY[COALESCE(notifications.group_key, 'ungrouped-' || notifications.id)] groups")
|
||||
.select('notifications.*', "ARRAY[COALESCE(notifications.group_key, 'ungrouped-' || notifications.id)] AS groups")
|
||||
.limit(1),
|
||||
query
|
||||
.joins('CROSS JOIN grouped_notifications')
|
||||
|
|
Loading…
Reference in a new issue