diff --git a/server/models/errors.py b/server/models/errors.py index 017e8cf..d1afe74 100644 --- a/server/models/errors.py +++ b/server/models/errors.py @@ -6,8 +6,10 @@ class Errors(Base): __tablename__: str = 'errors' - run_id: Mapped[int] = mapped_column(Integer(), ForeignKey("run.run_id"), primary_key=True) - submission_id: Mapped[int] = mapped_column(Integer(), ForeignKey("submission.submission_id"), primary_key=True) + run_id: Mapped[int] = mapped_column(Integer(), primary_key=True) # run id pk + run_id_fk: Mapped[int] = mapped_column(Integer(), ForeignKey("run.run_id")) # run id + submission_id: Mapped[int] = mapped_column(Integer(), primary_key=True) # submission id + submission_id_fk: Mapped[int] = mapped_column(Integer(), ForeignKey("submission.submission_id")) # submission id fk error_txt: Mapped[str] = mapped_column(String(), nullable=True) diff --git a/server/models/turn_table.py b/server/models/turn_table.py index 94dd879..4b1c1c5 100644 --- a/server/models/turn_table.py +++ b/server/models/turn_table.py @@ -7,7 +7,8 @@ class TurnTable(Base): __tablename__: str = 'turn_table' turn_number: Mapped[int] = mapped_column(Integer(), primary_key=True) - run_id: Mapped[int] = mapped_column(Integer(), ForeignKey('run.run_id'), primary_key=True) + run_id: Mapped[int] = mapped_column(Integer(), primary_key=True) + run_id_fk: Mapped[int] = mapped_column(Integer(), ForeignKey('run.run_id')) turn_data: Mapped[str] = mapped_column(LargeBinary(), nullable=False)