# Generated by Django 2.2.7 on 2020-01-28 09:04

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


class Migration(migrations.Migration):

    dependencies = [
        ('gallery', '0008_merge_20191212_0752'),
        ('establishment', '0079_auto_20200124_0720'),
    ]

    operations = [
        migrations.AlterField(
            model_name='menuuploads',
            name='file',
            field=models.FileField(upload_to='', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=('doc', 'docx', 'pdf'))], verbose_name='File'),
        ),
        migrations.AlterField(
            model_name='menuuploads',
            name='menu',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='menu_uploads', to='establishment.Menu', verbose_name='menu'),
        ),
        migrations.CreateModel(
            name='MenuGallery',
            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')),
                ('image', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='menu_gallery', to='gallery.Image', verbose_name='image')),
                ('menu', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='menu_gallery', to='establishment.Menu', verbose_name='menu')),
            ],
            options={
                'verbose_name': 'menu gallery',
                'verbose_name_plural': 'menu galleries',
                'unique_together': {('menu', 'image'), ('menu', 'is_main')},
            },
        ),
    ]
