<gh_stars>1-10
# Generated by Django 3.1.5 on 2021-03-30 16:11

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


class Migration(migrations.Migration):

    dependencies = [
        ('news', '0001_inital_base_models'),
    ]

    operations = [
        migrations.CreateModel(
            name='NewsPhoto',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('image', models.ImageField(storage=django_minio_backend.models.MinioBackend(bucket_name='images'), upload_to=django_minio_backend.models.iso_date_prefix)),
                ('orientation', models.CharField(choices=[('VERTICAL', 'Вертикальный'), ('HORIZONTAL', 'Горизонтальный')], max_length=10)),
                ('format', models.CharField(choices=[('LARGE', 'Большой'), ('MEDIUM', 'Средний'), ('SMALL', 'Маленький')], max_length=10)),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='photos', to='news.news')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='news',
            name='photo',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='news.newsphoto'),
        ),
    ]

# Generated by Django 3.1.5 on 2021-03-30 16:11

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


class Migration(migrations.Migration):

    dependencies = [
        ('news', '0001_inital_base_models'),
    ]

    operations = [
        migrations.CreateModel(
            name='NewsPhoto',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('image', models.ImageField(storage=django_minio_backend.models.MinioBackend(bucket_name='images'), upload_to=django_minio_backend.models.iso_date_prefix)),
                ('orientation', models.CharField(choices=[('VERTICAL', 'Вертикальный'), ('HORIZONTAL', 'Горизонтальный')], max_length=10)),
                ('format', models.CharField(choices=[('LARGE', 'Большой'), ('MEDIUM', 'Средний'), ('SMALL', 'Маленький')], max_length=10)),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='photos', to='news.news')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='news',
            name='photo',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='news.newsphoto'),
        ),
    ]
# Generated by Django 3.1.5 on 2021-03-30 16:11