# Generated by Django 4.2.6 on 2024-10-01 20:07

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("unconference", "0002_usereventdata"),
    ]

    operations = [
        migrations.CreateModel(
            name="Location",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=128)),
                ("geometry", models.JSONField(default=dict)),
            ],
        ),
        migrations.RemoveConstraint(
            model_name="room",
            name="unique_room",
        ),
        migrations.RemoveField(
            model_name="room",
            name="unconference_event",
        ),
        migrations.AddField(
            model_name="room",
            name="geometry",
            field=models.JSONField(default=dict),
        ),
        migrations.AddField(
            model_name="session",
            name="data",
            field=models.JSONField(default=dict),
        ),
        migrations.AddField(
            model_name="session",
            name="unconference_event",
            field=models.ForeignKey(
                default=1,
                on_delete=django.db.models.deletion.PROTECT,
                to="unconference.unconferenceevent",
            ),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="session",
            name="users",
            field=models.ManyToManyField(to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name="session",
            name="schedule_time",
            field=models.ForeignKey(
                blank=True,
                limit_choices_to={"allow_sessions": True},
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="unconference.scheduletime",
            ),
        ),
        migrations.AddField(
            model_name="room",
            name="location",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="unconference.location",
            ),
        ),
        migrations.AddField(
            model_name="unconferenceevent",
            name="location",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="unconference.location",
            ),
        ),
    ]
