workflow_run_block_id index for artifacts (#1450)

This commit is contained in:
Shuchang Zheng
2024-12-30 10:18:37 -08:00
committed by GitHub
parent 15ecec6d8d
commit 625af80b89
2 changed files with 33 additions and 0 deletions

View File

@@ -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 ###