Skip to main content

Asset Migration and Backfill Boundaries

Summary

This page states the boundaries of schema migration and data backfill for the asset-service. There is one authored EF migration for the asset schema, applied automatically only in Development. Backfill is a console-mode ETL that reads the monolith read-only and upserts into the asset schema while preserving the numeric CompatId. This page describes the modes and boundaries without printing any command, SQL, or connection detail. Production ownership of both migration and backfill is Requires confirmation.

Audience

  • DevOps engineers planning schema application and data migration.
  • Solution architects assessing migration safety.
  • Support and QA engineers understanding data provenance.

Reference Content

Migration boundary

  • One authored EF migration (InitialAssetSchema) exists, with its designer and model snapshot.
  • The target schema is asset.
  • A design-time DbContext factory lives in Persistence.cs.
  • In Development, the service auto-migrates on startup unless a skip-migrations flag is set.
  • Production migration ownership is Requires confirmation — do not assume auto-migrate applies outside Development.

Backfill boundary

The backfill is a console-mode ETL (a CLI subcommand) that runs without a web host. It reads the monolith read-only and upserts into the asset schema, preserving the numeric CompatId via a backfill DbContext configured ValueGeneratedNever. It is upsert-only and does not emit events for existing rows.

Backfill modes

ModePurpose
Dry-runEvaluate without writing
Per-tenant scopingLimit to a single tenant
Batch sizingControl processing batch size
ResumeContinue an interrupted run
Validate-onlyCheck without applying

Command lines, arguments, and connection details are intentionally omitted.

Boundary diagram

Governance (Requires confirmation)

  • Production migration execution ownership.
  • Operational ownership and scheduling of backfill runs.

Source References

  • microservices/src/asset-service/Infrastructure/Persistence.cs
  • microservices/src/asset-service/Infrastructure/AssetDbContext.cs
  • microservices/src/asset-service/Program.cs

See Also

Keywords

asset migration, backfill etl, schema, compatid, requires confirmation

Revision Information

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