"""Drop disk_path column from musehub_objects. The column was written during the LocalBackend era and has been empty for all objects since the BlobBackend migration. storage_uri (s3://…) is the canonical location reference. Revision ID: 0051 Revises: 0050 """ from __future__ import annotations import sqlalchemy as sa from alembic import op revision: str = "0051" down_revision: str = "0050" branch_labels = None depends_on = None def upgrade() -> None: # disk_path was already absent from the consolidated schema (0001); this # migration is a no-op on fresh DBs and only runs the DROP on instances # that still carry the column from the pre-consolidation era. op.execute( "ALTER TABLE musehub_objects DROP COLUMN IF EXISTS disk_path" ) def downgrade() -> None: op.add_column( "musehub_objects", sa.Column("disk_path", sa.String(length=2048), nullable=False, server_default=""), )