"""Rename musehub_pack_index → musehub_mpack_index. The ORM model has been MusehubMPackIndex since issue #63; the table name is now aligned to match. All column renames (object_id→entity_id, pack_id→mpack_id) and the entity_type addition were done in 0063. This migration only renames the table and its index. """ from __future__ import annotations from alembic import op revision = "0065" down_revision = "0064" branch_labels = None depends_on = None def upgrade() -> None: op.drop_index("ix_musehub_pack_index_entity_id", table_name="musehub_pack_index") op.rename_table("musehub_pack_index", "musehub_mpack_index") op.create_index( "ix_musehub_mpack_index_entity_id", "musehub_mpack_index", ["entity_id"], ) def downgrade() -> None: op.drop_index("ix_musehub_mpack_index_entity_id", table_name="musehub_mpack_index") op.rename_table("musehub_mpack_index", "musehub_pack_index") op.create_index( "ix_musehub_pack_index_entity_id", "musehub_pack_index", ["entity_id"], )