mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
After successful migration from SQLite or MySql, there is an error after a restart
This commit is contained in:
@@ -242,7 +242,10 @@ namespace BTCPayServer.Hosting
|
|||||||
|
|
||||||
private static async Task<string?> GetMigrationState(ApplicationDbContext postgresContext)
|
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)
|
private static async Task SetMigrationState(ApplicationDbContext postgresContext, string migratingFrom, string state)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>1.7.9</Version>
|
<Version>1.7.10</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.7.10
|
||||||
|
|
||||||
|
### Bug fix
|
||||||
|
|
||||||
|
* After successful migration from SQLite or MySql, there is an error after a restart @NicolasDorier
|
||||||
|
|
||||||
## 1.7.9
|
## 1.7.9
|
||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|||||||
Reference in New Issue
Block a user