Skip to main content

Asset Database Summary

Summary

Epic 13.4 verified the asset-service persistence layer. It comprises seven persisted object sets in the asset schema, built around one aggregate root and two children, with tenant isolation enforced at the application layer through EF query filters rather than database row-level security. This page summarizes; the schema reference holds the authoritative column-level detail.

Audience

Developers writing queries and migrations, QA engineers validating persistence, and solution architects reviewing the data model.

Reference Content

Persisted object sets

Object setRole
AssetsAggregate root.
AssetAssignmentHistoryAggregate child.
AssetDocumentReferencesAggregate child.
AuditLogsAudit trail.
TimelineEntriesTimeline history.
ProcessedEventsInbound idempotency.
OutboxMessagesOutbound event queue.

Structure and constraints

AspectValue
Aggregate roots1
Aggregate children2
Tenant query filters5
Non-PK indexes14
Authored migrations1
CompatId uniquenessUX_Assets_CompatId unique on numeric CompatId
Asset-code uniquenessApplication-enforced (CodeExistsAsync), not a DB index
Tenant isolationApplication-only; no DB row-level security

Notes

The compatibility numeric identity coexists with the native identity during the transitional period, which is why a unique index guards CompatId. Per-tenant asset-code uniqueness is validated in the application rather than by a database constraint, so it is not enforced under concurrent writes at the database level.

Source References

  • microservices/src/asset-service/Infrastructure/AssetDbContext.cs
  • microservices/src/asset-service/Domain/Asset/Asset.cs
  • microservices/src/asset-service/Domain/Common/ValueObjects.cs

See Also

Keywords

asset database, persistence, indexes, tenant filters, CompatId

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-17
  • Review cycle: Quarterly