A bit of DB model cleanup (#5016)
This commit is contained in:
@@ -313,6 +313,9 @@ namespace Content.Server.Database
|
||||
Username = user,
|
||||
Password = pass
|
||||
}.ConnectionString;
|
||||
|
||||
Logger.DebugS("db.manager", $"Using Postgres \"{host}:{port}/{db}\"");
|
||||
|
||||
builder.UseNpgsql(connectionString);
|
||||
SetupLogging(builder);
|
||||
return builder.Options;
|
||||
@@ -329,10 +332,12 @@ namespace Content.Server.Database
|
||||
if (!inMemory)
|
||||
{
|
||||
var finalPreferencesDbPath = Path.Combine(_res.UserData.RootDir!, configPreferencesDbPath);
|
||||
Logger.DebugS("db.manager", $"Using SQLite DB \"{finalPreferencesDbPath}\"");
|
||||
connection = new SqliteConnection($"Data Source={finalPreferencesDbPath}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.DebugS("db.manager", $"Using in-memory SQLite DB");
|
||||
connection = new SqliteConnection("Data Source=:memory:");
|
||||
// When using an in-memory DB we have to open it manually
|
||||
// so EFCore doesn't open, close and wipe it.
|
||||
|
||||
Reference in New Issue
Block a user