Add configuration files, database migrations, and authentication implementation scaffolding

This commit is contained in:
Sebastian Unterschütz
2026-04-30 19:08:07 +02:00
commit 331d60581e
83 changed files with 222264 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
-- Migration: 000001_init.up.sql
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE IF NOT EXISTS encrypted_logs (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
log_type TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
encrypted_payload BYTEA NOT NULL,
blind_index_hash TEXT,
server_id TEXT NOT NULL,
session_id TEXT
);
CREATE INDEX IF NOT EXISTS idx_logs_created_at ON encrypted_logs(created_at);
CREATE INDEX IF NOT EXISTS idx_logs_blind_hash ON encrypted_logs(blind_index_hash);
CREATE TABLE IF NOT EXISTS telemetry (
timestamp TIMESTAMP WITH TIME ZONE PRIMARY KEY DEFAULT CURRENT_TIMESTAMP,
community_id TEXT NOT NULL,
server_fps DOUBLE PRECISION NOT NULL,
player_count INTEGER NOT NULL
);
CREATE INDEX IF NOT EXISTS idx_telemetry_community_id ON telemetry(community_id);