# Generated by Django 3.0.3 on 2020-02-21 10:00

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [("StudentVillage", "0001_initial")]

    operations = [
        migrations.CreateModel(
            name="Dormroom",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "number",
                    models.SmallIntegerField(help_text="Kollektivnummer i studentby"),
                ),
                (
                    "village",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="StudentVillage.StudentVillage",
                    ),
                ),
            ],
        ),
        migrations.AddConstraint(
            model_name="dormroom",
            constraint=models.UniqueConstraint(
                fields=("number", "village"), name="unique_dorm"
            ),
        ),
    ]
