# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-09-19 19:27
from __future__ import unicode_literals

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


class Migration(migrations.Migration):
    dependencies = [
        ('course_metadata', '0059_auto_20171002_1705'),
    ]

    operations = [
        migrations.CreateModel(
            name='SubjectTranslation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
                ('name_t', models.CharField(max_length=255)),
                ('subtitle_t', models.CharField(blank=True, max_length=255, null=True)),
                ('description_t', models.TextField(blank=True, null=True)),
                ('master',
                 models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations',
                                   to='course_metadata.Subject')),
            ],
            options={
                'verbose_name': 'Subject model translations',
            },
        ),
        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_t'),
        ),
        migrations.AlterUniqueTogether(
            name='subject',
            unique_together=set([('partner', 'slug'), ('partner', 'uuid')]),
        ),
        migrations.AlterUniqueTogether(
            name='subjecttranslation',
            unique_together=set([('language_code', 'master')]),
        ),
    ]
