"""v2

Revision ID: be9c976830fe
Revises: 89efb0f02dc0
Create Date: 2026-03-04 18:00:18.956681

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy import func

# revision identifiers, used by Alembic.
revision: str = "be9c976830fe"
down_revision: Union[str, Sequence[str], None] = "89efb0f02dc0"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("sql_queries") as batch_op:
        batch_op.add_column(
            sa.Column(
                "updated_at",
                sa.DateTime(timezone=True),
                nullable=False,
                server_default=sa.func.now(),
            )
        )
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("sql_queries") as batch_op:
        batch_op.drop_column("updated_at")
    # ### end Alembic commands ###
