Skip to content
Corridor V1.26.08 is out, see what's new

Technology

PostgreSQL

Ask AI

How to use PostgreSQL as the Corridor Platform's metadata database.

This section describes how to use PostgreSQL (https://www.postgresql.org/) as the metadata database.

Supported versions: 11.7+

We use sqlalchemy’s postgresql dialect to connect to the PostgreSQL server - this can be set up using multiple methods that are described in https://docs.sqlalchemy.org/en/13/dialects/postgresql.html.

We recommend using psycopg2. This is installed by default with the following components:

  • API
  • Celery - API worker

In the API configurations, the following configurations need to be set:

  • SQLALCHEMY_DATABASE_URI = 'postgresql://<username>:<password>@<hostname>/<dbname>' Needs to be set to be able to connect to the Database.
  • Also, check the other configurations that may be required as described in API - Configurations > SQLAlchemy section