database
This commit is contained in:
parent
b47bac67ca
commit
dda1fca264
4 changed files with 95 additions and 0 deletions
20
Femto.Database/Migrations/20250517195751_InitAuthn.sql
Normal file
20
Femto.Database/Migrations/20250517195751_InitAuthn.sql
Normal file
|
@ -0,0 +1,20 @@
|
|||
-- Migration: InitAuthn
|
||||
-- Created at: 17/05/2025 19:57:51
|
||||
|
||||
CREATE SCHEMA authn;
|
||||
|
||||
CREATE TABLE authn.user_identity
|
||||
(
|
||||
id uuid PRIMARY KEY,
|
||||
username text NOT NULL UNIQUE,
|
||||
|
||||
password_hash bytea,
|
||||
password_salt bytea
|
||||
);
|
||||
|
||||
CREATE TABLE authn.user_session
|
||||
(
|
||||
id varchar(256) PRIMARY KEY,
|
||||
user_id uuid NOT NULL REFERENCES authn.user_identity (id) ON DELETE CASCADE,
|
||||
expires timestamptz NOT NULL
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue