<commit_before># Generated by Django 3.1.4 on 2020-12-11 00:39

from django.db import migrations


def copy_columns(apps, schema_editor):
    Exercise = apps.get_model('exercises', 'Exercise')
    ExerciseBase = apps.get_model('exercises', 'ExerciseBase')

    for exercise in Exercise.objects.all():
        exercise_base = ExerciseBase.objects.create(
            category=exercise.category,
        )
        exercise_base.equipment.set(exercise.equipment.all())
        exercise_base.muscles.set(exercise.muscles.all())
        exercise_base.muscles_secondary.set(exercise.muscles_secondary.all())
        exercise_base.status = exercise.status
        exercise_base.save()

        exercise.exercise_base = exercise_base
        exercise.save()


class Migration(migrations.Migration):

    dependencies = [
        ('exercises', '0008_exercisebase'),
    ]

    operations = [<commit_msg>Also set the license data when copying over from the exercise model<commit_after># Generated by Django 3.1.4 on 2020-12-11 00:39

from django.db import migrations


def copy_columns(apps, schema_editor):
    Exercise = apps.get_model('exercises', 'Exercise')
    ExerciseBase = apps.get_model('exercises', 'ExerciseBase')

    for exercise in Exercise.objects.all():
        exercise_base = ExerciseBase.objects.create(
            category=exercise.category,
        )
        exercise_base.equipment.set(exercise.equipment.all())
        exercise_base.muscles.set(exercise.muscles.all())
        exercise_base.muscles_secondary.set(exercise.muscles_secondary.all())
        exercise_base.status = exercise.status
        exercise_base.license = exercise.license
        exercise_base.license_author = exercise.license_author
        exercise_base.license_author = exercise.license_author
        exercise_base.save()

        exercise.exercise_base = exercise_base
        exercise.save()


class Migration(migrations.Migration):

    dependencies = [
        ('exercises', '0008_exercisebase'),
    ]

    operations = [
{'fraction_non_alphanumeric': 0.10064452156668319, 'fraction_numerical': 0.018839861179970253, 'mean_word_length': 3.321199143468951, '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': '931076', 'n_tokens_mistral': 623, 'n_tokens_neox': 561, 'n_words': 103}