mirror of
https://dev.azure.com/tstanciu94/Packages/_git/Netmash
synced 2025-06-21 19:22:38 +03:00
Migration service - sqlite fix
This commit is contained in:
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…
x
Reference in New Issue
Block a user