From c2268c285648ef02ece04de0d9df0813c6d70ff8 Mon Sep 17 00:00:00 2001
From: benj <benj@rse8.com>
Date: Sat, 24 Dec 2022 00:43:38 -0800
Subject: refactor everything with more abstraction and a nicer interface

---
 crates/secd/store/pg/sql/write_identity.sql | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

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

diff --git a/crates/secd/store/pg/sql/write_identity.sql b/crates/secd/store/pg/sql/write_identity.sql
index 94a51fe..67662a6 100644
--- a/crates/secd/store/pg/sql/write_identity.sql
+++ b/crates/secd/store/pg/sql/write_identity.sql
@@ -1,11 +1,12 @@
 insert into secd.identity (
-       identity_public_id,
-       data,
-       created_at
+       identity_public_id
+       , data
+       , created_at
+       , updated_at
+       , deleted_at
 ) values (
-       $1,
-       $2,
-       $3
-) on conflict(identity_public_id) do update
+  $1, $2::jsonb, $3, $4, $5
+) on conflict (identity_public_id) do update
   set data = excluded.data
+      , updated_at = excluded.updated_at
       , deleted_at = excluded.deleted_at;
-- 
cgit v1.2.3

