"""empty message

Revision ID: f5cb90899ba5
Revises: 649f562bde38
Create Date: 2020-03-05 12:49:55.561656

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'f5cb90899ba5'
down_revision = '649f562bde38'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('users', sa.Column('current_login_at', sa.DateTime(), nullable=True))
    op.add_column('users', sa.Column('current_login_ip', sa.String(length=80), nullable=True))
    op.add_column('users', sa.Column('last_login_at', sa.DateTime(), nullable=True))
    op.add_column('users', sa.Column('last_login_ip', sa.String(length=80), nullable=True))
    op.add_column('users', sa.Column('login_count', sa.Integer(), nullable=True))
    op.create_unique_constraint(op.f('uq_users_username'), 'users', ['username'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(op.f('uq_users_username'), 'users', type_='unique')
    op.drop_column('users', 'login_count')
    op.drop_column('users', 'last_login_ip')
    op.drop_column('users', 'last_login_at')
    op.drop_column('users', 'current_login_ip')
    op.drop_column('users', 'current_login_at')
    # ### end Alembic commands ###
