❔ EntityFramework migrations PostgreSQL

I've been trying to set up migration in .NET, I have auto-generated migrate files, but there are some problems with it. When I try to execute this piece code:
modelBuilder
.HasAnnotation("Npgsql:CollationDefinition:insensitive_collation", "en-u-ks-primary,en-u-ks-primary,icu,")
.HasAnnotation("Relational:MaxIdentifierLength", 63)
.HasAnnotation("ProductVersion", "5.0.4")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
modelBuilder
.HasAnnotation("Npgsql:CollationDefinition:insensitive_collation", "en-u-ks-primary,en-u-ks-primary,icu,")
.HasAnnotation("Relational:MaxIdentifierLength", 63)
.HasAnnotation("ProductVersion", "5.0.4")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
It says: 42P17: parameter "locale" must be specified. How should I edit "en-u-ks-primary,en-u-ks-primary,icu," to fix it? I'm using entity-framework 5.0.7
8 Replies
Angius
Angius2y ago
You mean an old version of the old Entity Framework, or an old version of the newer Entity Framework Core?
Scottek utek
Scottek utekOP2y ago
Angius
Angius2y ago
Ah, an old version of new EF, then, gotcha So, apparently, it's fixed in the new versions: https://stackoverflow.com/a/74724103/6042255
Scottek utek
Scottek utekOP2y ago
targetframework must be .net standart 2.1 Yeah I saw that, depression I just wanted to know if there is anything I could do in older version
Angius
Angius2y ago
Maybe it's because of the stray , you have after icu?
Scottek utek
Scottek utekOP2y ago
I tried also ,False
Angius
Angius2y ago
Try either removing it, or adding False like I can see in some code on Stack huh
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server