<filename>core/migrations/0029_auto_20210814_0250.py
# Generated by Django 3.2.5 on 2021-08-14 09:50

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0028_expopushtoken'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='event',
            name='users',
        ),
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(null=True, upload_to='')),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='submissions', to='core.event')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddConstraint(
            model_name='submission',
            constraint=models.UniqueConstraint(fields=('user', 'event'), name='core_submission_user_event'),
        ),
        migrations.AddField(
            model_name='event',
            name='users',
            field=models.ManyToManyField(blank=True, related_name='events', through='core.Submission', to=settings.AUTH_USER_MODEL),
        ),
    ]

<filename>core/migrations/0029_auto_20210814_0250.py
# Generated by Django 3.2.5 on 2021-08-14 09:50

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0028_expopushtoken'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='event',
            name='users',
        ),
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(null=True, upload_to='')),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='submissions', to='core.event')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddConstraint(
            model_name='submission',
            constraint=models.UniqueConstraint(fields=('user', 'event'), name='core_submission_user_event'),
        ),
        migrations.AddField(
            model_name='event',
            name='users',
            field=models.ManyToManyField(blank=True, related_name='events', through='core.Submission', to=settings.AUTH_USER_MODEL),
        ),
    ]

# Generated by Django 3.2.5 on 2021-08-14 09:50