Skip to content

Commit

Permalink
add observer_thought_id to artifacts table & user_input, observation …
Browse files Browse the repository at this point in the history
…to ObserverThought
  • Loading branch information
wintonzheng committed Dec 6, 2024
1 parent d6185b9 commit 24b7838
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Add observer_thought_id column to artifacts table
"""Add observer_thought_id column to artifacts table. Add user_input, observation to ObserverThoughts
Revision ID: b2b7b23646e9
Revision ID: fe49b59d836c
Revises: 4d51ed4719d5
Create Date: 2024-12-06 17:51:28.372085+00:00
Create Date: 2024-12-06 18:19:23.286827+00:00
"""

Expand All @@ -13,7 +13,7 @@
from alembic import op

# revision identifiers, used by Alembic.
revision: str = "b2b7b23646e9"
revision: str = "fe49b59d836c"
down_revision: Union[str, None] = "4d51ed4719d5"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
Expand All @@ -29,11 +29,15 @@ def upgrade() -> None:
["observer_thought_id"],
["observer_thought_id"],
)
op.add_column("observer_thoughts", sa.Column("user_input", sa.UnicodeText(), nullable=True))
op.add_column("observer_thoughts", sa.Column("observation", sa.String(), nullable=True))
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("observer_thoughts", "observation")
op.drop_column("observer_thoughts", "user_input")
op.drop_constraint("artifacts_observer_thought_id_fkey", "artifacts", type_="foreignkey")
op.drop_column("artifacts", "observer_thought_id")
# ### end Alembic commands ###
2 changes: 2 additions & 0 deletions skyvern/forge/sdk/db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,5 +525,7 @@ class ObserverThought(Base):
workflow_run_id = Column(String, ForeignKey("workflow_runs.workflow_run_id"), nullable=True)
workflow_run_block_id = Column(String, ForeignKey("workflow_run_blocks.workflow_run_block_id"), nullable=True)
workflow_id = Column(String, ForeignKey("workflows.workflow_id"), nullable=True)
user_input = Column(UnicodeText, nullable=True)
observation = Column(String, nullable=True)
thought = Column(String, nullable=True)
answer = Column(String, nullable=True)

0 comments on commit 24b7838

Please sign in to comment.