# Generated by Django 2.1.7 on 2019-04-02 18:39

import datetime
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='SurveyEntryInstance',
            fields=[
                ('id', models.AutoField(editable=False, primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='SurveyInstance',
            fields=[
                ('id', models.AutoField(editable=False, primary_key=True, serialize=False)),
                ('date_generated', models.DateTimeField(default=django.utils.timezone.now)),
                ('survey', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='api.Survey')),
            ],
        ),
        migrations.RemoveField(
            model_name='surveyresponse',
            name='survey_question',
        ),
        migrations.AlterField(
            model_name='position',
            name='timestamp',
            field=models.DateTimeField(default=datetime.datetime(2019, 4, 2, 18, 39, 25, 83552, tzinfo=utc)),
        ),
        migrations.AlterField(
            model_name='session',
            name='expires',
            field=models.DateTimeField(default=datetime.datetime(2019, 4, 3, 18, 39, 25, 82555, tzinfo=utc)),
        ),
        migrations.AlterField(
            model_name='session',
            name='timestamp',
            field=models.DateTimeField(default=datetime.datetime(2019, 4, 2, 18, 39, 24, 982793, tzinfo=utc), editable=False),
        ),
        migrations.CreateModel(
            name='SurveyPositionInstance',
            fields=[
                ('surveyentryinstance_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='api.SurveyEntryInstance')),
                ('position', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='api.Position')),
            ],
            bases=('api.surveyentryinstance',),
        ),
        migrations.CreateModel(
            name='SurveyQuestionInstance',
            fields=[
                ('surveyentryinstance_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='api.SurveyEntryInstance')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='api.SurveyQuestion')),
            ],
            bases=('api.surveyentryinstance',),
        ),
        migrations.AddField(
            model_name='surveyentryinstance',
            name='survey_instance',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='api.SurveyInstance'),
        ),
        migrations.AddField(
            model_name='surveyresponse',
            name='survey_entry',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='api.SurveyEntryInstance'),
        ),
    ]
