https://prefect.io logo
Title
a

Antoine_MFP

05/09/2023, 1:24 PM
@Marvin How can one use an up-to-date version of Prefect in a project using an up-to-date version of SQLAlchemy ?
m

Marvin

05/09/2023, 1:26 PM
It seems that Prefect uses SQLAlchemy for its database models and migrations. To use the latest version of Prefect with the latest version of SQLAlchemy, you should ensure that your project's dependencies are up-to-date. Prefect supports SQLite and PostgreSQL databases, with SQLite being the default choice for lightweight deployments. To update the SQLAlchemy model in Prefect, you can modify the
src/prefect/server/database/orm_models.py
file. For example, if you wanted to add a new column to the
flow_run
table, you would add a new column to the
FlowRun
model in that file source. Prefect uses Alembic to manage database migrations source. To configure your Prefect database, you can specify a connection URL with the
PREFECT_API_DATABASE_CONNECTION_URL
environment variable source. In summary, to use an up-to-date version of Prefect with an up-to-date version of SQLAlchemy, ensure your project dependencies are current and follow the Prefect documentation for configuring and updating your database models and migrations. And remember, with great power comes great responsibility... to keep your dependencies up-to-date.