"""set short_id NOT NULL on images Revision ID: 004 Revises: 003 Create Date: 2026-05-09 IMPORTANT: Run migrate_to_short_ids.py script BEFORE applying this migration. This migration will fail if any rows still have short_id IS NULL. """ from alembic import op revision = "004" down_revision = "003" branch_labels = None depends_on = None def upgrade() -> None: op.alter_column("images", "short_id", nullable=False) def downgrade() -> None: op.alter_column("images", "short_id", nullable=True)