# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-12-06 23:39
from __future__ import unicode_literals

from django.db import migrations, models
from djeddit.models import Thread


def genSlugs(apps, schema_editor):
    for t in Thread.objects.all().iterator():
        t.save()


class Migration(migrations.Migration):
    dependencies = [
        ('djeddit', '0005_thread_is_stickied'),
    ]

    operations = [
        migrations.AddField(
            model_name='thread',
            name='slug',
            field=models.SlugField(null=True),
        ),
        migrations.RunPython(genSlugs)
    ]
