# Generated by Django 3.0.13 on 2021-07-02 15:58

from django.db import migrations
from django.utils.crypto import get_random_string


def _forward(apps, schema_editor):
    for order in apps.get_model('orders', 'Order').objects.all():
        order.hash = get_random_string(length=10)
        order.save(update_fields=['hash'])


class Migration(migrations.Migration):

    dependencies = [
        ('orders', '0004_order_hash'),
    ]

    operations = [
        migrations.RunPython(
            _forward,
            migrations.RunPython.noop
        )
    ]
