"""Add otp hash

Revision ID: 7d2e85bbf831
Revises: 4b95deb2d91c
Create Date: 2024-02-09 14:50:19.656234

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '7d2e85bbf831'
down_revision = '4b95deb2d91c'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('ppss_user', sa.Column('otp_hash', sa.Unicode(length=64), nullable=True))
    op.create_unique_constraint(op.f('uq_ppss_user_otp_hash'), 'ppss_user', ['otp_hash'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(op.f('uq_ppss_user_otp_hash'), 'ppss_user', type_='unique')
    op.drop_column('ppss_user', 'otp_hash')
    # ### end Alembic commands ###
