❔ Not sure should I leave the automatic table alteration (postgres EF Core 3.0 to EF Core 6.0)
You can see on the picture that EF Core has added some non intentional AlterColumn entries. I guess this is due to the issue described here https://duongnt.com/datetime-net6-postgresql/.
Is it safe to leave these alterations or should I delete them and just leave the stuff that I actually changed?
duongnt.bk
Duong's Blog
Datetime error with .NET 6 and PostgreSQL - Duong's Blog
While upgrading a project to .NET 6, I ran into an datetime issue with the latest npgsql efcore provider. Today, we will look at the cause and try to fix it.
2 Replies
yoooo, I remember having this exact issue, I think
is this an existing database that has already had migrations applied to it?
if not, I'd recommend just dropping and rebuilding migrations
if so, then you have to make a decision
are you okay with these columns changing data type?
if so, leave the migration as-is
if not, you need to change your data model to eliminate this change
I.E. to explicitly declare that "timestamp with time zone" is the data type you want
cause right now, the issue is that you've left it open to interpretation, and EF has changed how it interprets ambigouous parts of your model
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.