"""add byte_start/end to walfileoffset

Revision ID: 5cc5497d09b5
Revises: c354df1a9089
Create Date: 2025-07-02 14:11:22.304349

"""

from typing import Sequence, Union

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision: str = "5cc5497d09b5"
down_revision: Union[str, None] = "c354df1a9089"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "wal_file_offsets", sa.Column("byte_start", sa.BigInteger(), nullable=False)
    )
    op.add_column(
        "wal_file_offsets", sa.Column("byte_end", sa.BigInteger(), nullable=False)
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("wal_file_offsets", "byte_end")
    op.drop_column("wal_file_offsets", "byte_start")
    # ### end Alembic commands ###
