mirror of
https://github.com/aljazceru/plugins.git
synced 2026-01-08 15:54:20 +01:00
historian: Remove DATETIME conversion and add timestamp to grouping
Postgres requires the HAVING statement to match a GROUP BY statement and the DATETIME function doesn't exist on postgres.
This commit is contained in:
@@ -117,7 +117,7 @@ WHERE
|
||||
FROM
|
||||
channel_updates u
|
||||
WHERE
|
||||
u.timestamp >= DATETIME('{}')
|
||||
u.timestamp >= '{}'
|
||||
GROUP BY
|
||||
u.scid
|
||||
)
|
||||
@@ -159,9 +159,10 @@ SELECT
|
||||
FROM
|
||||
node_announcements n
|
||||
WHERE
|
||||
n.timestamp >= DATETIME('{}')
|
||||
n.timestamp >= '{}'
|
||||
GROUP BY
|
||||
n.node_id
|
||||
n.node_id,
|
||||
n.timestamp
|
||||
HAVING
|
||||
n.timestamp = MAX(n.timestamp)
|
||||
ORDER BY timestamp DESC
|
||||
|
||||
Reference in New Issue
Block a user