# -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2018-02-02 11:04
from __future__ import unicode_literals

from django.db import migrations, models
import uuid


def create_uuid(apps, schema_editor):
    UserProfile = apps.get_model('profiles', 'UserProfile')
    for user in UserProfile.objects.all():
        user.uuid = uuid.uuid4()
        user.save(update_fields=['uuid'])


class Migration(migrations.Migration):

    dependencies = [
        ('profiles', '0019_add_uuid_field'),
    ]

    operations = [
        migrations.RunPython(create_uuid),
    ]
