Skip to content

Commit

Permalink
Merge pull request #596 from helium/jg/fix-fix-skf-update
Browse files Browse the repository at this point in the history
correct sql update statement
  • Loading branch information
madninja authored Aug 11, 2023
2 parents d968ada + 4f7b209 commit ac4b861
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iot_config/src/route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ async fn insert_skfs(skfs: &[Skf], db: impl sqlx::PgExecutor<'_>) -> anyhow::Res
// instead of ignoring. this avoids reconciliation bugs attempting to update fields of an
// existing skf from succeeding on the HPRs but being ignored by the Config Service
const SKF_INSERT_CONFLICT: &str =
" on conflict (route_id, devaddr, session_key) update set max_copies = excluded.max_copies returning * ";
" on conflict (route_id, devaddr, session_key) do update set max_copies = excluded.max_copies returning * ";

let mut query_builder: sqlx::QueryBuilder<sqlx::Postgres> =
sqlx::QueryBuilder::new(SKF_INSERT_VALS);
Expand Down

0 comments on commit ac4b861

Please sign in to comment.