36 lines
940 B
Python
36 lines
940 B
Python
"""Index visible task queries
|
|
|
|
Revision ID: c141c0794fa0
|
|
Revises: c79217aea3e8
|
|
Create Date: 2026-08-08 04:16:20.969796
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'c141c0794fa0'
|
|
down_revision = 'c79217aea3e8'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('task', schema=None) as batch_op:
|
|
batch_op.create_index(
|
|
'ix_task_owner_visibility_status_due',
|
|
['user_id', 'cleared_at', 'status', 'due_date'],
|
|
unique=False,
|
|
)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('task', schema=None) as batch_op:
|
|
batch_op.drop_index('ix_task_owner_visibility_status_due')
|
|
|
|
# ### end Alembic commands ###
|