# Generated by Django 4.2.19 on 2025-03-25 17:25

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


class Migration(migrations.Migration):

    dependencies = [
        ('submissions', '0003_ensure_ascii'),
    ]

    operations = [
        migrations.CreateModel(
            name='ExternalGraderDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('queue_name', models.CharField(max_length=128)),
                ('grader_file_name', models.CharField(default='', max_length=128)),
                ('points_possible', models.PositiveIntegerField(default=1)),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('pulled', 'Pulled'),
                                                     ('retired', 'Retired'), ('failed', 'Failed')],
                                            default='pending', max_length=20)),
                ('pullkey', models.CharField(blank=True, max_length=128, null=True)),
                ('grader_reply', models.TextField(blank=True, null=True)),
                ('status_time', models.DateTimeField(db_index=True, default=django.utils.timezone.now)),
                ('created_at', models.DateTimeField(db_index=True, default=django.utils.timezone.now)),
                ('num_failures', models.PositiveIntegerField(default=0)),
                ('submission', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE,
                                                    related_name='external_grader_detail',
                                                    to='submissions.submission')),
            ],
            options={
                'ordering': ['-created_at'],
                'indexes': [models.Index(fields=['queue_name', 'status', 'status_time'],
                                         name='submissions_queue_n_fbabd8_idx')],
            },
        ),
    ]
