alabuga/backend/alembic/versions/20241014_0010_store_item_images.py
2025-09-30 22:45:05 -06:00

26 lines
624 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""Add image url to store items"""
from __future__ import annotations
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "20241014_0010"
down_revision = "20241012_0009"
branch_labels = None
depends_on = None
def upgrade() -> None:
"""Добавляем колонку с изображением товара."""
op.add_column("store_items", sa.Column("image_url", sa.String(length=255), nullable=True))
def downgrade() -> None:
"""Удаляем колонку с изображением товара."""
op.drop_column("store_items", "image_url")