How to upgrade dify across versions to complete missing tables. Upgrade from DIFY1.11.0 to version 1.14.0 #37058
Replies: 1 comment
-
|
Dify uses Flask-Migrate (Alembic) for database schema management. When you upgrade, all intermediate migrations between your current version and the target version are executed sequentially. However, jumping directly from 1.11.0 to 1.14.0 can be risky — large version jumps have higher failure rates [1]. Here's the recommended approach: Recommended: Incremental Upgrade Path Upgrade through intermediate versions: 1.11.x → 1.12.x → 1.13.x → 1.14.x, verifying each step completes successfully before proceeding. If you want to jump directly (Docker Compose): # 1. Backup your database first
docker compose exec db_postgres pg_dump -U postgres dify > backup.sql
# 2. Stop containers
docker compose down
# 3. Pull the target version
git pull origin main
docker compose pull
# 4. Sync environment variables (important for multi-version jumps)
bash dify-env-sync.sh
# 5. Start containers — migrations run automatically if MIGRATION_ENABLED=true
docker compose up -dMigrations execute automatically on startup [2]. If they fail, run manually: docker compose exec api flask db upgradeIf you encounter missing tables after the upgrade: # Check migration status
docker compose exec api flask db history
# If alembic_version is out of sync, reset it
docker compose exec db_postgres psql -U postgres -d dify -c \
"DROP TABLE IF EXISTS alembic_version CASCADE;"
# Re-run all migrations from scratch
docker compose exec api flask db upgradeThis forces Alembic to re-evaluate and apply all migrations that haven't been executed [3]. Additional steps for plugin migrations (required for 1.11→1.14): docker compose exec api uv run flask extract-plugins --workers=20
docker compose exec api uv run flask install-plugins --workers=2
docker compose exec api uv run flask migrate-data-for-pluginKey tips:
To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
Content
How to upgrade dify across versions to complete missing tables. Upgrade from DIFY1.11.0 to version 1.14.0
Beta Was this translation helpful? Give feedback.
All reactions