"""Add indexes for token0/token1 IDs

Revision ID: 66930706257e
Revises: 6a77c4e07151
Create Date: 2025-10-25 13:57:52.718415

"""

from collections.abc import Sequence

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision: str = '66930706257e'
down_revision: str | Sequence[str] | None = '6a77c4e07151'
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table('pools', schema=None) as batch_op:
        batch_op.create_index(batch_op.f('ix_pools_token0_id'), ['token0_id'], unique=False)
        batch_op.create_index(batch_op.f('ix_pools_token1_id'), ['token1_id'], unique=False)

    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""    
    msg = "Downgrade is not supported for this migration."
    raise NotImplementedError(msg)
    