I use asp.net core identity (call it A dbcontext) in my project I also have another dbcontext (call B) with its own migrations. After publishing to production server, the tables associated to B context were created, but even though I have defined a data seed and initializer for A dbcontext, it does not create the tables for identity.
I have to mention that after "CreateIdentitySchema" which is the first migration of identity context, I changed the schema and added another migration (before publishing to server). But it works in my local machine.
In addition I have the following line in my A dbcontext seed:
context.Database.EnsureCreated();
So is there anything wrong with database ?
Update
Both contexts (A and B) use the same database (connection-string). Moreover, I had the EnsureCreated for the B datacontext, then I also added it for A context.
And the error I get is : Invalidobject name "SchemaName.AspNetRoles"