Purpose
The ERD pages show Lumie's persistence shape at the boundary level. They are not
generated database dumps. They are curated diagrams for developers deciding
where a relation belongs, whether tenant isolation applies, and which deeper
schema page to read before changing a migration or repository.
Source Paths
| Path | Role |
|---|
lumie-backend/app/src/main/resources/db/migration/public/V1__create_platform_tables.sql | Platform tenant registry |
lumie-backend/app/src/main/resources/db/migration/public/V18__rls_baseline.sql | Tenant-scoped baseline tables and FKs |
lumie-backend/app/src/main/resources/db/migration/public/V28__billing_platform_tables.sql | Platform billing tables |
lumie-backend/app/src/main/resources/db/migration/public/V29__tuition_tenant_tables.sql | Tenant tuition billing tables |
lumie-backend/modules/**/domain/entity/ | Entity mapping and aggregate ownership |
Diagram Scope
Reading Rules
| Rule | Meaning |
|---|
| Solid relation | Backed by a database FK or a direct ownership relation in migrations |
| Soft relation | Stored as an id or semantic link without a hard FK |
| Tenant-scoped entity | Carries tenant_id and must be protected by RLS |
| Platform entity | Cross-tenant Lumie control-plane data and usually no RLS |
| Worker state | Service-owned technical state, not product tenant data |
What To Open Next
Maintenance Rule
Update these ERDs when a migration changes a durable relationship, introduces a
new aggregate table, changes tenant isolation semantics, or converts a soft
reference into a hard database FK.