# Generated by Django 3.2.20 on 2023-10-09 04:50

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('winget', '0005_installer_upload_to'),
    ]

    operations = [
        migrations.AddField(
            model_name='installer',
            name='nested_installer',
            field=models.CharField(blank=True, help_text='If this is a zip file, which installer inside it should be run?', max_length=512),
        ),
        migrations.AddField(
            model_name='installer',
            name='nested_installer_type',
            field=models.CharField(blank=True, choices=[('msix', 'msix'), ('msi', 'msi'), ('appx', 'appx'), ('exe', 'exe'), ('inno', 'inno'), ('nullsoft', 'nullsoft'), ('wix', 'wix'), ('burn', 'burn'), ('portable', 'portable')], help_text="If this is a zip file, what's the type of the nested installer?", max_length=8, null=True),
        ),
        migrations.AddConstraint(
            model_name='installer',
            constraint=models.CheckConstraint(check=models.Q(models.Q(('type', 'zip'), models.Q(('nested_installer', ''), _negated=True)), models.Q(models.Q(('type', 'zip'), _negated=True), ('nested_installer', '')), _connector='OR'), name='nested_installer_iff_zip'),
        ),
        migrations.AddConstraint(
            model_name='installer',
            constraint=models.CheckConstraint(check=models.Q(models.Q(('type', 'zip'), models.Q(('nested_installer_type', None), _negated=True)), models.Q(models.Q(('type', 'zip'), _negated=True), ('nested_installer_type', None)), _connector='OR'), name='nested_installer_type_iff_zip'),
        ),
    ]
