# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-04-17 19:51

import os
import uuid
from django.db import migrations, models
from django.conf import settings


class Migration(migrations.Migration):

    dependencies = [("models", "5967_make_target_layer_configurable")]

    operations = [
        migrations.RunSQL(
            """
            update card_components set defaultconfig = jsonb_set(defaultconfig, '{basemap}', '"streets"') where componentname in ('related-resources-map-card', 'map-card');
            update cards set config = jsonb_set(config, '{basemap}', '"streets"') where componentid in ('2d2e0ca3-089c-4f4c-96a5-fb7eb53963bd','3c103484-22d1-4ca9-a9f3-eb3902d567ac'); 
            update card_components set defaultconfig = jsonb_set(defaultconfig, '{overlayConfigs}', '[]') where componentname in ('related-resources-map-card', 'map-card');
            update cards set config = jsonb_set(config, '{overlayConfigs}', '[]') where componentid in ('2d2e0ca3-089c-4f4c-96a5-fb7eb53963bd','3c103484-22d1-4ca9-a9f3-eb3902d567ac');
            """,
            """
            update card_components set defaultconfig = defaultconfig - 'basemap' where componentname in ('related-resources-map-card', 'map-card');
            update cards set config = config - 'basemap' where componentid in ('2d2e0ca3-089c-4f4c-96a5-fb7eb53963bd','3c103484-22d1-4ca9-a9f3-eb3902d567ac'); 
            update card_components set defaultconfig = defaultconfig - 'overlayConfigs' where componentname in ('related-resources-map-card', 'map-card');
            update cards set config = config - 'overlayConfigs' where componentid in ('2d2e0ca3-089c-4f4c-96a5-fb7eb53963bd','3c103484-22d1-4ca9-a9f3-eb3902d567ac'); 
            """,
        )
    ]
