From 0920c4d4f30a3345870d385d5c6f3e0919228b56 Mon Sep 17 00:00:00 2001
From: benj <benj@rse8.com>
Date: Mon, 12 Dec 2022 17:06:57 -0800
Subject: (oauth2 + email added): a mess that may or may not really work and
 needs to be refactored...

---
 crates/secd/store/sqlite/sql/write_identity.sql | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

(limited to 'crates/secd/store/sqlite/sql/write_identity.sql')

diff --git a/crates/secd/store/sqlite/sql/write_identity.sql b/crates/secd/store/sqlite/sql/write_identity.sql
index ff54468..8cf46c5 100644
--- a/crates/secd/store/sqlite/sql/write_identity.sql
+++ b/crates/secd/store/sqlite/sql/write_identity.sql
@@ -1 +1,11 @@
-insert into identity (identity_public_id, data, created_at) values (?1, ?2, ?3);
+insert into identity (
+       identity_public_id,
+       data,
+       created_at
+) values (
+       ?1,
+       ?2,
+       ?3
+) on conflict(identity_public_id) do update
+  set data = excluded.data
+      , deleted_at = excluded.deleted_at;
-- 
cgit v1.2.3

