EHRbase DB setup without extensions - flyway migrate problem

Hi @birger.haarbrandt @christian @jake.smolka
I am following this tutorial to setup ehrbase DB without extensions ehrbase/base/db-setup at develop · ehrbase/ehrbase · GitHub

I am trying to do this with postgres running locally in a container and listening on localhost:5432

The db creation works fine with this command

sudo psql -h localhost -U postgres < cloud-db-setup.sql

When I am running #mvn flyway:migrate I get the following error

org.flywaydb.core.api.FlywayException: Unable to connect to the database. Configure the url, user and password!

Tried adding the following to application.yaml and still getting the same error
datasource:
url: jdbc:postgresql://localhost:5432/ehrbase
username: ehrbase
password: ehrbase
tomcat:
maxIdle: 10
max-active: 50
max-wait: 10000

Where can I add the Db connection details to fix this problem

Post applying `cloud-db-setup.sql, I updated the environment variable ‘SERVER_AQLCONFIG_USEJSQUERY=false’ and ran docker-compose and it started working fine.

If I understand correctly, we do not have to run flyway migrate as mentioned in ehrbase/base/db-setup at develop · ehrbase/ehrbase · GitHub. On starting up, EHRBase notices that the DB is not setup and runs the migration automatically.

2 Likes