docs(brain): update second brain with postgres multi-tenancy ADR
This commit is contained in:
12
.brain/postgres-multi-tenant.md
Normal file
12
.brain/postgres-multi-tenant.md
Normal 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`.
|
||||
Reference in New Issue
Block a user