"""Update WebhookEvent

Revision ID: 8393207d3f0d
Revises: c26960e60bda
Create Date: 2025-09-10 11:13:48.283198

"""

import sqlalchemy as sa
from alembic import op

# Polar Custom Imports

# revision identifiers, used by Alembic.
revision = "8393207d3f0d"
down_revision = "c26960e60bda"
branch_labels: tuple[str] | None = None
depends_on: tuple[str] | None = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "webhook_events",
        sa.Column("type", sa.String(), nullable=True),
    )
    op.alter_column(
        "webhook_events", "payload", existing_type=sa.VARCHAR(), nullable=True
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "webhook_events", "payload", existing_type=sa.VARCHAR(), nullable=False
    )
    op.drop_column("webhook_events", "type")
    # ### end Alembic commands ###
