Skip to content

Commit

Permalink
Fixed issue when starting with an empty database
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-n committed Nov 26, 2024
1 parent 6fbbc03 commit ea8a5be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Persistence/EntityFramework/ConnectionConfigurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace MUnique.OpenMU.Persistence.EntityFramework;

using System.Text.RegularExpressions;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.EntityFrameworkCore.Migrations;
using Nito.AsyncEx.Synchronous;

Expand Down Expand Up @@ -101,6 +102,9 @@ public static string GetRolePassword(DatabaseRole role)
/// <exception cref="NotImplementedException">At the moment only Npgsql engine (PostgreSQL) is implemented.</exception>
internal static void Configure(this DbContext context, DbContextOptionsBuilder optionsBuilder)
{
// see https://github.com/dotnet/efcore/issues/34431
optionsBuilder.ConfigureWarnings(a => a.Ignore(RelationalEventId.PendingModelChangesWarning));

var type = context.GetType();
if (type.IsGenericType)
{
Expand Down

0 comments on commit ea8a5be

Please sign in to comment.