"""add approval fields to message model

Revision ID: f3bf00ef6118
Revises: 54c76f7cabca
Create Date: 2025-09-01 11:26:42.548009

"""

from typing import Sequence, Union

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "f3bf00ef6118"
down_revision: Union[str, None] = "54c76f7cabca"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("messages", sa.Column("approval_request_id", sa.String(), nullable=True))
    op.add_column("messages", sa.Column("approve", sa.Boolean(), nullable=True))
    op.add_column("messages", sa.Column("denial_reason", sa.String(), nullable=True))
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("messages", "denial_reason")
    op.drop_column("messages", "approve")
    op.drop_column("messages", "approval_request_id")
    # ### end Alembic commands ###
