Fix invoice index migration

This commit is contained in:
nicolas.dorier 2022-06-13 12:37:20 +09:00
parent 869411a977
commit 4691e896a1
No known key found for this signature in database
GPG key ID: 6618763EF09186FE
2 changed files with 3 additions and 3 deletions

View file

@ -120,10 +120,10 @@ namespace BTCPayServer.HostedServices
Logs.PayServer.LogInformation($"Full invoice search import successful");
}
private Task<int> CountInvoices()
private async Task<int> CountInvoices()
{
using var ctx = _dbContextFactory.CreateContext();
return ctx.Invoices.CountAsync();
return await ctx.Invoices.CountAsync();
}
}
}

View file

@ -82,7 +82,7 @@ namespace BTCPayServer.Hosting
try
{
await Migrate(cancellationToken);
var settings = (await _Settings.GetSettingAsync<MigrationSettings>()) ?? new MigrationSettings();
var settings = (await _Settings.GetSettingAsync<MigrationSettings>()) ?? new MigrationSettings() { MigratedInvoiceTextSearchPages = int.MaxValue };
if (!settings.PaymentMethodCriteria)
{
await MigratePaymentMethodCriteria();