"""init db

迁移 ID: ca5c07252665
父迁移:
创建时间: 2024-05-24 16:05:18.822389

"""

from __future__ import annotations

from collections.abc import Sequence

from alembic import op
import sqlalchemy as sa


revision: str = "ca5c07252665"
down_revision: str | Sequence[str] | None = None
branch_labels: str | Sequence[str] | None = ("nonebot_plugin_dcqq_relay",)
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(
        "nonebot_plugin_dcqq_relay_msgid",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("dcid", sa.Integer(), nullable=False),
        sa.Column("qqid", sa.Integer(), nullable=False),
        sa.PrimaryKeyConstraint("id", name=op.f("pk_nonebot_plugin_dcqq_relay_msgid")),
        info={"bind_key": "nonebot_plugin_dcqq_relay"},
    )
    # ### end Alembic commands ###


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