Skip to main content

Asset Database Limitations

Summary

Consolidated, source-backed list of the persistence limitations and unconfirmed areas that reviewers must weigh before treating Asset Management as a hardened system of record.

Audience

Backend engineers, database reviewers, architects, QA, support, operations, security reviewers, and product owners.

Overview

Every item below is derived from the current source checkout. Limitations are stated with source-backed wording; recommendations for change belong here and in the Database Testing Guide, not in the verified inventories on other pages.

Confirmed persistence limitations

AreaVerified limitation
Endpoint authorizationFoundation endpoints are anonymous and tenant-scoped; authorization is not a database-enforced control.
Tenant isolationApplication-only (EF global query filters + explicit predicates + header/claim trust); there is no database row-level security.
Elevated contextA SuperAdmin claim bypasses all tenant query filters.
Employee/labor referencesAssignedToUserId and LaborId have no foreign keys — identifier-only.
Workflow referenceWorkflowInstanceId has no foreign key to the Workflow Service — identifier-only.
Document referenceDocumentServiceId/StorageObjectId have no foreign keys — bytes live in Document Service.
Asset-code uniquenessEnforced in the application layer only; the AssetCode index is non-unique with no database unique constraint.
Serial-number uniquenessNo uniqueness constraint of any kind.
One active assignmentNo database constraint guarantees a single current custodian.
ConcurrencyNo RowVersion, timestamp, or concurrency token; no optimistic or pessimistic locking.
Distributed transactionsExternal Workflow and Document Service calls occur outside the local database transaction; there is no distributed atomicity.
Document compensationNo compensation if an external document store succeeds while the later local save fails.
Outbox cleanupNo cleanup, replay, or dead-letter table for the outbox.
Processed-event ledgerModeled but unused; the service has no inbound consumer, and there is no cleanup.
Retention governanceNo retention, archival, or cleanup worker for any object.
Query paginationList and workspace reads are capped (Take) but not paginated; reads load full entities without database projection.
Compatibility identityCompatId is a transitional numeric identity mirroring the monolith record space.
Migration historyA single initial migration exists; rollback (Down) is present but untested in source.
Persistence test coverageNo dedicated EF/DbContext, repository, migration, transaction, or concurrency test suite exists.
Backfill ownershipBackfill operational ownership and retirement plan are not established in source.

Classification

Transitional persistence with confirmed structural and governance gaps.

Requires confirmation

Authorization governance, tenant hardening, uniqueness and one-active-assignment constraints, concurrency strategy, retention and cleanup policy, compatibility retirement, migration governance, rollback testing, and dedicated persistence test ownership require confirmation.

See Also

Keywords

  • Asset persistence
  • Database Limitations
  • Draft database documentation

Source References

  • microservices/src/asset-service/Infrastructure/AssetDbContext.cs
  • microservices/src/asset-service/Infrastructure/Persistence.cs
  • microservices/src/asset-service/Domain/Asset/Asset.cs
  • microservices/src/asset-service/Infrastructure/Migrations/AssetDbContextModelSnapshot.cs

Revision Information

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