UniqueIdentifer Type does not exist Ef Core

Good evening everyone, I am currently looking at moving from SQL Server to Postgres. When using GUID as my Id on tables the initial migration tries to set the column type to uniqueidentifer. I then get this error when running the migration: Npgsql.PostgresException (0x80004005): 42704: type "uniqueidentifier" does not exist Any suggestions?
Jimmacle12d ago
because it doesn't, the equivalent postgres type is uuid you won't be able to use any of your sql server migrations on postgres, migrations are tightly related to the database provider they were generated for and any EF code you have that relies on specific sql server features/behavior probably won't work either for example, sql server uses a case insensitive collation by default but postgres uses a case sensitive one so queries on text may not behave the same out of the box
Lx004412d ago
Thanks for that Jimmacle, issue turned out being that I had a refernce to SQL Server in my DbDesignTimeFactory that was generating the bad initial migration.
Want results from more Discord servers?
Add your server
More Posts
Open restore point code C#im making a gui and wondering what the code is to open up your system properties to make a restore pSystem.NullReferenceExceptionHey, I need your help. I've been struggling for days with this code. My code says System.NullReferenEntity Framework IQueryable questionI'm trying to get a list of prescriptions from my Patients entity: ` var kk = await _context✅ Should I create single or multiple background servicesI need to fetch the same data in background service. I need to fetch it and store to cache every 5 mHelp With hints on how can i make multipull accounts using like arrays or something similar to arrayi just want an easy way this is my code GIve me hitns onlySystem.InvalidOperationException: Unable to resolve service for type 'MovieApi_backend.database.Contwhen i connect my application to database postgresql and when i hit the post req getting error candata update error in c# sqlI want to change the password of the user in the database. I get the password changed warning on theASP Core 8 - Custom 404 HandlingI have a few scenarios where I need to show a different kind of view and a bit of different logic deAdd suffix to version without it showing up as a prereleaseI'm writing a lib that wraps a bunch of external GRPC APIs and exposes them via the same interface. Help refactor serviceHi! I have data of many `Station` models. Their information updates every ~60 minutes. I need to sto✅ looking for help/contributorsDotmenu is a straightforward console menu library designed to streamline user interactions in consolHow to find relative file path for file inside of project?Dealing with a C# console application, I have a folder inside the project named Files and inside tha