mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Migrate PayoutProcessors's PayoutMethodId in entity migration
This commit is contained in:
@@ -211,12 +211,6 @@ namespace BTCPayServer.Hosting
|
||||
settings.MigrateToStoreConfig = true;
|
||||
await _Settings.UpdateSetting(settings);
|
||||
}
|
||||
if (!settings.MigratePayoutProcessors)
|
||||
{
|
||||
await MigratePayoutProcessors();
|
||||
settings.MigratePayoutProcessors = true;
|
||||
await _Settings.UpdateSetting(settings);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -225,17 +219,6 @@ namespace BTCPayServer.Hosting
|
||||
}
|
||||
}
|
||||
|
||||
private async Task MigratePayoutProcessors()
|
||||
{
|
||||
await using var ctx = _DBContextFactory.CreateContext();
|
||||
var processors = await ctx.PayoutProcessors.ToArrayAsync();
|
||||
foreach (var processor in processors)
|
||||
{
|
||||
processor.PayoutMethodId = processor.GetPayoutMethodId().ToString();
|
||||
}
|
||||
await ctx.SaveChangesAsync();
|
||||
}
|
||||
|
||||
private async Task MigrateToStoreConfig()
|
||||
{
|
||||
await using var ctx = _DBContextFactory.CreateContext();
|
||||
|
||||
Reference in New Issue
Block a user