EF Core migrations script failing but not enough details!
Hey devs,
I am trying to run a migrations script to generate a sql file for the migration but I am running into an error "cant change identity property of a column...". But there is no information regarding which migration exactly is causing this error, or table or anything. Just the error and thats it. I would like to investigate this more but I have no leads.
If anyone has any idea how to expose extra details for this exception, I would be really grateful.
Here is the command line i'm using:
6 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Didn't add any extra info. Looks like there is no such thing.
Thanks a lot
you have an IdentityUser<...> right?
you changed the generic parameter of it, which changes the primary key of it
and that's not possible
your best bet is just to remove all migrations and create a new first initial migration
No, I'm not user Identity. I think I know the migration thats causing the issue and the entity too. I commented the migration's code and still the exception is thrown
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Don't comment out migration code :)
But yeah drop all migrations and create a new one