"""add exceptions to budget entries

Revision ID: e7e633bd6fa2
Revises: 4aab1f84ad72
Create Date: 2025-05-12 18:47:21.506153

"""

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = "e7e633bd6fa2"
down_revision = "4aab1f84ad72"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("budget_entry", schema=None) as batch_op:
        batch_op.add_column(
            sa.Column(
                "exceptions",
                postgresql.JSONB(astext_type=sa.Text()),
                nullable=True,
            )
        )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("budget_entry", schema=None) as batch_op:
        batch_op.drop_column("exceptions")
    # ### end Alembic commands ###
