aboutsummaryrefslogtreecommitdiff
path: root/crates/secd/store/sqlite/sql/write_credential.sql
blob: 06cb389693962f327713b136cf9bb312be58c698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
insert into credential (
       credential_public_id
       , identity_id
       , partial_key
       , type
       , data
       , created_at
       , revoked_at
       , deleted_at
) values (
       $1
       , (select identity_id from identity where identity_public_id = $2)
       , $3
       , $4
       , $5
       , $6
       , $7
       , $8
) on conflict (partial_key) do update
  set revoked_at = excluded.revoked_at
      , deleted_at = excluded.deleted_at;