"""add consumed_email_tokens

Revision ID: a5f862b9d770
Revises: 86a6b2beaac9
Create Date: 2026-05-02 03:35:19.223526

"""

from __future__ import annotations

from collections.abc import Sequence

import sqlalchemy as sa
import sqlmodel

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "a5f862b9d770"
down_revision: str | None = "86a6b2beaac9"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "consumed_email_tokens",
        sa.Column("jti", sqlmodel.sql.sqltypes.AutoString(length=64), nullable=False),
        sa.Column("consumed_at", sa.DateTime(), nullable=False),
        sa.PrimaryKeyConstraint("jti"),
    )
    # ### end Alembic commands ###


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