Skip to content

Enable compositional approach of custom migration functionality #17740

@taori

Description

@taori

Problem

I just read this article : https://docs.microsoft.com/de-de/ef/core/managing-schemas/migrations/operations

Reading the details about how to implement the generator objects for custom migration functionality it appears to me, that you can only extend migration functionality by overwriting existing one.

protected override void OnConfiguring(DbContextOptionsBuilder options)
    => options
        .UseSqlServer(connectionString)
        .ReplaceService<IMigrationsSqlGenerator, MyMigrationsSqlGenerator>();

Solution

If a compositional approach of this were to exist it would be possible to write many packages which extend the functionality of the MigrationBuilder, which seems like a much better alternative?

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions