"""Add byte_offset and byte_length to musehub_mpack_index for range-GET reads. Enables O(object_size) byte-range S3 GETs instead of downloading the full mpack to extract a single object. NULL on existing rows — code falls back to full-mpack download when columns are absent. Revision ID: 0067 Revises: 0066 """ from __future__ import annotations import sqlalchemy as sa from alembic import op revision: str = "0067" down_revision: str = "0066" branch_labels = None depends_on = None def upgrade() -> None: op.add_column( "musehub_mpack_index", sa.Column("byte_offset", sa.BigInteger(), nullable=True), ) op.add_column( "musehub_mpack_index", sa.Column("byte_length", sa.Integer(), nullable=True), ) def downgrade() -> None: op.drop_column("musehub_mpack_index", "byte_length") op.drop_column("musehub_mpack_index", "byte_offset")