"""Add phone

Revision ID: 483944c8ff05
Revises: 7d2e85bbf831
Create Date: 2024-03-04 14:52:08.723224

"""
from alembic import op
import sqlalchemy as sa


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


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


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