From af3952cbe6d1cd441fb35f1b6d76ab35a6f097e2 Mon Sep 17 00:00:00 2001 From: antifallobst Date: Sun, 31 Mar 2024 23:40:07 +0200 Subject: [PATCH] fix(client >> storage): fixed sql query to enable entry overriding --- client/src/storage/standard.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/storage/standard.rs b/client/src/storage/standard.rs index 483f743..308e972 100644 --- a/client/src/storage/standard.rs +++ b/client/src/storage/standard.rs @@ -53,7 +53,7 @@ impl Storage for StandardStorage { return Err(StorageError::IdCollision(id.to_string())); } - sqlx::query(r#"INSERT INTO Entries VALUES (?, ?);"#) + sqlx::query(r#"INSERT OR REPLACE INTO Entries VALUES (?, ?);"#) .bind(id) .bind(&data) .execute(&self.pool)