"""tabella reset token

Revision ID: 4b95deb2d91c
Revises: 3f4032dd2d1b
Create Date: 2024-01-10 17:06:18.430866

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('ppss_resettokens',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('token', sa.Unicode(length=256), nullable=True),
    sa.Column('token_expiry', sa.DateTime(), nullable=True),
    sa.Column('reset_type', sa.Unicode(length=16), nullable=True),
    sa.Column('additionaldata', sa.Text(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['ppss_user.id'], name=op.f('fk_ppss_resettokens_user_id_ppss_user')),
    sa.PrimaryKeyConstraint('id', name=op.f('pk_ppss_resettokens')),
    sa.UniqueConstraint('token', name=op.f('uq_ppss_resettokens_token'))
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('ppss_resettokens')
    # ### end Alembic commands ###
