docs(brain): update second brain with postgres multi-tenancy ADR

This commit is contained in:
DanielS
2026-08-19 00:04:50 +02:00
parent 6a2ebd25a2
commit 0ef67e13a2
3 changed files with 34 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
# PostgreSQL 16 Hybrid Multi-Tenant Setup
## Architektur Overview
- **Docker Setup**: PostgreSQL 16 Alpine via Docker Compose.
- **Rollen-Isolation**: `app_user` (DML) & `migration_user` (DDL).
- **Master Schema**: `tenants` Tabelle in `V1__init_master_schema.sql`.
- **Tenant Schemas**: `dining_areas`, `restaurant_tables`, `guests`, `reservations`, `reservation_table_assignments`, `staff_users` in `V1__init_tenant_schema.sql`.
## Backend Integration
- `TenantContext` (ThreadLocal Schema Resolver)
- `SchemaBasedMultiTenantConnectionProvider` (Hibernate Connection Handling)
- HikariCP Connection Pool optimiert für Postgres in `application.yml`.