"""add processor_metadata

Revision ID: 090eca184ce0
Revises: dd66b4cb9a17
Create Date: 2025-08-12 09:56:39.690855

"""

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

# Polar Custom Imports

# revision identifiers, used by Alembic.
revision = "090eca184ce0"
down_revision = "dd66b4cb9a17"
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(
        "payments",
        sa.Column(
            "processor_metadata",
            postgresql.JSONB(astext_type=sa.Text()),
            nullable=False,
            server_default=sa.text("'{}'::jsonb"),
        ),
    )
    # ### end Alembic commands ###


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