"""is_super_admin

Revision: 0143
Revision ID: 10f9a04dddda
Revises: 52f62ba42efb
Create Date: 2018-10-04 18:06:49.830864

"""

# revision identifiers, used by Alembic.
revision = '10f9a04dddda'
down_revision = '52f62ba42efb'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.add_column('users', sa.Column('is_super_admin', sa.Boolean(), nullable=True))
    op.execute('UPDATE users SET is_super_admin = is_admin')


def downgrade():
    op.drop_column('users', 'is_super_admin')
