"""blacklist

迁移 ID: a62db4039f17
父迁移: a61ec0d70761
创建时间: 2025-08-25 18:05:40.437905

"""

from __future__ import annotations

from collections.abc import Sequence

import sqlalchemy as sa
from alembic import op

revision: str = "a62db4039f17"
down_revision: str | Sequence[str] | None = "a61ec0d70761"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None


def upgrade(name: str = "") -> None:
    if name:
        return
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("group_blacklist", schema=None) as batch_op:
        batch_op.add_column(sa.Column("created_at", sa.DateTime(), nullable=False))

    with op.batch_alter_table("private_blacklist", schema=None) as batch_op:
        batch_op.add_column(sa.Column("created_at", sa.DateTime(), nullable=False))

    # ### end Alembic commands ###


def downgrade(name: str = "") -> None:
    if name:
        return
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("private_blacklist", schema=None) as batch_op:
        batch_op.drop_column("created_at")

    with op.batch_alter_table("group_blacklist", schema=None) as batch_op:
        batch_op.drop_column("created_at")

    # ### end Alembic commands ###
