# Generated by Django 3.2.13 on 2023-06-28 13:42

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


class Migration(migrations.Migration):

    dependencies = [
        ('users', '0005_alter_news_photo'),
    ]

    operations = [
        migrations.CreateModel(
            name='NewsPhoto',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('photo', models.ImageField(upload_to='', verbose_name='Фото')),
            ],
            options={
                'verbose_name': 'Фото новости',
                'verbose_name_plural': 'Фото новостей',
            },
        ),
        migrations.RemoveField(
            model_name='news',
            name='photo',
        ),
        migrations.DeleteModel(
            name='Photo',
        ),
        migrations.AddField(
            model_name='newsphoto',
            name='news',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='photos', to='users.news', verbose_name='Новость'),
        ),
    ]
