Bug #96914 migration not worked when name of property changed
Submitted: 18 Sep 2019 2:30
Reporter: heartice li Email Updates:
Status: Open Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version: OS:Microsoft Windows (windows 10)
Assigned to: CPU Architecture:Any

[18 Sep 2019 2:30] heartice li
Description:
Using efcore with code fist mode,enable migration.
When one property of model changed, the migraion not worked and throw a NotImplementedException.

How to repeat:
In Visual Studio 2019 Ver. 16.2.3, I create a DbContext:
public class EfDb : DbContext
{
    public EfDb(DbContextOptions<EfDb> dbContextOptions) : base(dbContextOptions)
    {
    }
    public DbSet<User> Users { get; set; }
}

public class User
{
    [Key]
    public long Id { get; set; }
    [MaxLength(32)]
    public string Name { get; set; }
    [MaxLength(64)]
    public string Pass { get; set; }
    [MaxLength(16)]
    public string Tele { get; set; }
}
And I Installed Nugut package "MySql.Data.EntityFrameworkCore 8.0.17" and "Microsoft.EntityFrameworkCore.Tools 2.2.6", and enable the migration named "Init" with "Add-Migration Init".

I used the "EfDb" like this

var optionsBuilder = new DbContextOptionsBuilder<EfDb>();
optionsBuilder.UseMySQL("...");
optionsBuilder.UseLoggerFactory(new LoggerFactory());
var db = new EfDb(optionsBuilder.Options);
if(db.Database.GetPendingMigrations().Any())
{
    db.Database.Migrate();
}

Then change the name of Pass Property To Password;

And add a migration named "Tele" with "Add-Migration Tele".

When it run agin,an exception was thrown like this:
System.NotImplementedException:“The method or operation is not implemented.”

And when i ran "Script-Migration",it tells me the same thing.