tsk-50: Create Special endpoint for services to obtain a token #53
4
test_migrations/20250802185608_init.down.sql
Normal file
4
test_migrations/20250802185608_init.down.sql
Normal 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";
|
28
test_migrations/20250802185608_init.up.sql
Normal file
28
test_migrations/20250802185608_init.up.sql
Normal 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()
|
||||||
|
);
|
2
test_migrations/20250802190131_passphrase_data.down.sql
Normal file
2
test_migrations/20250802190131_passphrase_data.down.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
-- Add down migration script here
|
||||||
|
DELETE FROM "passphrase";
|
2
test_migrations/20250802190131_passphrase_data.up.sql
Normal file
2
test_migrations/20250802190131_passphrase_data.up.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
-- Add up migration script here
|
||||||
|
INSERT INTO "passphrase" (passphrase) VALUES('Hg3TWfAT8pEiW6fZGhQKXICkZ246EzrE8Bx26O9iEKmQkbpzlFJTOW8UwSf09oak');
|
Reference in New Issue
Block a user