# Generated by Django 4.1.1 on 2022-12-20 12:27

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


class Migration(migrations.Migration):

    dependencies = [
        ('main', '0038_alter_groups_options_groups_graduation_date'),
    ]

    operations = [
        migrations.CreateModel(
            name='Template_files',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(auto_now_add=True, verbose_name='Дата шаблона')),
                ('title', models.CharField(max_length=50, verbose_name='Название')),
                ('file', models.FileField(blank=True, upload_to='templates/%Y/%m', verbose_name='Файл шаблона')),
            ],
            options={
                'verbose_name': 'Шаблон',
                'verbose_name_plural': 'Шаблоны',
            },
        ),
        migrations.AlterModelOptions(
            name='groups',
            options={'ordering': ['-graduation_date', '-title'], 'verbose_name': 'Группа', 'verbose_name_plural': 'Группы'},
        ),
        migrations.AddField(
            model_name='protocols',
            name='template',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='main.template_files', verbose_name='Шаблон'),
            preserve_default=False,
        ),
    ]
