"""add platform and make token unique for devices

Revision ID: f2941d6cfae7
Revises: 315e7ca08fee
Create Date: 2025-04-06 10:50:03.391015

"""

import sqlalchemy as sa
from alembic import op

# Polar Custom Imports

# revision identifiers, used by Alembic.
revision = "f2941d6cfae7"
down_revision = "315e7ca08fee"
branch_labels: tuple[str] | None = None
depends_on: tuple[str] | None = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index(
        op.f("ix_devices_expo_push_token"), "devices", ["expo_push_token"], unique=True
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f("ix_devices_expo_push_token"), table_name="devices")
    # ### end Alembic commands ###
