Heroku DB credentials update

Hi, I’m using Heroku Postgres db and api to insert to db. Heroku updated db credentials, so I updated them in Database manager. Unfortunately, Wappler updated these credentials only in the project json, but all the api, which insert to db stopped working, because of wrong credentials. The solution was to create a new db connection and switch db settings to a new db connection in apis. After this, everything works fine. I think Wappler doesn’t update credentials in the connected api or cache it somehow.

Can you use Environment variables to store your credentials? I think Heroku even have them filled in for your with your db credentials. So you only have to define and use them in Wappler.


I don’t think Global Environment variables are the solution to this bug. I updated the database connection for the target, but all the api actions cached the old connection. Even, you only select database name in the api action - you don’t put all the credentials in each api action. So api action should use the updated database connection credentials.

How many targets do you have?

Also where did you update the database connection? In the Server Connect Globals - Database Connections? Those are stored per target, so you can supply different options per active target.

I have two targets and I updated the credentials in both of them in Database connections. The Database connection was updated and showed correct credentials. Once I run api, I saw in error log that the api is using old username.