Skip to content

Migrations are too aggressive on RenameColumn #15178

Open
@yepeekai

Description

@yepeekai

We made huge refactoring of our model for a new application. There is a lot of RenameColumn in the generated Migration and a lot of them don't make sense: Foreign keys have been removed and added to different tables and EF Core choose to rename columns even when the foreign key is for a different table.

If we drop EntityAId (pointing to EntityA) and add EntityBId (pointing to EntityB), it shouldn't be a rename but a drop and add.

I think it should be a DropColumn and a AddColumn instead of a RenameColumn for a foreign key that points to different entities.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions