Introduce new TaskStatuses: queued and timed_out (#170)
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
"""Add new indices to tasks table
|
||||
|
||||
Revision ID: 8335d7fecef9
|
||||
Revises: ea8e24d0bc8e
|
||||
Create Date: 2024-04-09 00:58:53.060477+00:00
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "8335d7fecef9"
|
||||
down_revision: Union[str, None] = "ea8e24d0bc8e"
|
||||
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_tasks_created_at"), "tasks", ["created_at"], unique=False)
|
||||
op.create_index(op.f("ix_tasks_modified_at"), "tasks", ["modified_at"], unique=False)
|
||||
op.create_index(op.f("ix_tasks_status"), "tasks", ["status"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f("ix_tasks_status"), table_name="tasks")
|
||||
op.drop_index(op.f("ix_tasks_modified_at"), table_name="tasks")
|
||||
op.drop_index(op.f("ix_tasks_created_at"), table_name="tasks")
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user