Closed ASBrattsev closed 2 years ago
Ping @roji
Sorry for taking long to answer.
This has already been resolved in EF Core 3.1 when using the old serial columns. It also does not occur when using the new (default) identity columns. I suggest you take a look at moving to 3.1.
PS The problem above is specific to the Npgsql provider, and so belongs in github.com/npgsql/efcore.pg rather than here (I know it's sometimes tricky to know where the problem is, just saying).
After creating a migration with a change in the primary key type from int to long, autogeneration is lost.
Steps to reproduce
I created a model:
and generate migration:
after, I change type of PK
and generate new migration:
after migrate data base I loss defalt value for PK
Further technical details
EF Core version: 2.1.1 Database provider: Npgsql.EntityFrameworkCore.PostgreSQL Target framework: NET Core 2.2 Operating system: Windows 10 Pro IDE: JetBrains Rider 2020.1.4