feat(agent): add support for workflow agents with updated constraints and configuration
This commit is contained in:
49
migrations/versions/ebac70616dab_worflow_agent.py
Normal file
49
migrations/versions/ebac70616dab_worflow_agent.py
Normal file
@@ -0,0 +1,49 @@
|
||||
"""worflow_agent
|
||||
|
||||
Revision ID: ebac70616dab
|
||||
Revises: c107446e38aa
|
||||
Create Date: 2025-05-06 17:05:26.884902
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "ebac70616dab"
|
||||
down_revision: Union[str, None] = "c107446e38aa"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Upgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
# Remover a constraint antiga
|
||||
op.drop_constraint("check_agent_type", "agents", type_="check")
|
||||
|
||||
# Adicionar a nova constraint que inclui o tipo 'workflow'
|
||||
op.create_check_constraint(
|
||||
"check_agent_type",
|
||||
"agents",
|
||||
"type IN ('llm', 'sequential', 'parallel', 'loop', 'a2a', 'workflow')",
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Downgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
# Remover a constraint nova
|
||||
op.drop_constraint("check_agent_type", "agents", type_="check")
|
||||
|
||||
# Restaurar a constraint anterior sem o tipo 'workflow'
|
||||
op.create_check_constraint(
|
||||
"check_agent_type",
|
||||
"agents",
|
||||
"type IN ('llm', 'sequential', 'parallel', 'loop', 'a2a')",
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user