27 lines
699 B
Python
27 lines
699 B
Python
"""add image_url to raw_news and processed_news
|
|
|
|
Revision ID: 0002
|
|
Revises: 0001
|
|
Create Date: 2026-05-27
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision: str = "0002"
|
|
down_revision: Union[str, None] = "0001"
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column("raw_news", sa.Column("image_url", sa.String(2000), nullable=True))
|
|
op.add_column("processed_news", sa.Column("image_url", sa.String(2000), nullable=True))
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column("processed_news", "image_url")
|
|
op.drop_column("raw_news", "image_url")
|