<@ULVA73B9P> if the env variable `PREFECT_SERVER_D...
# ask-marvin
s
@Marvin if the env variable
PREFECT_SERVER_DATABASE_MIGRATE_ON_START
of my prefect server is set to
TRUE
does that mean that I don't need to run the "migration" myself as a separate job ?
m
thought for 59.7 seconds
Short answer: yes. In Prefect 3.x, setting
PREFECT_SERVER_DATABASE_MIGRATE_ON_START=true
tells the API server to run database migrations automatically on startup. With this enabled (it’s true by default), you typically do not need a separate migration job. Notes and caveats: - Ensure the API has DB permissions to run migrations (ALTER/CREATE, etc.). - Multi-replica deployments: it’s generally safe to leave this on for all replicas; only one will perform the migrations and the others will find the schema up to date. If you prefer stricter control, you can run a one-off migration job (or init container) with this set to true and set it to false on the regular API replicas. - Values like
TRUE
,
true
,
1
are accepted. Docs: Prefect 3 settings reference (see
PREFECT_SERVER_DATABASE_MIGRATE_ON_START
).