"""show_on_tile

Revision: 0057
Revision ID: 36a48ba6355f
Revises: 24537c5bdb0
Create Date: 2016-05-10 12:45:39.334089

"""

# revision identifiers, used by Alembic.
revision = '36a48ba6355f'
down_revision = '24537c5bdb0'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.add_column('card_model_attributes', sa.Column('show_on_tile', sa.Boolean(), nullable=True))
    op.execute("UPDATE card_model_attributes SET show_on_tile = false")
    op.execute("UPDATE card_model_attributes SET show_on_tile = true WHERE type_name IN ('labels', 'group_type', 'files', 'members', 'date', 'indicators', 'size', 'relationships')")


def downgrade():
    op.drop_column('card_model_attributes', 'show_on_tile')
