# Generated by Django 5.1 on 2024-09-13 04:22 import django.core.validators import django.db.models.deletion import django.utils.timezone from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('course', '0121_alter_flowaccessexceptionentry_permission_and_more'), ] operations = [ migrations.CreateModel( name='Facility', fields=[ ('id', models.BigAutoField(primary_key=True, serialize=False)), ('identifier', models.CharField(db_index=True, max_length=200, unique=True, validators=[django.core.validators.RegexValidator('^(?P[a-zA-Z][a-zA-Z0-9_]*)$')])), ('description', models.TextField(blank=True, null=True)), ('secret', models.CharField(max_length=220)), ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='course.course')), ], options={ 'verbose_name_plural': 'Facilities', }, ), migrations.CreateModel( name='DenyEvent', fields=[ ('id', models.BigAutoField(primary_key=True, serialize=False)), ('event_id', models.UUIDField()), ('created', models.DateTimeField(verbose_name='Created time')), ('received_time', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Received time')), ('deny_uuid', models.UUIDField()), ('start', models.DateTimeField(db_index=True, verbose_name='Start time')), ('end', models.DateTimeField(db_index=True, verbose_name='End time')), ('cidr_blocks', models.JSONField()), ('test_facility', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='prairietest.facility')), ], ), migrations.CreateModel( name='AllowEvent', fields=[ ('id', models.BigAutoField(primary_key=True, serialize=False)), ('event_id', models.UUIDField()), ('created', models.DateTimeField(verbose_name='Created time')), ('received_time', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Received time')), ('user_uid', models.CharField(max_length=200)), ('user_uin', models.CharField(max_length=200)), ('exam_uuid', models.UUIDField()), ('start', models.DateTimeField(verbose_name='Start time')), ('end', models.DateTimeField(verbose_name='End time')), ('cidr_blocks', models.JSONField()), ('test_facility', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='prairietest.facility')), ], ), migrations.CreateModel( name='MostRecentDenyEvent', fields=[ ('id', models.BigAutoField(primary_key=True, serialize=False)), ('deny_uuid', models.UUIDField(unique=True)), ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='prairietest.denyevent')), ], ), migrations.AddIndex( model_name='facility', index=models.Index(fields=['course', 'identifier'], name='prairietest_course__2525b9_idx'), ), migrations.AddIndex( model_name='denyevent', index=models.Index(fields=['deny_uuid', 'created'], name='prairietest_deny_uu_bbbbf1_idx'), ), migrations.AddIndex( model_name='denyevent', index=models.Index(fields=['deny_uuid', 'start'], name='prairietest_deny_uu_b13822_idx'), ), migrations.AddIndex( model_name='denyevent', index=models.Index(fields=['deny_uuid', 'end'], name='prairietest_deny_uu_3c9537_idx'), ), migrations.AddIndex( model_name='allowevent', index=models.Index(fields=['user_uid', 'exam_uuid', 'start'], name='prairietest_user_ui_e93827_idx'), ), migrations.AddIndex( model_name='allowevent', index=models.Index(fields=['user_uid', 'exam_uuid', 'end'], name='prairietest_user_ui_e11aa4_idx'), ), ]