v1.0定版
This commit is contained in:
26
backend/alembic/versions/0002_add_image_url.py
Normal file
26
backend/alembic/versions/0002_add_image_url.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""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")
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user