Prune webhook data from database

This commit is contained in:
nicolas.dorier
2023-05-28 23:44:10 +09:00
committed by Andrew Camilleri
parent 418b476725
commit 4e03c2523a
21 changed files with 515 additions and 161 deletions

View File

@@ -213,6 +213,9 @@ namespace BTCPayServer.Hosting
{
var typeMapping = t.EntityTypeMappings.Single();
var query = (IQueryable<object>)otherContext.GetType().GetMethod("Set", new Type[0])!.MakeGenericMethod(typeMapping.EntityType.ClrType).Invoke(otherContext, null)!;
if (t.Name == "WebhookDeliveries" ||
t.Name == "InvoiceWebhookDeliveries")
continue;
Logger.LogInformation($"Migrating table: " + t.Name);
List<PropertyInfo> datetimeProperties = new List<PropertyInfo>();
foreach (var col in t.Columns)