"""Add qr_image_path to premium_payment_settings.

Stores the public URL of an admin-uploaded UPI QR image so the QR is configurable
from the Premium Management page without code changes. NULL keeps the existing
behaviour (a QR generated on the fly from the configured UPI id). Additive only.

Revision ID: c6e8a0b2d4f3
Revises: b5d7f9a1c3e2
Create Date: 2026-07-06

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "c6e8a0b2d4f3"
down_revision = "b5d7f9a1c3e2"
branch_labels = None
depends_on = None


def upgrade():
    with op.batch_alter_table("premium_payment_settings", schema=None) as batch_op:
        batch_op.add_column(sa.Column("qr_image_path", sa.String(length=255), nullable=True))


def downgrade():
    with op.batch_alter_table("premium_payment_settings", schema=None) as batch_op:
        batch_op.drop_column("qr_image_path")
