# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-10-05 19:31
from __future__ import unicode_literals

import django_extensions.db.fields
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('course_metadata', '0062_courserun_license'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='subject',
            name='description',
        ),
        migrations.RemoveField(
            model_name='subject',
            name='name',
        ),
        migrations.RemoveField(
            model_name='subject',
            name='subtitle',
        ),
        migrations.AddField(
            model_name='subjecttranslation',
            name='description',
            field=models.TextField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='subjecttranslation',
            name='name',
            field=models.CharField(blank=True, max_length=255),
        ),
        migrations.AddField(
            model_name='subjecttranslation',
            name='subtitle',
            field=models.CharField(blank=True, max_length=255, null=True),
        ),
        migrations.AlterField(
            model_name='subject',
            name='slug',
            field=django_extensions.db.fields.AutoSlugField(blank=True, editable=False,
                                                            help_text='Leave this field blank to have the value generated automatically.',
                                                            populate_from='name'),
        ),
        migrations.RunSQL(
            ["UPDATE course_metadata_subjecttranslation SET name = name_t",
             "UPDATE course_metadata_subjecttranslation SET description = description_t",
             "UPDATE course_metadata_subjecttranslation SET subtitle = subtitle_t"],
            ["UPDATE course_metadata_subjecttranslation SET name_t = name",
             "UPDATE course_metadata_subjecttranslation SET description_t = description",
             "UPDATE course_metadata_subjecttranslation SET subtitle_t = subtitle"],
        ),
        migrations.AlterField(
            model_name='subjecttranslation',
            name='name',
            field=models.CharField(max_length=255),
        ),
    ]
