"""create users table Revision ID: 2b3c4d5e6f7a Revises: 0001 Create Date: 2023-05-29 16:42:18.627041 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects.postgresql import UUID # revision identifiers, used by Alembic. revision = '2b3c4d5e6f7a' down_revision = '0001' branch_labels = None depends_on = None def upgrade(): op.create_table( 'users', sa.Column('id', UUID(as_uuid=True), primary_key=True, nullable=False), sa.Column('username', sa.String, unique=True, nullable=False, index=True), sa.Column('email', sa.String, unique=True, nullable=False), sa.Column('password', sa.String, nullable=False), sa.Column('is_active', sa.Boolean, default=True), 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()) ) def downgrade(): op.drop_table('users')