Skip to content

Commit

Permalink
adding additional indexes in datamodel
Browse files Browse the repository at this point in the history
  • Loading branch information
ooemperor committed Jan 16, 2024
1 parent 038c736 commit fa20958
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion codeGrader/backend/db/Submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class Submission(Base):
task_id = Column(
Integer,
ForeignKey(Task.id, onupdate="CASCADE"),
nullable=False
nullable=False,
index=True
)

# Relationships
Expand Down
3 changes: 2 additions & 1 deletion codeGrader/backend/db/TestCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ class TestCase(Base):
task_id = Column(
Integer,
ForeignKey(Task.id, onupdate="CASCADE", ondelete="CASCADE"),
nullable=False
nullable=False,
index=True
)

input_file = relationship(
Expand Down

0 comments on commit fa20958

Please sign in to comment.