C
C#17mo ago
Scottek utek

❔ 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
Angius17mo ago
You mean an old version of the old Entity Framework, or an old version of the newer Entity Framework Core?
Scottek utek
Scottek utek17mo ago
Angius
Angius17mo 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 utek17mo 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
Angius17mo ago
Maybe it's because of the stray , you have after icu?
Scottek utek
Scottek utek17mo ago
I tried also ,False
Angius
Angius17mo ago
Try either removing it, or adding False like I can see in some code on Stack huh
Accord
Accord17mo 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.