mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 01:13:12 -04:00
Implementation of the new_password endpoint.
Found a way to create the token that does not need to persist it to the database. This requires proper error messages, written by people who speak menglis good.
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 80_password_reset_token
|
||||
Revises: 70_unique_email
|
||||
Create Date: 2016-01-05 17:47:46.395959
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '80_password_reset_token'
|
||||
down_revision = '70_unique_email'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('password_reset_token',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('token', sa.String(), nullable=False),
|
||||
sa.Column('user_id', sa.Integer(), nullable=False),
|
||||
sa.Column('expiry_date', sa.DateTime(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_index(op.f('ix_password_reset_token_token'), 'password_reset_token', ['token'], unique=True)
|
||||
### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f('ix_password_reset_token_token'), table_name='password_reset_token')
|
||||
op.drop_table('password_reset_token')
|
||||
### end Alembic commands ###
|
||||
Reference in New Issue
Block a user