"""add total_points_voided to loyalty_cards

Revision ID: loyalty_002
Revises: loyalty_001
Create Date: 2026-02-08
"""
import sqlalchemy as sa

from alembic import op

revision = "loyalty_002"
down_revision = "loyalty_001"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column(
        "loyalty_cards",
        sa.Column(
            "total_points_voided",
            sa.Integer(),
            nullable=False,
            server_default="0",
            comment="Lifetime points voided (returns + expirations)",
        ),
    )


def downgrade() -> None:
    op.drop_column("loyalty_cards", "total_points_voided")
