From 3a4de13528fc85dcbe6bc9055d97ba5cc87f5712 Mon Sep 17 00:00:00 2001 From: benj Date: Thu, 8 Dec 2022 11:16:32 -0800 Subject: update schema to `secd` add dummy `dev` command to cli --- .../store/pg/migrations/20221116062550_bootstrap.sql | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'crates/secd/store/pg/migrations') diff --git a/crates/secd/store/pg/migrations/20221116062550_bootstrap.sql b/crates/secd/store/pg/migrations/20221116062550_bootstrap.sql index 7a1bf07..3f5fb40 100644 --- a/crates/secd/store/pg/migrations/20221116062550_bootstrap.sql +++ b/crates/secd/store/pg/migrations/20221116062550_bootstrap.sql @@ -1,8 +1,8 @@ create extension if not exists pgcrypto; create extension if not exists citext; -create schema if not exists auth; +create schema if not exists secd; -create table if not exists auth.identity ( +create table if not exists secd.identity ( identity_id bigserial primary key , identity_public_id uuid , data text @@ -10,24 +10,24 @@ create table if not exists auth.identity ( , unique(identity_public_id) ); -create table if not exists auth.email ( +create table if not exists secd.email ( email_id bigserial primary key , address text not null , unique(address) ); -create table if not exists auth.identity_email ( +create table if not exists secd.identity_email ( identity_email_id bigserial primary key - , identity_id bigint not null references auth.identity(identity_id) - , email_id bigint not null references auth.email(email_id) + , identity_id bigint not null references secd.identity(identity_id) + , email_id bigint not null references secd.email(email_id) , created_at timestamptz not null , deleted_at timestamptz ); -create table if not exists auth.email_validation ( +create table if not exists secd.email_validation ( email_validation_id bigserial primary key , email_validation_public_id uuid not null - , identity_email_id integer not null references auth.identity_email(identity_email_id) + , identity_email_id integer not null references secd.identity_email(identity_email_id) , attempts integer not null , code text , is_validated boolean not null default false @@ -37,9 +37,9 @@ create table if not exists auth.email_validation ( , unique(email_validation_public_id) ); -create table if not exists auth.session ( +create table if not exists secd.session ( session_id bigserial primary key - , identity_id bigint not null references auth.identity(identity_id) + , identity_id bigint not null references secd.identity(identity_id) , secret_hash bytea not null , created_at timestamptz not null , touched_at timestamptz not null -- cgit v1.2.3