"""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 ###

[((1235, 1275), 'alembic.op.drop_column', 'op.drop_column', (['"""user"""', '"""last_logged_in"""'], {}), "('user', 'last_logged_in')\n", (1249, 1275), False, 'from alembic import op\n'), ((1280, 1314), 'alembic.op.drop_column', 'op.drop_column', (['"""user"""', '"""is_admin"""'], {}), "('user', 'is_admin')\n", (1294, 1314), False, 'from alembic import op\n'), ((1319, 1354), 'alembic.op.drop_column', 'op.drop_column', (['"""user"""', '"""is_active"""'], {}), "('user', 'is_active')\n", (1333, 1354), False, 'from alembic import op\n'), ((1359, 1416), 'alembic.op.drop_column', 'op.drop_column', (['"""email_address"""', '"""phishing_mail_detected"""'], {}), "('email_address', 'phishing_mail_detected')\n", (1373, 1416), False, 'from alembic import op\n'), ((1421, 1468), 'alembic.op.drop_column', 'op.drop_column', (['"""email_address"""', '"""last_updated"""'], {}), "('email_address', 'last_updated')\n", (1435, 1468), False, 'from alembic import op\n'), ((1473, 1525), 'alembic.op.drop_column', 'op.drop_column', (['"""email_address"""', '"""last_mailbox_size"""'], {}), "('email_address', 'last_mailbox_size')\n", (1487, 1525), False, 'from alembic import op\n'), ((1530, 1579), 'alembic.op.drop_column', 'op.drop_column', (['"""email_address"""', '"""email_password"""'], {}), "('email_address', 'email_password')\n", (1544, 1579), False, 'from alembic import op\n'), ((1584, 1625), 'alembic.op.drop_column', 'op.drop_column', (['"""email_address"""', '"""active"""'], {}), "('email_address', 'active')\n", (1598, 1625), False, 'from alembic import op\n'), ((445, 457), 'sqlalchemy.Boolean', 'sa.Boolean', ([], {}), '()\n', (455, 457), True, 'import sqlalchemy as sa\n'), ((539, 560), 'sqlalchemy.String', 'sa.String', ([], {'length': '(255)'}), '(length=255)\n', (548, 560), True, 'import sqlalchemy as sa\n'), ((645, 657), 'sqlalchemy.Integer', 'sa.Integer', ([], {}), '()\n', (655, 657), True, 'import sqlalchemy as sa\n'), ((736, 749), 'sqlalchemy.DateTime', 'sa.DateTime', ([], {}), '()\n', (747, 749), True, 'import sqlalchemy as sa\n'), ((838, 850), 'sqlalchemy.Integer', 'sa.Integer', ([], {}), '()\n', (848, 850), True, 'import sqlalchemy as sa\n'), ((917, 929), 'sqlalchemy.Boolean', 'sa.Boolean', ([], {}), '()\n', (927, 929), True, 'import sqlalchemy as sa\n'), ((996, 1008), 'sqlalchemy.Boolean', 'sa.Boolean', ([], {}), '()\n', (1006, 1008), True, 'import sqlalchemy as sa\n'), ((1080, 1093), 'sqlalchemy.DateTime', 'sa.DateTime', ([], {}), '()\n', (1091, 1093), True, 'import sqlalchemy as sa\n')]