mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-04 01:53:52 +01:00
After successful migration from SQLite or MySql, there is an error after a restart
This commit is contained in:
parent
d14ce2a37f
commit
8c6fe91c71
3 changed files with 11 additions and 2 deletions
|
@ -242,7 +242,10 @@ namespace BTCPayServer.Hosting
|
|||
|
||||
private static async Task<string?> GetMigrationState(ApplicationDbContext postgresContext)
|
||||
{
|
||||
return (await postgresContext.Settings.FromSqlRaw("SELECT \"Id\", \"Value\" FROM \"Settings\" WHERE \"Id\"='MigrationData'").AsNoTracking().FirstOrDefaultAsync())?.Value;
|
||||
var o = (await postgresContext.Settings.FromSqlRaw("SELECT \"Id\", \"Value\" FROM \"Settings\" WHERE \"Id\"='MigrationData'").AsNoTracking().FirstOrDefaultAsync())?.Value;
|
||||
if (o is null)
|
||||
return null;
|
||||
return JObject.Parse(o)["state"]?.Value<string>();
|
||||
}
|
||||
private static async Task SetMigrationState(ApplicationDbContext postgresContext, string migratingFrom, string state)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>1.7.9</Version>
|
||||
<Version>1.7.10</Version>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# Changelog
|
||||
|
||||
## 1.7.10
|
||||
|
||||
### Bug fix
|
||||
|
||||
* After successful migration from SQLite or MySql, there is an error after a restart @NicolasDorier
|
||||
|
||||
## 1.7.9
|
||||
|
||||
### Bug fixes
|
||||
|
|
Loading…
Add table
Reference in a new issue