db: add depends_on_workflow_run_id index (#4037)
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
"""add depends_on_workflow_run_id index
|
||||||
|
|
||||||
|
Revision ID: 1001a00ed620
|
||||||
|
Revises: 39e16cf92225
|
||||||
|
Create Date: 2025-11-19 19:29:00.404890+00:00
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
from typing import Sequence, Union
|
||||||
|
|
||||||
|
from alembic import op
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision: str = "1001a00ed620"
|
||||||
|
down_revision: Union[str, None] = "39e16cf92225"
|
||||||
|
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.create_index(
|
||||||
|
op.f("ix_workflow_runs_depends_on_workflow_run_id"),
|
||||||
|
"workflow_runs",
|
||||||
|
["depends_on_workflow_run_id"],
|
||||||
|
unique=False,
|
||||||
|
)
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade() -> None:
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_index(op.f("ix_workflow_runs_depends_on_workflow_run_id"), table_name="workflow_runs")
|
||||||
|
# ### end Alembic commands ###
|
||||||
@@ -317,7 +317,7 @@ class WorkflowRunModel(Base):
|
|||||||
browser_address = Column(String, nullable=True)
|
browser_address = Column(String, nullable=True)
|
||||||
script_run = Column(JSON, nullable=True)
|
script_run = Column(JSON, nullable=True)
|
||||||
job_id = Column(String, nullable=True, index=True)
|
job_id = Column(String, nullable=True, index=True)
|
||||||
depends_on_workflow_run_id = Column(String, nullable=True)
|
depends_on_workflow_run_id = Column(String, nullable=True, index=True)
|
||||||
sequential_key = Column(String, nullable=True)
|
sequential_key = Column(String, nullable=True)
|
||||||
run_with = Column(String, nullable=True) # 'agent' or 'code'
|
run_with = Column(String, nullable=True) # 'agent' or 'code'
|
||||||
debug_session_id: Column = Column(String, nullable=True)
|
debug_session_id: Column = Column(String, nullable=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user