From 71dd01cb3e4711d96435a7158c47a8070b2ab4d0 Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 25 Dec 2022 18:01:48 +0800 Subject: Add migration. v2.0 --- .../CrupestApi/CrupestApi.Commons/Secrets/SecretService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docker/crupest-api/CrupestApi/CrupestApi.Commons/Secrets') diff --git a/docker/crupest-api/CrupestApi/CrupestApi.Commons/Secrets/SecretService.cs b/docker/crupest-api/CrupestApi/CrupestApi.Commons/Secrets/SecretService.cs index b8a1bbe..c693d8d 100644 --- a/docker/crupest-api/CrupestApi/CrupestApi.Commons/Secrets/SecretService.cs +++ b/docker/crupest-api/CrupestApi/CrupestApi.Commons/Secrets/SecretService.cs @@ -14,11 +14,11 @@ public class SecretService : CrudService, ISecretService _logger = loggerFactory.CreateLogger(); } - protected override void AfterMigrate(IDbConnection connection, TableInfo table, ILoggerFactory loggerFactory) + protected override void AfterMigrate(IDbConnection connection, TableInfo table) { if (table.SelectCount(connection) == 0) { - loggerFactory.CreateLogger().LogInformation("No secrets found, insert default secrets."); + _logger.LogInformation("No secrets found, insert default secrets."); using var transaction = connection.BeginTransaction(); var insertClause = InsertClause.Create() .Add(nameof(SecretInfo.Key), SecretsConstants.SecretManagementKey) -- cgit v1.2.3