Syméon del Marmol
10/05/2025, 6:39 PMPREFECT_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 ?Marvin
10/05/2025, 6:39 PMMarvin
10/05/2025, 6:40 PMPREFECT_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
).