EF Core 6.0 temporal tables - Support specifying HISTORY_RETENTION_PERIOD
What problem are you trying to solve?
Right now there is no way to specify HISTORY_RETENTION_PERIOD when defining a temporal table. Also, EF Core doesn't create create a clustered index for PeriodEnd and PeriodStart columns in history table which is a prerequisite to use HISTORY_RETENTION_PERIOD.
Describe the solution you'd like
builder.ToTable(tableBuilder => tableBuilder.IsTemporal(temporalTableBuilder =>
{
temporalTableBuilder.HasPeriodStart("MyPeriodStart");
temporalTableBuilder.HasPeriodEnd("MyPeriodEnd");
temporalTableBuilder.UseHistoryTable("MyHistory");
temporalTableBuilder.UseHistoryRetentionPeriod("12 MONTHS"); // <--- something like this
}));
Hi! Any news on this kind of important feature? Thx
@libertizer This issue is in the Backlog milestone. This means that it is not planned for the next release (EF Core 8.0). We will re-assess the backlog following the this release and consider this item at that time. However, keep in mind that there are many other high priority features with which it will be competing for resources. Make sure to vote (👍) for this issue if it is important to you.
Hey, any updates on this?
@b1tzer0 please see the comment right before yours.