Skip to main content

ERD Overview

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

PathRole
lumie-backend/app/src/main/resources/db/migration/public/V1__create_platform_tables.sqlPlatform tenant registry
lumie-backend/app/src/main/resources/db/migration/public/V18__rls_baseline.sqlTenant-scoped baseline tables and FKs
lumie-backend/app/src/main/resources/db/migration/public/V28__billing_platform_tables.sqlPlatform billing tables
lumie-backend/app/src/main/resources/db/migration/public/V29__tuition_tenant_tables.sqlTenant tuition billing tables
lumie-backend/modules/**/domain/entity/Entity mapping and aggregate ownership

Diagram Scope

Reading Rules

RuleMeaning
Solid relationBacked by a database FK or a direct ownership relation in migrations
Soft relationStored as an id or semantic link without a hard FK
Tenant-scoped entityCarries tenant_id and must be protected by RLS
Platform entityCross-tenant Lumie control-plane data and usually no RLS
Worker stateService-owned technical state, not product tenant data

What To Open Next

QuestionPage
Is this table platform-owned or tenant-owned?Public Schema ERD
How do product tables relate inside a tenant?Tenant Schema ERD
How are SaaS billing and tuition billing separated?Billing Schema ERD
What is the policy for adding migrations?Migration Guide

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.