Skip to content

Commit

Permalink
fix: trim database name cause postgres doesn't like it too long
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicGD committed Oct 30, 2024
1 parent 6ae97a6 commit 637f5e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Sitko.Core.Xunit/DbBaseTestScope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ protected void AddDbContext<TDbContext>(TApplication application, string name, A
{
if (GetConfig(applicationContext.Configuration).UsePostgres)
{
moduleOptions.Database = $"{Id}_{dbName}";
var fullDbName = $"{Id.ToString()[..8]}_{dbName}";
moduleOptions.Database = fullDbName;
moduleOptions.EnableSensitiveLogging = true;
moduleOptions.IncludeErrorDetails = true;
configurePostgres?.Invoke(applicationContext, moduleOptions, Id, dbName);
Expand Down

0 comments on commit 637f5e2

Please sign in to comment.