You are viewing a single comment's thread.

view the rest of the comments →

0
2

[–] PuttItOut 0 points 2 points (+2|-0) ago 

So I've imported the schema and run the tests, and they all failed with:

The field '<some field here>' has a type currently unknown to Npgsql (OID 340359). You can retrieve it as a string by marking it as unknown, please see the FAQ.

The code above is using EF6 while we are using EF Core, similar but different. If I am going to use this I can not annotate models because I would have to use conditional compilation and I do not want to add this complexity to Voat's code base.

This seems that once we find an alternate way to perform the following line we can actually use this technique.

modelBuilder.Properties<string>()
        .Configure(s => s.HasColumnType("public.citext") );

Attn @FuzzyWords

0
1

[–] logos_ethos 0 points 1 point (+1|-0) ago 

Is https://github.com/npgsql/Npgsql.EntityFrameworkCore.PostgreSQL something that you can use? It supports citext, but I think that you have to change:

alter database {dbName} set search_path to 'dbo';

to

alter database {dbName} set search_path to 'dbo,public';

in both files so that the server sends back "citext" instead of "public.citext".

0
0

[–] PuttItOut ago 

That is the library we use to access PostgreSQL. And I will try this among some other things to see what combo will work.

I don't know if I'll have time until tomorrow though.