Fix syntax error in grouped notifications CTE on some PostgreSQL versions (#31098)

pull/2788/head^2
Claire 2024-07-22 09:37:27 +02:00 committed by GitHub
parent 0397df9bef
commit 2774980589
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ class Notification < ApplicationRecord
.with_recursive( .with_recursive(
grouped_notifications: [ grouped_notifications: [
query 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), .limit(1),
query query
.joins('CROSS JOIN grouped_notifications') .joins('CROSS JOIN grouped_notifications')
@ -177,7 +177,7 @@ class Notification < ApplicationRecord
.with_recursive( .with_recursive(
grouped_notifications: [ grouped_notifications: [
query 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), .limit(1),
query query
.joins('CROSS JOIN grouped_notifications') .joins('CROSS JOIN grouped_notifications')