Since migrating to dotnet10 and <PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0"/>
running
dotnet ef dbcontext scaffold "Name=DB:ConnectionString" Npgsql.EntityFrameworkCore.PostgreSQL
Causes the generate DBCtx to not have default value for columns that are not nullable and have a default value:
eg:
Found column with table: prod_ui.projects, column name: framework_id, data type: integer, nullable: False, identity: False, default value: 0, computed value: (null)
used to yield:
entity.Property(e => e.FrameworkId)
.HasDefaultValue(0)
.HasColumnName("framework_id");
since the update it yields:
entity.Property(e => e.FrameworkId).HasColumnName("framework_id");
This is obviously a big issue for us as we are no longer able to update our context.