From 5bb9145443071b6309a3359884da311f8d6b88fe Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sat, 22 Jan 2022 00:48:17 +0200 Subject: [PATCH] NDB.Infrastructure.DatabaseMigration fic --- .../DependencyInjectionExtensions.cs | 4 ++-- .../Models/MigrationThumbprint.cs | 8 ++++---- .../Services/MigrationService.cs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/infrastructure/NDB.Infrastructure.DatabaseMigration/DependencyInjectionExtensions.cs b/infrastructure/NDB.Infrastructure.DatabaseMigration/DependencyInjectionExtensions.cs index 688d1c8..ee89c47 100644 --- a/infrastructure/NDB.Infrastructure.DatabaseMigration/DependencyInjectionExtensions.cs +++ b/infrastructure/NDB.Infrastructure.DatabaseMigration/DependencyInjectionExtensions.cs @@ -18,10 +18,10 @@ namespace NDB.Infrastructure.DatabaseMigration public static void AddMigration(this IServiceCollection services, DatabaseType databaseType = DatabaseType.SQLite, string connectionName = "DatabaseConnection", - string workspacePath = "Workspace", + string workspace = "Workspace", string scriptsDirectoryPath = "Scripts") { - var serviceConfiguration = new ServiceConfiguration(databaseType, connectionName, workspacePath, scriptsDirectoryPath); + var serviceConfiguration = new ServiceConfiguration(databaseType, connectionName, workspace, scriptsDirectoryPath); services.AddSingleton(serviceConfiguration); services.AddDataAccess(serviceConfiguration); services.AddSingleton(); diff --git a/infrastructure/NDB.Infrastructure.DatabaseMigration/Models/MigrationThumbprint.cs b/infrastructure/NDB.Infrastructure.DatabaseMigration/Models/MigrationThumbprint.cs index 425746d..ec5f8c8 100644 --- a/infrastructure/NDB.Infrastructure.DatabaseMigration/Models/MigrationThumbprint.cs +++ b/infrastructure/NDB.Infrastructure.DatabaseMigration/Models/MigrationThumbprint.cs @@ -2,12 +2,12 @@ namespace NDB.Infrastructure.DatabaseMigration.Models { - internal class MigrationThumbprint + public class MigrationThumbprint { public MigrationSignature[] MigrationSignatures { get; set; } } - internal class MigrationSignature + public class MigrationSignature { public DateTime MigrationDate { get; set; } public string MachineName { get; set; } @@ -15,13 +15,13 @@ namespace NDB.Infrastructure.DatabaseMigration.Models public string LastVersion { get; set; } } - internal class MigratedVersion + public class MigratedVersion { public string Version { get; set; } public string[] Scripts { get; set; } } - internal class ScriptPack + public class ScriptPack { public string Path { get; set; } public Version Version { get; set; } diff --git a/infrastructure/NDB.Infrastructure.DatabaseMigration/Services/MigrationService.cs b/infrastructure/NDB.Infrastructure.DatabaseMigration/Services/MigrationService.cs index 8624d2b..e8bbfb6 100644 --- a/infrastructure/NDB.Infrastructure.DatabaseMigration/Services/MigrationService.cs +++ b/infrastructure/NDB.Infrastructure.DatabaseMigration/Services/MigrationService.cs @@ -21,7 +21,7 @@ namespace NDB.Infrastructure.DatabaseMigration.Services public MigrationService(ILogger logger, IServiceProvider serviceProvider, ServiceConfiguration configuration) { - _migrationSignaturesFilePath = Path.Combine(_configuration.Workspace, _migrationSignaturesFileName); + _migrationSignaturesFilePath = Path.Combine(configuration.Workspace, _migrationSignaturesFileName); _logger = logger; _serviceProvider = serviceProvider; _configuration = configuration;