Somnath Singh
Somnath Singh

Reputation: 98

How to change the schema used by pact broker?

I am using the pact-foundation/pact-broker Docker image to run the Pact Broker in my Kubernetes cluster. I am connecting to an external PostgreSQL database and successfully connecting by defining the environment variable:

PACT_BROKER_DATABASE_URL=postgres://postgres:password@postgres/postgres

However, the Pact Broker is creating its tables under the default public schema. I would like to change the schema to another schema, pact_broker, to separate the Pact Broker tables from the existing tables. I couldn't find such configuration in their documentation.

I tried appending currentSchema to the connection URL string, but it didn't help:

PACT_BROKER_DATABASE_URL=postgres://postgres:password@postgres/postgres?currentSchema=pact_broker

Has anyone ever tried this, or should I go with creating a separate database for the Pact Broker?

Upvotes: 1

Views: 79

Answers (0)

Related Questions