# Generated by Django 2.2 on 2019-07-25 01:40

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields


class Migration(migrations.Migration):

    dependencies = [
        ('aims', '0076_resources_extra_fields'),
    ]

    operations = [
        migrations.CreateModel(
            name='ActivityTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('activity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='aims.Activity')),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('code', models.CharField(max_length=10, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=2048)),
                ('name_en', models.CharField(max_length=2048, null=True)),
                ('name_my', models.CharField(max_length=2048, null=True)),
                ('name_ru', models.CharField(max_length=2048, null=True)),
                ('name_tm', models.CharField(max_length=2048, null=True)),
                ('name_uz', models.CharField(max_length=2048, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='TagVocabulary',
            fields=[
                ('code', models.CharField(max_length=10, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=140)),
                ('name_en', models.CharField(max_length=140, null=True)),
                ('name_my', models.CharField(max_length=140, null=True)),
                ('name_ru', models.CharField(max_length=140, null=True)),
                ('name_tm', models.CharField(max_length=140, null=True)),
                ('name_uz', models.CharField(max_length=140, null=True)),
            ],
        ),
        migrations.AddField(
            model_name='tag',
            name='vocabulary',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='aims.TagVocabulary'),
        ),
        migrations.AddField(
            model_name='activitytag',
            name='tag',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='aims.Tag'),
        ),
        migrations.AddField(
            model_name='activity',
            name='tag',
            field=models.ManyToManyField(through='aims.ActivityTag', to='aims.Tag'),
        ),
        migrations.AlterUniqueTogether(
            name='activitytag',
            unique_together={('activity', 'tag')},
        ),
    ]
