"""license key activation add conditions

Revision ID: 40dffd73ce1c
Revises: 7d7ca1953931
Create Date: 2024-08-23 14:52:21.903756

"""

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

# Polar Custom Imports

# revision identifiers, used by Alembic.
revision = "40dffd73ce1c"
down_revision = "7d7ca1953931"
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(
        "license_key_activations",
        sa.Column(
            "conditions", postgresql.JSONB(astext_type=sa.Text()), nullable=False
        ),
    )
    # ### end Alembic commands ###


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