The entity type 'IdentityUser' is part of a hierarchy, but does not have a discriminator value configured
<p>I'm trying to migrate a .NET Core 1.1 MVC-application using EntityFrameworkCore (1.0.1) from SQLite (<code>"Microsoft.EntityFrameworkCore.Sqlite": "1.0.1"</code>) to MySQL (<code>"MySql.Data.EntityFrameworkCore": "7.0.6-IR31"</code>).</p>

<p>My context is extending <code>IdentityDbContext</code>, and when running <code>Database.EnsureCreated()</code>, using Sqlite, the AspNet-tables (RoleClaims, Roles, Users, etc) were automatically configured.</p>

<p>With the MySQL-connector, when i attempt to run either <code>Update-Database</code> or <code>Database.EnsureCreated()</code>, I get the error:</p>

<p><code>The entity type 'IdentityUser' is part of a hierarchy, but does not have a discriminator value configured.</code></p>

<p>Should I really configure this manually, and if so, how? </p>

<p>Context:</p>

<pre><code>public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser&gt;
{

    //DbSets here..

    public ApplicationDbContext(DbContextOptions&lt;ApplicationDbContext&gt; options) : base(options)
    {

    }

    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);

        builder.Entity&lt;IdentityUser&gt;()
            .HasDiscriminator&lt;int&gt;("Type")
            .HasValue&lt;ApplicationUser&gt;(1);
    }
}
</code></pre>

<p>ApplicationUser:</p>

<pre><code>public class ApplicationUser : IdentityUser
{
    public string Firstname { get; set; }
    public string Lastname { get; set; }
    public string Firmname { get; set; }
    public string CVR { get; set; }
    public string ATT { get; set; }
    public string Telephone { get; set; }
    public string Address { get; set; }
}
</code></pre>