"""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, 'alembic.op.drop_column', 'op.drop_column', (['"""user"""', '"""last_logged_in"""'], {}), False, 'from alembic import op\n'), (35, 'alembic.op.drop_column', 'op.drop_column', (['"""user"""', '"""is_admin"""'], {}), False, 'from alembic import op\n'), (36, 'alembic.op.drop_column', 'op.drop_column', (['"""user"""', '"""is_active"""'], {}), False, 'from alembic import op\n'), (37, 'alembic.op.drop_column', 'op.drop_column', (['"""email_address"""', '"""phishing_mail_detected"""'], {}), False, 'from alembic import op\n'), (38, 'alembic.op.drop_column', 'op.drop_column', (['"""email_address"""', '"""last_updated"""'], {}), False, 'from alembic import op\n'), (39, 'alembic.op.drop_column', 'op.drop_column', (['"""email_address"""', '"""last_mailbox_size"""'], {}), False, 'from alembic import op\n'), (40, 'alembic.op.drop_column', 'op.drop_column', (['"""email_address"""', '"""email_password"""'], {}), False, 'from alembic import op\n'), (41, 'alembic.op.drop_column', 'op.drop_column', (['"""email_address"""', '"""active"""'], {}), False, 'from alembic import op\n'), (21, 'sqlalchemy.Boolean', 'sa.Boolean', ([], {}), True, 'import sqlalchemy as sa\n'), (22, 'sqlalchemy.String', 'sa.String', ([], {'length': '(255)'}), True, 'import sqlalchemy as sa\n'), (23, 'sqlalchemy.Integer', 'sa.Integer', ([], {}), True, 'import sqlalchemy as sa\n'), (24, 'sqlalchemy.DateTime', 'sa.DateTime', ([], {}), True, 'import sqlalchemy as sa\n'), (25, 'sqlalchemy.Integer', 'sa.Integer', ([], {}), True, 'import sqlalchemy as sa\n'), (26, 'sqlalchemy.Boolean', 'sa.Boolean', ([], {}), True, 'import sqlalchemy as sa\n'), (27, 'sqlalchemy.Boolean', 'sa.Boolean', ([], {}), True, 'import sqlalchemy as sa\n'), (28, 'sqlalchemy.DateTime', 'sa.DateTime', ([], {}), True, 'import sqlalchemy as sa\n')]