case 4690 - AdminConnectionString: swap only the database via NpgsqlConnectionStringBuilder
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -96,7 +96,8 @@ namespace AyaNova.Util
|
||||
{
|
||||
get
|
||||
{
|
||||
return _dbConnectionString.Replace(_dbName, "postgres");
|
||||
//Swap only the database, a text replace also changed a user, password or host containing the database name
|
||||
return new Npgsql.NpgsqlConnectionStringBuilder(_dbConnectionString) { Database = "postgres" }.ConnectionString;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user