42 lines
1.7 KiB
Python
42 lines
1.7 KiB
Python
"""添加试穿记录表
|
|
|
|
Revision ID: f166e37d7b53
|
|
Revises:
|
|
Create Date: 2025-03-21 15:58:04.889147
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'f166e37d7b53'
|
|
down_revision = None
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('tryons',
|
|
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
|
sa.Column('top_garment_url', sa.String(length=1024), nullable=True, comment='上衣图片URL'),
|
|
sa.Column('bottom_garment_url', sa.String(length=1024), nullable=True, comment='下衣图片URL'),
|
|
sa.Column('person_image_url', sa.String(length=1024), nullable=True, comment='人物图片URL'),
|
|
sa.Column('request_id', sa.String(length=255), nullable=True, comment='请求ID'),
|
|
sa.Column('task_id', sa.String(length=255), nullable=True, comment='任务ID'),
|
|
sa.Column('task_status', sa.String(length=50), nullable=True, comment='任务状态'),
|
|
sa.Column('completion_url', sa.String(length=1024), nullable=True, comment='生成图片URL'),
|
|
sa.Column('created_at', sa.DateTime(), nullable=True, comment='创建时间'),
|
|
sa.Column('updated_at', sa.DateTime(), nullable=True, comment='更新时间'),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
op.create_index(op.f('ix_tryons_id'), 'tryons', ['id'], unique=False)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_index(op.f('ix_tryons_id'), table_name='tryons')
|
|
op.drop_table('tryons')
|
|
# ### end Alembic commands ### |