add confidence_float to actions table (#1008)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
"""add actions.confidence_float
|
||||
|
||||
Revision ID: 2873c5c8c41e
|
||||
Revises: 137eee1d3b3e
|
||||
Create Date: 2024-10-18 20:03:10.612242+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "2873c5c8c41e"
|
||||
down_revision: Union[str, None] = "137eee1d3b3e"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("actions", sa.Column("confidence_float", sa.Numeric(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("actions", "confidence_float")
|
||||
# ### end Alembic commands ###
|
||||
@@ -1613,6 +1613,7 @@ class AgentDB:
|
||||
skyvern_element_hash=action.skyvern_element_hash,
|
||||
skyvern_element_data=action.skyvern_element_data,
|
||||
action_json=action.model_dump(),
|
||||
confidence_float=action.confidence_float,
|
||||
)
|
||||
session.add(new_action)
|
||||
await session.commit()
|
||||
|
||||
@@ -461,6 +461,7 @@ class ActionModel(Base):
|
||||
skyvern_element_hash = Column(String, nullable=True)
|
||||
skyvern_element_data = Column(JSON, nullable=True)
|
||||
action_json = Column(JSON, nullable=True)
|
||||
confidence_float = Column(Numeric, nullable=True)
|
||||
|
||||
created_at = Column(DateTime, default=datetime.datetime.utcnow, nullable=False)
|
||||
modified_at = Column(DateTime, default=datetime.datetime.utcnow, onupdate=datetime.datetime.utcnow, nullable=False)
|
||||
|
||||
Reference in New Issue
Block a user