"""change admin to boolean

Revision ID: e86dd3bc539c
Revises: 6f63ef516cdc
Create Date: 2020-11-11 22:32:00.707936

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'e86dd3bc539c'
down_revision = '6f63ef516cdc'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('email_address', sa.Column('active', sa.Boolean(), nullable=False))
    op.add_column('email_address', sa.Column('email_password', sa.String(length=255), nullable=False))
    op.add_column('email_address', sa.Column('last_mailbox_size', sa.Integer(), nullable=True))
    op.add_column('email_address', sa.Column('last_updated', sa.DateTime(), nullable=True))
    op.add_column('email_address', sa.Column('phishing_mail_detected', sa.Integer(), nullable=True))
    op.add_column('user', sa.Column('is_active', sa.Boolean(), nullable=False))
    op.add_column('user', sa.Column('is_admin', sa.Boolean(), nullable=True))
    op.add_column('user', sa.Column('last_logged_in', sa.DateTime(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('user', 'last_logged_in')
    op.drop_column('user', 'is_admin')
    op.drop_column('user', 'is_active')
    op.drop_column('email_address', 'phishing_mail_detected')
    op.drop_column('email_address', 'last_updated')
    op.drop_column('email_address', 'last_mailbox_size')
    op.drop_column('email_address', 'email_password')
    op.drop_column('email_address', 'active')
    # ### end Alembic commands ###

[((34, 4, 34, 44), 'alembic.op.drop_column', 'op.drop_column', ({(34, 19, 34, 25): '"""user"""', (34, 27, 34, 43): '"""last_logged_in"""'}, {}), "('user', 'last_logged_in')", False, 'from alembic import op\n'), ((35, 4, 35, 38), 'alembic.op.drop_column', 'op.drop_column', ({(35, 19, 35, 25): '"""user"""', (35, 27, 35, 37): '"""is_admin"""'}, {}), "('user', 'is_admin')", False, 'from alembic import op\n'), ((36, 4, 36, 39), 'alembic.op.drop_column', 'op.drop_column', ({(36, 19, 36, 25): '"""user"""', (36, 27, 36, 38): '"""is_active"""'}, {}), "('user', 'is_active')", False, 'from alembic import op\n'), ((37, 4, 37, 61), 'alembic.op.drop_column', 'op.drop_column', ({(37, 19, 37, 34): '"""email_address"""', (37, 36, 37, 60): '"""phishing_mail_detected"""'}, {}), "('email_address', 'phishing_mail_detected')", False, 'from alembic import op\n'), ((38, 4, 38, 51), 'alembic.op.drop_column', 'op.drop_column', ({(38, 19, 38, 34): '"""email_address"""', (38, 36, 38, 50): '"""last_updated"""'}, {}), "('email_address', 'last_updated')", False, 'from alembic import op\n'), ((39, 4, 39, 56), 'alembic.op.drop_column', 'op.drop_column', ({(39, 19, 39, 34): '"""email_address"""', (39, 36, 39, 55): '"""last_mailbox_size"""'}, {}), "('email_address', 'last_mailbox_size')", False, 'from alembic import op\n'), ((40, 4, 40, 53), 'alembic.op.drop_column', 'op.drop_column', ({(40, 19, 40, 34): '"""email_address"""', (40, 36, 40, 52): '"""email_password"""'}, {}), "('email_address', 'email_password')", False, 'from alembic import op\n'), ((41, 4, 41, 45), 'alembic.op.drop_column', 'op.drop_column', ({(41, 19, 41, 34): '"""email_address"""', (41, 36, 41, 44): '"""active"""'}, {}), "('email_address', 'active')", False, 'from alembic import op\n'), ((21, 55, 21, 67), 'sqlalchemy.Boolean', 'sa.Boolean', ({}, {}), '()', True, 'import sqlalchemy as sa\n'), ((22, 63, 22, 84), 'sqlalchemy.String', 'sa.String', (), '', True, 'import sqlalchemy as sa\n'), ((23, 66, 23, 78), 'sqlalchemy.Integer', 'sa.Integer', ({}, {}), '()', True, 'import sqlalchemy as sa\n'), ((24, 61, 24, 74), 'sqlalchemy.DateTime', 'sa.DateTime', ({}, {}), '()', True, 'import sqlalchemy as sa\n'), ((25, 71, 25, 83), 'sqlalchemy.Integer', 'sa.Integer', ({}, {}), '()', True, 'import sqlalchemy as sa\n'), ((26, 49, 26, 61), 'sqlalchemy.Boolean', 'sa.Boolean', ({}, {}), '()', True, 'import sqlalchemy as sa\n'), ((27, 48, 27, 60), 'sqlalchemy.Boolean', 'sa.Boolean', ({}, {}), '()', True, 'import sqlalchemy as sa\n'), ((28, 54, 28, 67), 'sqlalchemy.DateTime', 'sa.DateTime', ({}, {}), '()', True, 'import sqlalchemy as sa\n')]