Closed willmcgowan85 closed 10 months ago
i'm able to repro this on latest bits. When processing AddColumnOperation we should check for the scenario where the current column is on temporal table but the old column is on regular table.
Is there any update on this? We are still seeing this issue.
@andersme We hope to be able to address this in EF8, but this may not happen due to other priorities.
@maumar to investigate. /cc @bricelam
Experiencing the same issue with EF Core 8.0.4
I ran into an issue when setting a table to include it's history counterpart, where it will attempt to update the columns on the history table, before the history table is created, if there are any additional columns also being added, like
delete_date
below.I couldn't find any know issues or roadmap items regarding Temporal/History tables and ordering of SQL queries during the
Update-Database
orScript-Migration
process. So I don't know if this is a known issue or not, and I know Temporal tables are still being worked on overall. But here are my findings if it helps.I am unable to upload sample project from my work machine, I might be able to reporduce it from personal machine later if needed.
Steps to reproduce:
.IsTemporal(true)
Update-Database
will fail on second migrationHere is the generated migration from the C# changes for step 5, the second migration.
This is the SQL generated when running
Script-Migration
targeting only the above migration change.Here is the output when attempting to run
Update-Database
as shown on the first line.EF Core version: 7.0.0 Database provider: Microsoft.EntityFrameworkCore.SqlServer Target framework: .NET 6.0 Operating system: Win 10 IDE: Visual Studio 2022 17.4.1