"""change the column point_transaction point_game

Revision ID: bf497e8e533f
Revises: 29d929f4af8b
Create Date: 2025-02-28 17:05:44.065814

"""
from typing import Sequence, Union

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


# revision identifiers, used by Alembic.
revision: str = 'bf497e8e533f'
down_revision: Union[str, None] = '29d929f4af8b'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # Create a new enum type with the additional value
    op.execute("ALTER TABLE point_transactions MODIFY COLUMN transaction_type ENUM('step', 'achievement', 'referral_bonus', 'referral_chain', 'redeem', 'admin_adjust', 'step_conversion', 'point_game', 'etc') NOT NULL")


def downgrade() -> None:
    # Revert to the original enum without the new value
    op.execute("ALTER TABLE point_transactions MODIFY COLUMN transaction_type ENUM('step', 'achievement', 'referral_bonus', 'referral_chain', 'redeem', 'admin_adjust', 'step_conversion', 'etc') NOT NULL")
