Skip to content

Squash the three migrations into one #129

Todo

Description

@stphnwlsh

Each template ships three EF Core migrations (InitialCreate, AddCollationsAndIndexes, AddReviewText), 763 lines with their designer files and the snapshot. They're the history of how we built the sample database, which nobody starting a new solution needs. One InitialCreate that creates today's schema is all a new solution should start with.

Phase 1: CleanMinimalApi

  • Replace the three migrations with one InitialCreate generated from the current model
  • The model snapshot is unchanged apart from what the tool regenerates
  • A fresh database from the new migration has the same schema as one built from the three (compare the SQL scripts)
  • database-migrations and sample-data skills, and docs/RUN.md, still describe what's there

Phase 2: Carry it to the other four

  • The same change in MCP, GraphQL, Web API and Lambda Function, following family-sync
  • Release note says a solution created from an earlier release keeps its own migrations and needs nothing

Checks: dotnet build, dotnet test and dotnet format --verify-no-changes pass in every template, a solution made with dotnet new creates its database on first run, and Shared Layers Drift finds no differences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions