tsk-50: Create Special endpoint for services to obtain a token #53

Merged
phoenix merged 19 commits from tsk-50 into devel 2025-08-03 23:09:51 +00:00
4 changed files with 36 additions and 0 deletions
Showing only changes of commit c31743eed1 - Show all commits

View File

@@ -0,0 +1,4 @@
-- Add down migration script here
DROP TABLE IF EXISTS "user";
DROP TABLE IF EXISTS "salt";
DROP TABLE IF EXISTS "passphrase";

View File

@@ -0,0 +1,28 @@
-- Add up migration script here
CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE TABLE IF NOT EXISTS "user" (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
username TEXT NOT NULL,
password TEXT NOT NULL,
email TEXT NOT NULL,
phone TEXT NOT NULL,
firstname TEXT NOT NULL,
lastname TEXT NOT NULL,
email_verified BOOL NOT NULL,
date_created TIMESTAMPTZ NOT NULL DEFAULT NOW(),
status TEXT NOT NULL,
last_login TIMESTAMPTZ NULL DEFAULT NOW(),
salt_id UUID NOT NULL
);
CREATE TABLE IF NOT EXISTS "salt" (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
salt TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS "passphrase" (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
passphrase TEXT NOT NULL,
date_created TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

View File

@@ -0,0 +1,2 @@
-- Add down migration script here
DELETE FROM "passphrase";

View File

@@ -0,0 +1,2 @@
-- Add up migration script here
INSERT INTO "passphrase" (passphrase) VALUES('Hg3TWfAT8pEiW6fZGhQKXICkZ246EzrE8Bx26O9iEKmQkbpzlFJTOW8UwSf09oak');