# Generated by Django 2.1.7 on 2019-02-27 12:16

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


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0001_initial'),
    ]

    atomic = False

    operations = [
        migrations.CreateModel(
            name='Element',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('icon', models.ImageField(upload_to='static/icon/element/')),
                ('name', models.CharField(max_length=64)),
                ('description', models.CharField(blank=True, max_length=512, null=True)),
                ('date', models.DateField()),
                ('moderator_checked', models.NullBooleanField()),
            ],
            options={
                'verbose_name': 'Елемент',
                'verbose_name_plural': 'Елементы',
                'db_table': 'elements',
                'managed': True,
            },
        ),
        migrations.AlterModelOptions(
            name='group',
            options={'managed': True, 'verbose_name': 'Группа', 'verbose_name_plural': 'Группы'},
        ),
        migrations.AddField(
            model_name='group',
            name='group',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rel_groups', to='api.Group', verbose_name='группа'),
        ),
        migrations.AlterField(
            model_name='group',
            name='description',
            field=models.CharField(blank=True, max_length=512, null=True),
        ),
        migrations.AlterField(
            model_name='group',
            name='icon',
            field=models.ImageField(upload_to='static/icon/group/', verbose_name='иконка'),
        ),
        migrations.AlterModelTable(
            name='group',
            table='groups',
        ),
        migrations.AddField(
            model_name='element',
            name='group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='element', to='api.Group'),
        ),
    ]
