# -*- coding: utf-8 -*-
# Generated by Django 1.11.27 on 2020-02-18 19:00
from __future__ import unicode_literals

from django.db import migrations


def forwards_func(apps, schema_editor):
    """Old models with provider_data='' are being fetched as str instead of json."""
    Integration = apps.get_model('integrations', 'Integration')

    Integration.objects.filter(
        provider_data='',
    ).update(
        provider_data={},
    )


class Migration(migrations.Migration):

    dependencies = [
        ('integrations', '0006_set-default-value-provider-data'),
    ]

    operations = [
        migrations.RunPython(forwards_func),
    ]
