<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function

from django.db import migrations
from crashmanager.models import CrashEntry

def create_migration_tool(apps, schema_editor):
    for entry in CrashEntry.objects.filter(cachedCrashInfo=None):
        entry.save(update_fields=['cachedCrashInfo'])

class Migration(migrations.Migration):

    dependencies = [
        ('crashmanager', '0012_crashentry_cachedcrashinfo'),
    ]

    operations = [
        migrations.RunPython(
            create_migration_tool,
        ),
    ]<commit_msg>[CrashManager] Use the right model in migration (#190)<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function

from django.db import migrations

def create_migration_tool(apps, schema_editor):
    CrashEntry = apps.get_model("crashmanager", "CrashEntry")
    for entry in CrashEntry.objects.filter(cachedCrashInfo=None):
        entry.save(update_fields=['cachedCrashInfo'])

class Migration(migrations.Migration):

    dependencies = [
        ('crashmanager', '0012_crashentry_cachedcrashinfo'),
    ]

    operations = [
        migrations.RunPython(
            create_migration_tool,
        ),
    ]
{'fraction_non_alphanumeric': 0.10195758564437195, 'fraction_numerical': 0.010603588907014683, 'mean_word_length': 3.8307086614173227, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3953820', 'n_tokens_mistral': 374, 'n_tokens_neox': 361, 'n_words': 70}