"""create foodimages table Revision ID: b4e9c2a7d6f1 Revises: Create Date: 2024-01-10 10:00:00.000000 """ from alembic import op import sqlalchemy as sa from sqlalchemy.sql import func import uuid # revision identifiers revision = 'b4e9c2a7d6f1' down_revision = None branch_labels = None depends_on = None def upgrade(): op.create_table( 'foodimages', sa.Column('id', sa.String(), primary_key=True, default=lambda: str(uuid.uuid4())), sa.Column('image_url', sa.String(), nullable=False), sa.Column('prompt', sa.String(), nullable=False), sa.Column('status', sa.String(), nullable=False, server_default='pending'), sa.Column('created_at', sa.DateTime(), server_default=sa.func.now()), sa.Column('updated_at', sa.DateTime(), server_default=sa.func.now(), onupdate=sa.func.now()), sa.PrimaryKeyConstraint('id') ) def downgrade(): op.drop_table('foodimages')