chore: heygermany customer project
Some checks failed
Main / Setup and Test (push) Has been cancelled
Main / Build Website (push) Has been cancelled

This commit is contained in:
e2e
2026-07-11 10:35:04 +02:00
commit 3bb535efe8
394 changed files with 38048 additions and 0 deletions

26
db/postgres/0002-user.sql Normal file
View File

@@ -0,0 +1,26 @@
CREATE SCHEMA IF NOT EXISTS app;
CREATE OR REPLACE FUNCTION app.update_lastupdated_timestamp()
RETURNS TRIGGER AS $$
BEGIN
NEW.last_updated_at = now();
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
CREATE TABLE app.user (
user_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email VARCHAR NOT NULL,
name VARCHAR NOT NULL,
email_verified_at TIMESTAMP,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
last_updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE app.user_auth (
user_id UUID PRIMARY KEY REFERENCES app.user(user_id),
access_token VARCHAR NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
last_updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);