"""Make OAuth2.user_id nullabel

Revision ID: 243749b0ceed
Revises: 6b14ecb99cf9
Create Date: 2025-10-07 11:15:09.726320

"""

import sqlalchemy as sa
from alembic import op

# Polar Custom Imports

# revision identifiers, used by Alembic.
revision = "243749b0ceed"
down_revision = "6b14ecb99cf9"
branch_labels: tuple[str] | None = None
depends_on: tuple[str] | None = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column("oauth2_clients", "user_id", existing_type=sa.UUID(), nullable=True)
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "oauth2_clients", "user_id", existing_type=sa.UUID(), nullable=False
    )
    # ### end Alembic commands ###
