# Generated by Django 3.2.7 on 2021-11-26 14:22

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


def remove_existing_download_entries(apps, schema_editor):
    """
    Remove existing barriersearchcsvdownloadevent
    """
    BarrierSearchCsvDownloadEvent = apps.get_model(
        "barriers", "BarrierSearchCsvDownloadEvent"
    )
    BarrierSearchCsvDownloadEvent.objects.all().delete()

class Migration(migrations.Migration):

    dependencies = [
        ("barriers", "0113_alter_barrier_options"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="barriersearchcsvdownloadevent",
            name="user",
        ),
        migrations.AddField(
            model_name="barriersearchcsvdownloadevent",
            name="barrier_ids",
            field=models.CharField(
                default="",
                max_length=255,
                validators=[django.core.validators.int_list_validator],
            ),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="barriersearchcsvdownloadevent",
            name="email",
            field=models.EmailField(default="", max_length=254),
            preserve_default=False,
        ),
        migrations.RunPython(remove_existing_download_entries, reverse_code=migrations.RunPython.noop),
    ]
