# Generated by Django 2.2.7 on 2019-12-13 08:59

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


class Migration(migrations.Migration):

    dependencies = [
        ('gallery', '0006_merge_20191027_1758'),
        ('collection', '0023_advertorial'),
    ]

    operations = [
        migrations.CreateModel(
            name='AdvertorialGallery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_main', models.BooleanField(default=False, verbose_name='Is the main image')),
                ('advertorial', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='advertorial_gallery', to='collection.Advertorial', verbose_name='advertorial')),
                ('image', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='advertorial_gallery', to='gallery.Image', verbose_name='image')),
            ],
            options={
                'verbose_name': 'advertorial gallery',
                'verbose_name_plural': 'advertorial galleries',
                'unique_together': {('advertorial', 'image')},
            },
        ),
        migrations.AddField(
            model_name='advertorial',
            name='gallery',
            field=models.ManyToManyField(through='collection.AdvertorialGallery', to='gallery.Image'),
        ),
    ]
