Open ghost opened 3 years ago
As you observed there are two connection strings in configuration:
DBConnectionString - This connection string is using merchant username and points to merchant_gateway schema. It is used for all database interactions during application runtime.
DBConnectionStringMaster - This connection string is using postgres username and points to postgres schema. It is used at startup for database upgrades (and database creation if it does not exist).
In current implementation it is required that both connections strings are provided - even in case when external database is used. Another constraint is that schema is named merchant_gateway and username is merchant (even in case of external database).
We are currently looking into removing this constraints in upcoming versions.
Thanks for clarifying! I'm going to test today
Was your test successful please, @attilaaf ? Interested to know if this is still an issue. Thanks.
Can you please provide an example connecting to a pg database that is external link (ie: not dependant on the docker-compose.yml database dependency).
What I found is that the code assumes the database name is 'Postgres' and cannot connect
For instance, assume we wish to change:
To a remote host, custom user id and password with database 'merchant_gateway' by changing the above string and also removing the
depends_on
in the docker-compose file.Expected Outcome
Developer is able to point the mapi server to a remote database with different User Id than
postgres
and still connect to schemamerchant_gateway
Actual Outcome
Unable to connect to remote schema because the code expects
postgres
as database name.