Commits
Click on a commit to change the comparison rangeAdd PostgreSQL search_path support via PREFECT_API_DATABASE_SCHEMA
This adds support for custom PostgreSQL schemas by introducing a new
search_path setting that can be configured via:
- PREFECT_API_DATABASE_SCHEMA
- PREFECT_SERVER_DATABASE_SCHEMA
- PREFECT_API_DATABASE_SEARCH_PATH
- PREFECT_SERVER_DATABASE_SEARCH_PATH
When set, PostgreSQL connections will include the search_path in their
server_settings, allowing Prefect to operate within a custom schema
instead of the default public schema.
This feature applies to:
- SQLAlchemy engine connections (main application queries)
- Raw asyncpg connections for LISTEN/NOTIFY functionality
Closes #18015
Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>6 hours ago
by devin-ai-integration[bot] Fix CI: simplify validation_alias and add to SUPPORTED_SETTINGS
- Remove extra *_DATABASE_SEARCH_PATH aliases to keep API surface minimal
- Add PREFECT_API_DATABASE_SCHEMA and PREFECT_SERVER_DATABASE_SCHEMA to
SUPPORTED_SETTINGS in test_settings.py
Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>5 hours ago
by devin-ai-integration[bot] Fix CI: mark both DATABASE_SCHEMA settings as legacy
Both PREFECT_API_DATABASE_SCHEMA and PREFECT_SERVER_DATABASE_SCHEMA are
aliases for the deeply nested search_path field at
server.database.sqlalchemy.connect_args.search_path. Since the canonical
env var name would be PREFECT_SERVER_DATABASE_SQLALCHEMY_CONNECT_ARGS_SEARCH_PATH,
both short aliases need to be marked as legacy to skip the
to_environment_variables() assertion in tests.
Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>5 hours ago
by devin-ai-integration[bot]