"""Add account lockout fields to User

Revision ID: fb6a6554b21
Revises: 1f9b411bf6df
Create Date: 2015-10-29 01:07:27.930095

"""

# revision identifiers, used by Alembic.
revision = 'fb6a6554b21'
down_revision = '1f9b411bf6df'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('users', sa.Column('failed_login_attempts', sa.Integer(), nullable=True))
    op.add_column('users', sa.Column('last_failed_login_attempt', sa.DateTime(), nullable=True))
    op.add_column('users', sa.Column('locked_out', sa.Boolean(), nullable=True))
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('users', 'locked_out')
    op.drop_column('users', 'last_failed_login_attempt')
    op.drop_column('users', 'failed_login_attempts')
    ### end Alembic commands ###

Add migration for account lockout fields on User