Reset hesla, doplneni mailu

This commit is contained in:
Michal Kváček
2024-02-08 16:26:12 +01:00
parent 03c9f2d189
commit c26eb97288
11 changed files with 235 additions and 79 deletions
@@ -0,0 +1,35 @@
"""add password_reset_token table
Revision ID: a410455fb3bb
Revises: 39ebf5a1ab7e
Create Date: 2024-02-08 07:59:02.066212
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a410455fb3bb'
down_revision = '39ebf5a1ab7e'
branch_labels = None
depends_on = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('password_reset_token',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('token', sa.String(length=64), nullable=False),
sa.Column('valid_until', sa.DateTime(), nullable=True),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('password_reset_token')
# ### end Alembic commands ###