# Generated by Django 2.2.4 on 2019-08-29 08:21

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


class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('location', '0008_auto_20190827_1302'),
        ('main', '0010_award_title'),
    ]

    operations = [
        migrations.CreateModel(
            name='MetaData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label', utils.models.TJSONField(blank=True, default=None, help_text='{"en":"some text"}', null=True, verbose_name='label')),
            ],
            options={
                'verbose_name': 'metadata',
                'verbose_name_plural': 'metadata',
            },
            bases=(utils.models.TranslatedFieldsMixin, models.Model),
        ),
        migrations.CreateModel(
            name='MetaDataContent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.PositiveIntegerField()),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
                ('metadata', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.MetaData')),
            ],
        ),
        migrations.CreateModel(
            name='MetaDataCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('public', models.BooleanField()),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
                ('country', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='location.Country')),
            ],
        ),
        migrations.AddField(
            model_name='metadata',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.MetaDataCategory', verbose_name='category'),
        ),
    ]
