23 lines
634 B
Python
23 lines
634 B
Python
"""Index athlete activity history and shared profile pagination."""
|
|
|
|
from alembic import op
|
|
|
|
revision = "09a7c863b521"
|
|
down_revision = "f08db2902a74"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
op.create_index("ix_activity_owner_started_id", "activity", ["owner_id", "started_at", "id"])
|
|
op.create_index(
|
|
"ix_activity_owner_visibility_started_id",
|
|
"activity",
|
|
["owner_id", "visibility", "started_at", "id"],
|
|
)
|
|
|
|
|
|
def downgrade():
|
|
op.drop_index("ix_activity_owner_visibility_started_id", table_name="activity")
|
|
op.drop_index("ix_activity_owner_started_id", table_name="activity")
|