"""group_type_attributes_display_on_card_label

Revision: 0152
Revision ID: 4fd1516bbd51
Revises: 3124afe3927f
Create Date: 2018-12-04 15:13:45.509776

"""

# revision identifiers, used by Alembic.
revision = '4fd1516bbd51'
down_revision = '3124afe3927f'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.execute("""
        UPDATE card_group_types SET display_on_card='label' FROM attributes
        WHERE card_group_types.attribute_id=attributes.id AND attributes.show_on_tile=true AND card_group_types.display_on_card IS NULL
    """)


def downgrade():
    pass
