"""add commit_message column to app_variants, app_variant_revisions and environments_revisions table

Revision ID: 6161b674688d
Revises: 2a91436752f9
Create Date: 2025-03-27 08:23:07.894643

"""

from typing import Sequence, Union

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

# revision identifiers, used by Alembic.
revision: str = "6161b674688d"
down_revision: Union[str, None] = "2a91436752f9"
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(
        "app_variant_revisions",
        sa.Column("commit_message", sa.String(length=255), nullable=True),
    )
    op.add_column(
        "environments_revisions",
        sa.Column("commit_message", sa.String(length=255), nullable=True),
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("environments_revisions", "commit_message")
    op.drop_column("app_variant_revisions", "commit_message")
    # ### end Alembic commands ###
