"""Add users table

Revision ID: ae3165cd8947
Revises: 2313453ed5c1
Create Date: 2023-08-15 10:41:06.487585

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "ae3165cd8947"
down_revision = "2313453ed5c1"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "users",
        sa.Column("email", sa.String(), nullable=False),
        sa.Column("name", sa.String(), nullable=True),
        sa.PrimaryKeyConstraint("email"),
    )
    op.create_unique_constraint(None, "configurations", ["name"])
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, "configurations", type_="unique")
    op.drop_table("users")
    # ### end Alembic commands ###
