"""first revision

迁移 ID: a27298ba954d
父迁移:
创建时间: 2024-07-28 15:04:34.928642

"""

from __future__ import annotations

from collections.abc import Sequence

import sqlalchemy as sa
from alembic import op

revision: str = "a27298ba954d"
down_revision: str | Sequence[str] | None = None
branch_labels: str | Sequence[str] | None = ("nonebot_plugin_wakatime",)
depends_on: str | Sequence[str] | None = None


def upgrade(name: str = "") -> None:
    if name:
        return
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "wakatime",
        sa.Column("user_id", sa.String(), nullable=False),
        sa.Column("platform", sa.String(), nullable=False),
        sa.Column("access_token", sa.String(), nullable=False),
        sa.PrimaryKeyConstraint("user_id", name=op.f("pk_wakatime")),
        info={"bind_key": "nonebot_plugin_wakatime"},
    )
    # ### end Alembic commands ###


def downgrade(name: str = "") -> None:
    if name:
        return
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("wakatime")
    # ### end Alembic commands ###
