mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-07-09 16:09:13 +00:00
SKY-10827: persist copilot artifact-metadata violation batches as durable telemetry (#6520)
This commit is contained in:
parent
4c869489c0
commit
559fea0bb3
71 changed files with 4623 additions and 178 deletions
|
|
@ -0,0 +1,45 @@
|
|||
"""add audio_artifact_id to workflow_copilot_chat_messages
|
||||
|
||||
Revision ID: a8c4e2f9d6b1
|
||||
Revises: f3a9c2b7e1d4
|
||||
Create Date: 2026-06-11T20:30:00.000000+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "a8c4e2f9d6b1"
|
||||
down_revision: Union[str, None] = "f3a9c2b7e1d4"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
conn = op.get_bind()
|
||||
inspector = sa.inspect(conn)
|
||||
|
||||
columns = {col["name"] for col in inspector.get_columns("workflow_copilot_chat_messages")}
|
||||
if "audio_artifact_id" in columns:
|
||||
return
|
||||
|
||||
if conn.dialect.name == "postgresql":
|
||||
op.execute(sa.text("SET lock_timeout = '2s'"))
|
||||
|
||||
op.add_column(
|
||||
"workflow_copilot_chat_messages",
|
||||
sa.Column("audio_artifact_id", sa.String(), nullable=True),
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
conn = op.get_bind()
|
||||
inspector = sa.inspect(conn)
|
||||
columns = {col["name"] for col in inspector.get_columns("workflow_copilot_chat_messages")}
|
||||
if "audio_artifact_id" not in columns:
|
||||
return
|
||||
op.drop_column("workflow_copilot_chat_messages", "audio_artifact_id")
|
||||
Loading…
Add table
Add a link
Reference in a new issue