<reponame>Pinafore/Karl-flashcards-web-app<filename>backend/app/alembic/versions/d39b49c62b4f_add_dark_mode_setting.py
"""add dark mode setting

Revision ID: d39b49c62b4f
Revises: <PASSWORD>
Create Date: 2020-07-16 04:30:16.728987

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'd39b4<PASSWORD>'
down_revision = '<PASSWORD>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('dark_mode', sa.Boolean(), nullable=False, server_default='true'))
    op.alter_column('user', 'show_help',
               existing_type=sa.BOOLEAN(),
               nullable=False,
               existing_server_default=sa.text('true'))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('user', 'show_help',
               existing_type=sa.BOOLEAN(),
               nullable=True,
               existing_server_default=sa.text('true'))
    op.drop_column('user', 'dark_mode')
    # ### end Alembic commands ###
