"""202511132042

Revision ID: d399fe451657
Revises: bf36acfdffe3
Create Date: 2025-11-13 20:44:16.670898

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'd399fe451657'
down_revision: Union[str, None] = 'bf36acfdffe3'
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_releases', sa.Column('icon', sa.String(), nullable=True))
    op.add_column('app_releases', sa.Column('icon_type', sa.String(), nullable=True))
    op.drop_column('app_releases', 'avatar')
    op.drop_column('app_releases', 'status')
    op.add_column('users', sa.Column('current_workspace_id', sa.UUID(), nullable=True))
    op.create_foreign_key(None, 'users', 'workspaces', ['current_workspace_id'], ['id'])
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'users', type_='foreignkey')
    op.drop_column('users', 'current_workspace_id')
    op.add_column('app_releases', sa.Column('status', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('app_releases', sa.Column('avatar', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.drop_column('app_releases', 'icon_type')
    op.drop_column('app_releases', 'icon')
    # ### end Alembic commands ###
