"""users_enable_emails

Revision: 0118
Revision ID: 252587fbe66d
Revises: 4c92555fa6cb
Create Date: 2018-03-14 11:04:14.326443

"""

# revision identifiers, used by Alembic.
revision = '252587fbe66d'
down_revision = '4c92555fa6cb'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


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


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