Trying to delete two columns and add a new column (no relationship between deleted and new) in one of my models but the generated migration renames one of the deleted column instead. Since the deleted columns hold data in production, they must be dropped instead of renamed.
Is there a way to fix this so the generated migration drops and create instead of renaming?
Variables in model:
public DateTime? PublishedAt { get; private set; }
public bool? IsValidated { get; private set; }
public States? States { get; private set; } // Added
public Invites? Invites { get; private set; } // Removed
public string Info { get; private set; } // Removed
Generated migration:
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Info",
table: "Articles");
migrationBuilder.RenameColumn(
name: "Invites",
table: "Articles",
newName: "States");
}