# -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2020-04-27 23:36
from __future__ import unicode_literals

from democracylab.models import generate_uuid
from civictechprojects.models import Contributor
from django.db import migrations


def backfill_user_uuids(apps, schema_editor):
    for user in Contributor.objects.all():
        user.uuid = generate_uuid()
        user.save()


class Migration(migrations.Migration):

    dependencies = [
        ('democracylab', '0006_auto_20200427_2336'),
    ]

    operations = [
        migrations.RunPython(backfill_user_uuids)
    ]
