Migration service - sqlite fix
parent
fd92ceeb06
commit
92e7b3e2ca
|
@ -36,6 +36,7 @@ namespace NDB.Infrastructure.DatabaseMigration.Repositories
|
|||
command.CommandText = query;
|
||||
await _dbContext.Database.OpenConnectionAsync();
|
||||
var result = await command.ExecuteScalarAsync();
|
||||
await _dbContext.Database.CloseConnectionAsync();
|
||||
|
||||
return result != null && result != DBNull.Value && Convert.ToInt32(result) > 0;
|
||||
}
|
||||
|
|
|
@ -51,6 +51,9 @@ namespace NDB.Infrastructure.DatabaseMigration.Services
|
|||
|
||||
private async Task CheckMigrationTables()
|
||||
{
|
||||
if (_configuration.DatabaseType == DatabaseType.SQLite)
|
||||
CheckWorkspace();
|
||||
|
||||
using (var scope = _serviceProvider.CreateScope())
|
||||
{
|
||||
var _repository = scope.ServiceProvider.GetRequiredService<IMigrationRepository>();
|
||||
|
|
Loading…
Reference in New Issue