https://prefect.io logo
Title
m

Malavika S Menon

09/05/2022, 12:02 PM
I am trying to use postgres as the database instead of sqlite. While I managed to connect the webserver to the pg db, cli commands for deployments don't seem to reflect on orion. How does the connection between cli commands and the database work, how can I change the link from the old sqlite database to the new pg one?
1
a

Anna Geller

09/05/2022, 12:42 PM
this setting is what you need - change it from:
prefect config set PREFECT_ORION_DATABASE_CONNECTION_URL='sqlite+aiosqlite:///${PREFECT_HOME}/orion.db'
to:
prefect config set PREFECT_ORION_DATABASE_CONNECTION_URL="<postgresql+asyncpg://postgres:pwd@localhost:5432/orion>"
:upvote: 1
🙌 1
m

Malavika S Menon

09/05/2022, 3:23 PM
Got it now, thanks!