<reponame>rcxwhiz/django_py_grader
# Generated by Django 3.1.4 on 2021-01-05 16:57

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

import py_grader.models


class Migration(migrations.Migration):
	initial = True

	dependencies = [
	]

	operations = [
        migrations.CreateModel(
            name='Assignment',
            fields=[
	            ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
	            ('assignment_name', models.CharField(max_length=255, unique=True, verbose_name='Assignment Name')),
	            ('key_source_code', models.TextField(verbose_name='Source Code')),
	            ('open_time', models.DateTimeField(verbose_name='Open Time')),
	            ('close_time', models.DateTimeField(verbose_name='Close Time')),
	            ('total_submissions', models.IntegerField(default=0, verbose_name='Total Submissions')),
	            ('number_students_submited',
	             models.IntegerField(default=0, verbose_name='Number of Students Submitted')),
	            ('number_submissions_allowed',
	             models.IntegerField(default=100, verbose_name='Number Submissions Allowed')),
	            ('number_test_cases', models.IntegerField(default=0, verbose_name='Number Test Cases')),
	            ('allowed_packages',
	             models.CharField(blank=True, max_length=255, null=True, verbose_name='Allowed Packages')),
            ],
        ),
        migrations.CreateModel(
            name='GradingMethod',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grading_method', models.CharField(max_length=255, unique=True, verbose_name='Grading Method')),
            ],
        ),
        migrations.CreateModel(
            name='NetID',
            fields=[
	            ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
	            ('net_id', models.CharField(max_length=255, unique=True, verbose_name='NetID')),
	            ('name', models.CharField(blank=True, max_length=255, verbose_name='Name')),
	            ('first_name', models.CharField(blank=True, max_length=255, verbose_name='First Name')),
	            ('last_name', models.CharField(blank=True, max_length=255, verbose_name='Last Name')),
            ],
        ),
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('submission_source_code', models.TextField(verbose_name='Source Code')),
                ('submission_time', models.DateTimeField(verbose_name='Submission Time')),
                ('submission_number', models.IntegerField(verbose_name='Submission Number')),
                ('ip_address', models.GenericIPAddressField(verbose_name='Submission IP Address')),
                ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.assignment', verbose_name='Assignment')),
                ('net_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.netid', verbose_name='NetID')),
            ],
        ),
		migrations.CreateModel(
			name='TestCase',
			fields=[
				('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
				('test_case_number', models.IntegerField(verbose_name='Test Case Number')),
				('test_case_input', models.TextField(verbose_name='Test Case Input')),
				('test_case_output', models.TextField(verbose_name='Test Case Output')),
				('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.assignment',
				                                 verbose_name='Assignment')),
			],
		),
		migrations.CreateModel(
			name='TestCaseFile',
			fields=[
				('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
				('test_case_file',
				 models.FileField(upload_to=py_grader.models.content_file_name, verbose_name='Test Case File')),
				('test_case', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.testcase',
				                                verbose_name='Test Case')),
			],
		),
		migrations.CreateModel(
			name='SubmissionResult',
			fields=[
				('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
				('submission_grade', models.FloatField(verbose_name='Submission Grade')),
				('submission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.submission',
				                                 verbose_name='Submission')),
			],
		),
		migrations.CreateModel(
			name='SubmissionCaseResult',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('test_case_number', models.IntegerField(verbose_name='Test Case Number')),
                ('submission_output', models.TextField(verbose_name='Submission Output')),
                ('expected_output', models.TextField(verbose_name='Expected Output')),
                ('correct', models.BooleanField(verbose_name='Correct')),
                ('submission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.submission', verbose_name='Submission')),
                ('test_case', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.testcase', verbose_name='Test Case')),
            ],
        ),
        migrations.CreateModel(
            name='NumberSubmissions',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number_submissions', models.IntegerField(default=0, verbose_name='Number Submissions')),
                ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.assignment', verbose_name='Assignment')),
                ('net_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.netid', verbose_name='NetID')),
            ],
        ),
        migrations.AddField(
            model_name='assignment',
            name='grading_method',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='py_grader.gradingmethod', verbose_name='Grading Method'),
        ),
    ]

# Generated by Django 3.1.4 on 2021-01-05 16:57

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

import py_grader.models


class Migration(migrations.Migration):
	initial = True

	dependencies = [
	]

	operations = [
        migrations.CreateModel(
            name='Assignment',
            fields=[
	            ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
	            ('assignment_name', models.CharField(max_length=255, unique=True, verbose_name='Assignment Name')),
	            ('key_source_code', models.TextField(verbose_name='Source Code')),
	            ('open_time', models.DateTimeField(verbose_name='Open Time')),
	            ('close_time', models.DateTimeField(verbose_name='Close Time')),
	            ('total_submissions', models.IntegerField(default=0, verbose_name='Total Submissions')),
	            ('number_students_submited',
	             models.IntegerField(default=0, verbose_name='Number of Students Submitted')),
	            ('number_submissions_allowed',
	             models.IntegerField(default=100, verbose_name='Number Submissions Allowed')),
	            ('number_test_cases', models.IntegerField(default=0, verbose_name='Number Test Cases')),
	            ('allowed_packages',
	             models.CharField(blank=True, max_length=255, null=True, verbose_name='Allowed Packages')),
            ],
        ),
        migrations.CreateModel(
            name='GradingMethod',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grading_method', models.CharField(max_length=255, unique=True, verbose_name='Grading Method')),
            ],
        ),
        migrations.CreateModel(
            name='NetID',
            fields=[
	            ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
	            ('net_id', models.CharField(max_length=255, unique=True, verbose_name='NetID')),
	            ('name', models.CharField(blank=True, max_length=255, verbose_name='Name')),
	            ('first_name', models.CharField(blank=True, max_length=255, verbose_name='First Name')),
	            ('last_name', models.CharField(blank=True, max_length=255, verbose_name='Last Name')),
            ],
        ),
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('submission_source_code', models.TextField(verbose_name='Source Code')),
                ('submission_time', models.DateTimeField(verbose_name='Submission Time')),
                ('submission_number', models.IntegerField(verbose_name='Submission Number')),
                ('ip_address', models.GenericIPAddressField(verbose_name='Submission IP Address')),
                ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.assignment', verbose_name='Assignment')),
                ('net_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.netid', verbose_name='NetID')),
            ],
        ),
		migrations.CreateModel(
			name='TestCase',
			fields=[
				('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
				('test_case_number', models.IntegerField(verbose_name='Test Case Number')),
				('test_case_input', models.TextField(verbose_name='Test Case Input')),
				('test_case_output', models.TextField(verbose_name='Test Case Output')),
				('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.assignment',
				                                 verbose_name='Assignment')),
			],
		),
		migrations.CreateModel(
			name='TestCaseFile',
			fields=[
				('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
				('test_case_file',
				 models.FileField(upload_to=py_grader.models.content_file_name, verbose_name='Test Case File')),
				('test_case', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.testcase',
				                                verbose_name='Test Case')),
			],
		),
		migrations.CreateModel(
			name='SubmissionResult',
			fields=[
				('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
				('submission_grade', models.FloatField(verbose_name='Submission Grade')),
				('submission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.submission',
				                                 verbose_name='Submission')),
			],
		),
		migrations.CreateModel(
			name='SubmissionCaseResult',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('test_case_number', models.IntegerField(verbose_name='Test Case Number')),
                ('submission_output', models.TextField(verbose_name='Submission Output')),
                ('expected_output', models.TextField(verbose_name='Expected Output')),
                ('correct', models.BooleanField(verbose_name='Correct')),
                ('submission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.submission', verbose_name='Submission')),
                ('test_case', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.testcase', verbose_name='Test Case')),
            ],
        ),
        migrations.CreateModel(
            name='NumberSubmissions',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number_submissions', models.IntegerField(default=0, verbose_name='Number Submissions')),
                ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.assignment', verbose_name='Assignment')),
                ('net_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='py_grader.netid', verbose_name='NetID')),
            ],
        ),
        migrations.AddField(
            model_name='assignment',
            name='grading_method',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='py_grader.gradingmethod', verbose_name='Grading Method'),
        ),
    ]
# Generated by Django 3.1.4 on 2021-01-05 16:57