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 set | Role |
|---|---|
| Assets | Aggregate root. |
| AssetAssignmentHistory | Aggregate child. |
| AssetDocumentReferences | Aggregate child. |
| AuditLogs | Audit trail. |
| TimelineEntries | Timeline history. |
| ProcessedEvents | Inbound idempotency. |
| OutboxMessages | Outbound event queue. |
Structure and constraints
| Aspect | Value |
|---|---|
| Aggregate roots | 1 |
| Aggregate children | 2 |
| Tenant query filters | 5 |
| Non-PK indexes | 14 |
| Authored migrations | 1 |
| CompatId uniqueness | UX_Assets_CompatId unique on numeric CompatId |
| Asset-code uniqueness | Application-enforced (CodeExistsAsync), not a DB index |
| Tenant isolation | Application-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.csmicroservices/src/asset-service/Domain/Asset/Asset.csmicroservices/src/asset-service/Domain/Common/ValueObjects.cs
Related Articles
See Also
Keywords
asset database, persistence, indexes, tenant filters, CompatId
Revision Information
- Status: Draft
- Last reviewed: 2026-07-17
- Review cycle: Quarterly