"""guide video play count is independent for coupon and comparison

Revision ID: guide_video_scene_unique
Revises: 6d2309208549
"""
from alembic import op

revision = "guide_video_scene_unique"
down_revision = "6d2309208549"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.drop_index("uq_guide_video_play_user_seq", table_name="guide_video_play")
    op.create_index(
        "uq_guide_video_play_user_scene_seq",
        "guide_video_play",
        ["user_id", "scene", "seq"],
        unique=True,
    )


def downgrade() -> None:
    op.drop_index("uq_guide_video_play_user_scene_seq", table_name="guide_video_play")
    op.create_index(
        "uq_guide_video_play_user_seq",
        "guide_video_play",
        ["user_id", "seq"],
        unique=True,
    )
