add create signup code

This commit is contained in:
john 2025-05-18 19:11:43 +02:00
parent 161dcf7cab
commit fbc6f562e3
9 changed files with 105 additions and 2 deletions

View file

@ -0,0 +1,14 @@
-- Migration: InitSignupCode
-- Created at: 18/05/2025 16:30:39
CREATE TABLE authn.signup_code
(
code varchar(32) PRIMARY KEY,
recipient_email TEXT NOT NULL,
recipient_name TEXT NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
expires_at TIMESTAMPTZ,
-- we don't make this a foreign key as we don't really need it for lookups,
-- and should the redeeming user delete be deleted, it's better that we keep the ID here
redeeming_user_id UUID
);