lucian
07/08/2025, 3:24 AMMarvin
07/08/2025, 3:24 AMMarvin
07/08/2025, 3:25 AMbash
prefect server database reset-db
This command will automatically handle the migration to the latest version.
2. Environment Configuration:
Before migrating, especially for large databases, set an adequate timeout:
bash
export PREFECT_API_DATABASE_TIMEOUT=300 # 5 minutes, adjust as needed
3. For Docker Deployments:
If you're running Prefect in Docker, include the timeout in your docker run command:
bash
docker run -e PREFECT_API_DATABASE_TIMEOUT=300 prefecthq/prefect:latest
Important Safety Tips:
- Always backup your database before performing migrations
- Ensure no active workflows are running during the migration
- For production environments, consider testing the migration in a staging environment first
If you encounter any issues during migration or need to perform more complex operations (like rolling back to a previous version), let me know and I can provide more specific guidance.
For more details, you can refer to the server database documentation.