docs(brain): update second brain with postgres multi-tenancy ADR
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# ADR 001: PostgreSQL 16 Hybrid Multi-Tenant Architektur
|
||||
|
||||
## Status
|
||||
Akzeptiert
|
||||
|
||||
## Kontext
|
||||
Gastro-SaaS Tischreservierung benötigt strenge Mandantentrennung bei hoher Performance.
|
||||
|
||||
## Entscheidung
|
||||
- Nutzung von PostgreSQL 16 Schema-basierter Multi-Tenancy.
|
||||
- Master-Schema (`public` / `tenants` Tabelle) für Mandantenverwaltung.
|
||||
- Eigene Schemas pro Tenant (`tenant_<id>`) für operative Daten (`reservations`, `restaurant_tables`, `guests`).
|
||||
- Spring Boot 3 `SchemaBasedMultiTenantConnectionProvider` & `CurrentTenantIdentifierResolver`.
|
||||
|
||||
## Konsequenzen
|
||||
- Hohe Datenisolation & einfache Backups pro Tenant.
|
||||
- Migrationen laufen schemaweise über Flyway.
|
||||
|
||||
Reference in New Issue
Block a user