Skip to content

EF migration generation: documentation #370

Description

@jeremydmiller

Part of the EF Core migration generation epic — tracking issue #371.

Documentation for the whole feature. All code samples must be mdsnippets sourced from compilable test projects (repo convention — no inline hand-typed samples).

New pages (under docs/efcore/)

  • Migration generation overview — what it is, when to use it vs. Weasel's native db-patch/db-apply flow; the generated artifacts (migration classes, stub context, snapshot file) and what each is for.
  • Getting starteddb-ef-migration adddotnet ef database update walkthrough with a Marten-style IDatabase.
  • Coexistence guide — mixed EF Core + Marten/Polecat/Wolverine applications: multi-context setup, the relocated history table, --context usage, and the single-owner rule (a table is managed by exactly one migration stream; excluding critter-stack-managed tables from the app context via IsTableExcludedFromMigrations).
  • EF Core projections — the round-trip story: projection DbContext → MapToTableIDatabase → generated migrations include projection tables automatically; ownership guidance.
  • Adopting existing databasesdb-ef-migration baseline / history backfill.
  • Limitations & raw-SQL fallbacks — partitioning, functions/procedures, sequences, rich index options emitted as Sql() blocks; no dotnet ef migrations add/remove against the stub context; EF 9 PendingModelChangesWarning suppression explained.

Updates to existing docs

  • docs/efcore/migrations.md — position the two directions (Weasel-applies vs. EF-artifact generation) side by side.
  • Computed columns documented in the relevant table-modeling pages (PostgreSQL + SQL Server), since Weasel gains that capability in this epic.
  • CLAUDE.md / EFCORE_IMPROVEMENTS.md — update capability lists and remove closed gaps.

Downstream (tracked in their own repos, not here): short consumption pages for Marten, Polecat, and Wolverine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions