Files
dify/api/migrations
Charles YaoandClaude Opus 5 c442167828 fix(migrations): merge the two alembic heads on feat/dify-builder
The migration graph had two heads, both descending from d8e4a6b1c902:

- a9cc8d552db4 (add error to dify_builder_runs) on the Builder branch
- e7b2a9c4d601 (add agent sandbox usage) from main, which arrived here
  through merge commit d08c189614

With two heads, `flask upgrade-db` fails at startup with "Multiple head
revisions are present", so the dev dify-api pod built from this branch
was crash-looping and the rollout never completed.

Add an empty merge revision (733e4c46f90e) whose down_revision is
("a9cc8d552db4", "e7b2a9c4d601") instead of re-parenting either one.
Both revisions are already pushed and a9cc8d552db4 is already applied on
the dev database. Re-parenting a9cc8d552db4 onto e7b2a9c4d601 would make
that database believe it is at head while the sandbox usage tables from
e7b2a9c4d601 were never created. The merge revision makes alembic apply
e7b2a9c4d601 on databases that stopped at a9cc8d552db4, then stamp the
merge.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-21 15:37:53 -07:00
..

Single-database configuration for Flask.