Skip to content

Commit

Permalink
fix: increase item_id max lenght from 128 to 255 for peer, staff and …
Browse files Browse the repository at this point in the history
…studenttraining workflows
  • Loading branch information
vunguyen-dmt committed Mar 6, 2024
1 parent 2e8ed09 commit a8a6e8e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
@@ -0,0 +1,28 @@
# Generated by Django 3.2.24 on 2024-03-06 10:19

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('assessment', '0008_alter_historicalsharedfileupload_options'),
]

operations = [
migrations.AlterField(
model_name='peerworkflow',
name='item_id',
field=models.CharField(db_index=True, max_length=255),
),
migrations.AlterField(
model_name='staffworkflow',
name='item_id',
field=models.CharField(db_index=True, max_length=255),
),
migrations.AlterField(
model_name='studenttrainingworkflow',
name='item_id',
field=models.CharField(db_index=True, max_length=255),
),
]
2 changes: 1 addition & 1 deletion openassessment/assessment/models/peer.py
Expand Up @@ -111,7 +111,7 @@ class PeerWorkflow(models.Model):
TIME_LIMIT = timedelta(hours=8)

student_id = models.CharField(max_length=40, db_index=True)
item_id = models.CharField(max_length=128, db_index=True)
item_id = models.CharField(max_length=255, db_index=True)
course_id = models.CharField(max_length=255, db_index=True)
submission_uuid = models.CharField(max_length=128, db_index=True, unique=True)
created_at = models.DateTimeField(default=now, db_index=True)
Expand Down
2 changes: 1 addition & 1 deletion openassessment/assessment/models/staff.py
Expand Up @@ -32,7 +32,7 @@ class StaffWorkflow(models.Model):

scorer_id = models.CharField(max_length=40, db_index=True, blank=True)
course_id = models.CharField(max_length=255, db_index=True)
item_id = models.CharField(max_length=128, db_index=True)
item_id = models.CharField(max_length=255, db_index=True)
submission_uuid = models.CharField(max_length=128, db_index=True, unique=True)
created_at = models.DateTimeField(default=now, db_index=True)
grading_completed_at = models.DateTimeField(null=True, db_index=True, blank=True)
Expand Down
2 changes: 1 addition & 1 deletion openassessment/assessment/models/student_training.py
Expand Up @@ -23,7 +23,7 @@ class StudentTrainingWorkflow(models.Model):
# Since submissions are immutable, we can do this without
# jeopardizing data integrity.
student_id = models.CharField(max_length=40, db_index=True)
item_id = models.CharField(max_length=128, db_index=True)
item_id = models.CharField(max_length=255, db_index=True)
course_id = models.CharField(max_length=255, db_index=True)

class Meta:
Expand Down

0 comments on commit a8a6e8e

Please sign in to comment.