Update previous events SQLite insert query

This commit is contained in:
Neil Alexander 2020-09-21 13:15:14 +01:00
parent a5b4a5aca5
commit c73c239142
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -43,6 +43,8 @@ const insertPreviousEventSQL = `
INSERT OR REPLACE INTO roomserver_previous_events INSERT OR REPLACE INTO roomserver_previous_events
(previous_event_id, previous_reference_sha256, event_nids) (previous_event_id, previous_reference_sha256, event_nids)
VALUES ($1, $2, $3) VALUES ($1, $2, $3)
ON CONFLICT DO UPDATE
SET event_nids = event_nids || ',' || $3
` `
// Check if the event is referenced by another event in the table. // Check if the event is referenced by another event in the table.