# Generated by Django 2.2.7 on 2019-11-20 10:10

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


class Migration(migrations.Migration):

    dependencies = [
        ('gallery', '0006_merge_20191027_1758'),
        ('location', '0029_merge_20191119_1438'),
    ]

    operations = [
        migrations.CreateModel(
            name='CityGallery',
            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')),
                ('city', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='city_gallery', to='location.City', verbose_name='city')),
                ('image', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='city_gallery', to='gallery.Image', verbose_name='image')),
            ],
            options={
                'verbose_name': 'city gallery',
                'verbose_name_plural': 'city galleries',
                'unique_together': {('city', 'is_main'), ('city', 'image')},
            },
        ),
        migrations.AddField(
            model_name='city',
            name='gallery',
            field=models.ManyToManyField(through='location.CityGallery', to='gallery.Image'),
        ),
    ]
