CommandError: Multiple head revisions are present for given argument 'head'; please specify a specific target revision, '<branchname>@head' to narrow to a specific head, or 'heads' for all heads
nguyenlykhanhlinh opened this issue · comments
To fix the error related to multiple head revisions in Alembic when running Langflow, you need to merge the multiple heads. Here are the steps to resolve this issue:
-
Identify the current heads:
alembic heads
-
Merge the heads:
alembic merge <head1> <head2> -m "merge heads"
Replace <head1>
and <head2>
with the actual revision IDs of the heads you want to merge. This will create a new migration script that merges the multiple heads into a single head, resolving the conflict.
Additionally, ensure that Alembic is properly initialized and configured in your Langflow setup. You can refer to the DatabaseService
class in src/backend/base/langflow/services/database/service.py
for methods like init_alembic
and run_migrations
to handle Alembic initialization and migrations [1][2].
Are you getting the same with latest 1.0.5?