workflow_run_block_id index for artifacts (#1450)
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
"""artifacts index - workflow run block id index
|
||||||
|
|
||||||
|
Revision ID: 172cdfb3e2ee
|
||||||
|
Revises: d13af1e466fa
|
||||||
|
Create Date: 2024-12-30 18:16:04.102156+00:00
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
from typing import Sequence, Union
|
||||||
|
|
||||||
|
from alembic import op
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision: str = "172cdfb3e2ee"
|
||||||
|
down_revision: Union[str, None] = "d13af1e466fa"
|
||||||
|
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("org_observer_thought_index", "artifacts", ["organization_id", "observer_thought_id"], unique=False)
|
||||||
|
op.create_index("org_wfrb_index", "artifacts", ["organization_id", "workflow_run_block_id"], unique=False)
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade() -> None:
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_index("org_wfrb_index", table_name="artifacts")
|
||||||
|
op.drop_index("org_observer_thought_index", table_name="artifacts")
|
||||||
|
# ### end Alembic commands ###
|
||||||
@@ -165,6 +165,8 @@ class ArtifactModel(Base):
|
|||||||
Index("org_task_step_index", "organization_id", "task_id", "step_id"),
|
Index("org_task_step_index", "organization_id", "task_id", "step_id"),
|
||||||
Index("org_workflow_run_index", "organization_id", "workflow_run_id"),
|
Index("org_workflow_run_index", "organization_id", "workflow_run_id"),
|
||||||
Index("org_observer_cruise_index", "organization_id", "observer_cruise_id"),
|
Index("org_observer_cruise_index", "organization_id", "observer_cruise_id"),
|
||||||
|
Index("org_observer_thought_index", "organization_id", "observer_thought_id"),
|
||||||
|
Index("org_wfrb_index", "organization_id", "workflow_run_block_id"),
|
||||||
)
|
)
|
||||||
|
|
||||||
artifact_id = Column(String, primary_key=True, index=True, default=generate_artifact_id)
|
artifact_id = Column(String, primary_key=True, index=True, default=generate_artifact_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user