~sircmpwn/meta.sr.ht

ref: 72548bd7545f78670878667674cc7645835a17bd meta.sr.ht/metasrht/alembic/versions/5a5fda549d80_add_password_reset_columns.py -rw-r--r-- 526 bytes
72548bd7Drew DeVault API: Updates per core-go auth changes 1 year, 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""Add password reset columns

Revision ID: 5a5fda549d80
Revises: da70e75bc1a4
Create Date: 2018-01-28 22:23:28.589944

"""

# revision identifiers, used by Alembic.
revision = '5a5fda549d80'
down_revision = 'da70e75bc1a4'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.add_column('user', sa.Column('reset_hash', sa.String(128)))
    op.add_column('user', sa.Column('reset_expiry', sa.DateTime()))


def downgrade():
    op.drop_column('user', 'reset_hash')
    op.drop_column('user', 'reset_expiry')