"""
Auto Migration

Revision ID: 1234567890
Revises:
Create Date: 2024-09-05 12:34:56
"""

import textwrap

import sqlalchemy as sa

from alembic import op


# revision identifiers, used by Alembic.
revision: str = "1234567890"
down_revision: str | None = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "users",
        sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
        sa.Column("first_name", sa.String(), nullable=True),
        sa.Column("last_name", sa.String(), nullable=True),
        sa.Column("email", sa.String(), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.execute(
        textwrap.dedent(
            """
            INSERT INTO users (first_name, last_name, email)
            VALUES ('John', 'Doe', 'john@doe.com')
            """
        )
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("users")
    # ### end Alembic commands ###
