Skip to content

Commit

Permalink
Fix: upsert source_url also in upsert_data_source_node (#9970)
Browse files Browse the repository at this point in the history
Description
---
Fixes an omission of PR #9883

Risks
---
low

Deploy
---
core
  • Loading branch information
philipperolet authored Jan 14, 2025
1 parent 0af896f commit 06c378e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/src/stores/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ impl PostgresStore {
let stmt = tx
.prepare(
"INSERT INTO data_sources_nodes \
(id, data_source, created, node_id, timestamp, title, mime_type, parents, \
(id, data_source, created, node_id, timestamp, title, mime_type, parents, source_url, \
document, \"table\", folder) \
VALUES (DEFAULT, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10) \
VALUES (DEFAULT, $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) \
ON CONFLICT (data_source, node_id) DO UPDATE \
SET timestamp = EXCLUDED.timestamp, title = EXCLUDED.title, \
mime_type = EXCLUDED.mime_type, parents = EXCLUDED.parents, \
document = EXCLUDED.document, \"table\" = EXCLUDED.\"table\", \
folder = EXCLUDED.folder \
folder = EXCLUDED.folder, source_url = EXCLUDED.source_url \
RETURNING id",
)
.await?;
Expand All @@ -189,6 +189,7 @@ impl PostgresStore {
&upsert_params.title,
&upsert_params.mime_type,
&upsert_params.parents,
&upsert_params.source_url,
&document_row_id,
&table_row_id,
&folder_row_id,
Expand Down

0 comments on commit 06c378e

Please sign in to comment.