Brady Mitchell
07/07/2025, 9:45 PMPREFECT_SERVER_DATABASE_DRIVER to when using postgres, but not setting PREFECT_SERVER_DATABASE_CONNECTION_URL or PREFECT_API_DATABASE_CONNECTION_URLMarvin
07/07/2025, 9:45 PMMarvin
07/07/2025, 9:45 PMPREFECT_SERVER_DATABASE_DRIVER to either:
- postgresql (standard choice)
- postgresql+psycopg2 (if you specifically want to use the psycopg2 driver)
The first option (postgresql) is the most common and recommended choice. When you set just the driver, Prefect will use it along with other database-related environment variables (like PREFECT_SERVER_DATABASE_USERNAME, PREFECT_SERVER_DATABASE_PASSWORD, etc.) to construct the full connection URL internally.
For example, you might set it like this:
bash
export PREFECT_SERVER_DATABASE_DRIVER="postgresql"
You can find more details about database configuration settings in the Prefect settings reference documentation.Brady Mitchell
07/07/2025, 9:49 PMInput should be 'postgresql+asyncpg' or 'sqlite+aiosqlite'