# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2019-01-21 17:01
from __future__ import unicode_literals

from django.db import migrations, models

def migrate_data(apps, schema_editor):
    Project = apps.get_model('djangoldp_project', 'Project')
    for project in Project.objects.all():
        project.jabberID = project.chatConfig.jabberID
        project.jabberRoom = project.chatConfig.jabberRoom
        project.save()

class Migration(migrations.Migration):

    dependencies = [
        ('djangoldp_project', '0002_move_jabber'),
    ]

    operations = [
        migrations.AddField(
            model_name='project',
            name='jabberID',
            field=models.CharField(blank=True, max_length=255, null=True),
        ),
        migrations.AddField(
            model_name='project',
            name='jabberRoom',
            field=models.BooleanField(default=True),
        ),
        migrations.RunPython(migrate_data),
    ]
