Skip to content

Add Migration Bundle as a Recommend Approach for Production Migrations #5323

@bbrandt

Description

@bbrandt

Type of issue

Missing information

Description

The first sentence of the SQL Scripts section states, "The recommended way to deploy migrations to a production database is by generating SQL scripts."

One request is to add EF Core migration bundles to this list recommended ways to deploy migrations to production.

For an individual on any conservative Architecture Team, it would be an uphill battle to propose moving migrations from SQL Scripts to EF Core Migration Bundles, which implicitly are not a recommended approach for deploying migrations to Production. As a result, teams that are deploying to Production are restricted to depending on a folder of idempotent migration SQL that runs with a CLI SQL execution tool. They do not have access to newer features, such as UseSeeding and UseAsyncSeeding.

The second request would be to be explicit about any trade-offs, which is important for teams to know about when making decisions. There is a great list of improvements in the Bundles section. We can mention that we cannot currently view the SQL that a bundle will execute, but this suggestion can be voted for in the backlog:
dotnet/efcore#25872

Page URL

https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/applying?tabs=dotnet-core-cli&source=docs

Content source URL

https://github.com/dotnet/EntityFramework.Docs/blob/main/entity-framework/core/managing-schemas/migrations/applying.md

Document Version Independent Id

6c575b10-048c-349c-397e-0d9c11d47235

Platform Id

f144178d-0be9-401f-1002-4afd493726ad

Article author

@SamMonoRT

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions