Add workflow_oid_status_idx index to workflow table to index status (#1642)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""Add workflow_oid_status_idx index to workflow table to index status
|
||||
|
||||
Revision ID: 957ad2d1d3f7
|
||||
Revises: 26dc22efaf0b
|
||||
Create Date: 2025-01-24 20:14:49.790319+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "957ad2d1d3f7"
|
||||
down_revision: Union[str, None] = "26dc22efaf0b"
|
||||
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("workflow_oid_status_idx", "workflows", ["organization_id", "status"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index("workflow_oid_status_idx", table_name="workflows")
|
||||
# ### end Alembic commands ###
|
||||
@@ -195,6 +195,7 @@ class WorkflowModel(Base):
|
||||
),
|
||||
Index("permanent_id_version_idx", "workflow_permanent_id", "version"),
|
||||
Index("organization_id_title_idx", "organization_id", "title"),
|
||||
Index("workflow_oid_status_idx", "organization_id", "status"),
|
||||
)
|
||||
|
||||
workflow_id = Column(String, primary_key=True, index=True, default=generate_workflow_id)
|
||||
|
||||
Reference in New Issue
Block a user