# Generated by Django 2.1.5 on 2019-02-04 15:17

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name="Study",
            fields=[
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True)),
                ("modified", models.DateTimeField(auto_now=True)),
                (
                    "datetime",
                    models.DateTimeField(
                        blank=True,
                        help_text="The date and time at which this study took place",
                        null=True,
                    ),
                ),
                ("name", models.CharField(max_length=255)),
                (
                    "patient",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="patients.Patient",
                    ),
                ),
            ],
            options={"abstract": False},
        ),
        migrations.AlterUniqueTogether(
            name="study", unique_together={("patient", "name")}
        ),
    ]
