"""create flowers table Revision ID: 2d9c6a6f4e0b Revises: 0001 Create Date: 2023-05-22 10:25:38.553857 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.sql import func # revision identifiers, used by Alembic. revision = '2d9c6a6f4e0b' down_revision = '0001' branch_labels = None depends_on = None def upgrade(): op.create_table( 'flowers', sa.Column('id', UUID(as_uuid=True), primary_key=True, nullable=False), sa.Column('name', sa.String, nullable=False, unique=True), sa.Column('description', sa.String, nullable=True), sa.Column('color', sa.String, nullable=True), sa.Column('price', sa.Integer, nullable=False), sa.Column('created_at', sa.DateTime, server_default=func.now(), nullable=False), sa.Column('updated_at', sa.DateTime, server_default=func.now(), onupdate=func.now(), nullable=False) ) def downgrade(): op.drop_table('flowers')