aboutsummaryrefslogtreecommitdiff
path: root/crates/secd/store/sqlite/migrations
diff options
context:
space:
mode:
authorbenj <benj@rse8.com>2023-04-24 13:24:45 -0700
committerbenj <benj@rse8.com>2023-04-24 13:24:45 -0700
commiteb92f823c31a5e702af7005231f0d6915aad3342 (patch)
treebb624786a47accb2dfcfe95d20c00c9624c28a9c /crates/secd/store/sqlite/migrations
parent176aae037400b43cb3971cd968afe59c73b3097a (diff)
downloadsecdiam-eb92f823c31a5e702af7005231f0d6915aad3342.tar
secdiam-eb92f823c31a5e702af7005231f0d6915aad3342.tar.gz
secdiam-eb92f823c31a5e702af7005231f0d6915aad3342.tar.bz2
secdiam-eb92f823c31a5e702af7005231f0d6915aad3342.tar.lz
secdiam-eb92f823c31a5e702af7005231f0d6915aad3342.tar.xz
secdiam-eb92f823c31a5e702af7005231f0d6915aad3342.tar.zst
secdiam-eb92f823c31a5e702af7005231f0d6915aad3342.zip
email templates, sendgrid, creds, and some experimental things
Started playing with namespace configs and integrating with zanzibar impls. Still lot's of experimenting and dead code going on.
Diffstat (limited to 'crates/secd/store/sqlite/migrations')
-rw-r--r--crates/secd/store/sqlite/migrations/20221125051738_bootstrap.sql8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/secd/store/sqlite/migrations/20221125051738_bootstrap.sql b/crates/secd/store/sqlite/migrations/20221125051738_bootstrap.sql
index 299f282..b2ce45d 100644
--- a/crates/secd/store/sqlite/migrations/20221125051738_bootstrap.sql
+++ b/crates/secd/store/sqlite/migrations/20221125051738_bootstrap.sql
@@ -15,7 +15,7 @@ create table if not exists realm_data (
create table if not exists identity (
identity_id integer primary key
, identity_public_id uuid not null
- , data text -- some things are dervied, others are not
+ , data text -- we do not prescribe JSON or any other serialization format
, created_at integer not null
, updated_at integer not null
, deleted_at integer
@@ -26,14 +26,18 @@ create table if not exists credential (
credential_id integer primary key
, credential_public_id uuid not null
, identity_id integer not null references identity(identity_id)
+ , partial_key text
, type text not null-- e.g. password, oidc, totop, lookup_secret, webauthn, ...
, data text not null
- , version integer not null
, created_at integer not null
, revoked_at integer
, deleted_at integer
);
+create unique index if not exists credential_passphrase_type_key_ix
+on credential (partial_key)
+where type = 'Passphrase';
+
create table if not exists address (
address_id integer primary key
, address_public_id uuid not null