Do not run label migration for new instances

This commit is contained in:
nicolas.dorier
2022-12-01 19:09:51 +09:00
parent 0af3faf6ff
commit 4039e74a82

View File

@@ -88,7 +88,7 @@ namespace BTCPayServer.Hosting
if (settings is null)
{
// If it is null, then it's the first run: let's skip all the migrations by migration flags to true
settings = new MigrationSettings() { MigratedInvoiceTextSearchPages = int.MaxValue };
settings = new MigrationSettings() { MigratedInvoiceTextSearchPages = int.MaxValue, MigratedTransactionLabels = int.MaxValue };
foreach (var prop in settings.GetType().GetProperties().Where(p => p.CanWrite && p.PropertyType == typeof(bool)))
{
prop.SetValue(settings, true);