Skip to content

Commit

Permalink
feat(dir-data): ✨ enable sensitive data logging in migration Action
Browse files Browse the repository at this point in the history
  • Loading branch information
collinbarrett committed Jun 17, 2024
1 parent 7ccad69 commit 0e34480
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/directory-migrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ jobs:
-p FilterLists.Directory.Infrastructure.Migrations
-s FilterLists.Directory.Api
working-directory: ./services/Directory
env:
DOTNET_RUNNING_EF_CORE_TOOLS: true

- name: Commit Effective Migration
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ public static void AddInfrastructure(this IHostApplicationBuilder builder)
// retry on Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - Undefined error: 0)
so.EnableRetryOnFailure([0])
.MigrationsAssembly(MigrationsAssembly))
.UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking));
.UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking)
.EnableSensitiveDataLogging(string.Equals(
Environment.GetEnvironmentVariable("DOTNET_RUNNING_EF_CORE_TOOLS"), "true",
StringComparison.OrdinalIgnoreCase)));
builder.Services.AddHostedService<MigrationService>();
builder.Services.AddMemoryCache();
}
Expand Down

0 comments on commit 0e34480

Please sign in to comment.