32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
"""add home material generation config
|
|
|
|
Revision ID: 6c1aaf036f43
|
|
Revises: 1475d11b1d74
|
|
Create Date: 2026-07-09 10:28:05.067550
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = '6c1aaf036f43'
|
|
down_revision: Union[str, None] = '1475d11b1d74'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('home_material_assets', sa.Column('generation_prompt', sa.Text(), nullable=True, comment='生成提词'))
|
|
op.add_column('home_material_assets', sa.Column('media_references_json', sa.Text(), nullable=True, comment='附件/参考素材JSON字符串'))
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_column('home_material_assets', 'media_references_json')
|
|
op.drop_column('home_material_assets', 'generation_prompt')
|
|
# ### end Alembic commands ###
|