From 48a483420e0dea5a371e3be4f93ca3eca98fd6df Mon Sep 17 00:00:00 2001 From: KnucklesSG1 Date: Tue, 30 Jul 2024 16:32:41 -0500 Subject: [PATCH] Added missing fields. --- gitlab_api/gitlab_db_models.py | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/gitlab_api/gitlab_db_models.py b/gitlab_api/gitlab_db_models.py index 506fcca..457269b 100644 --- a/gitlab_api/gitlab_db_models.py +++ b/gitlab_api/gitlab_db_models.py @@ -721,15 +721,26 @@ class MergeRequestDBModel(BaseDBModel): backref=backref("author_merge_requests"), ) + assignee_id = Column( + Integer, + ForeignKey(column="users.id", name="fk_merge_request_assignee"), + nullable=True, + ) + assignee = relationship( + argument="UserDBModel", + foreign_keys=[assignee_id], + backref=backref("merge_request_assignee"), + ) + assignees_id = Column( Integer, - ForeignKey(column="users_collection.id", name="fk_merge_request_assignee"), + ForeignKey(column="users_collection.id", name="fk_merge_request_assignees"), nullable=True, ) assignees = relationship( argument="UsersDBModel", foreign_keys=[assignees_id], - backref=backref("assigned_merge_requests"), + backref=backref("merge_request_assignees"), ) milestone_id = Column( @@ -868,6 +879,17 @@ class MergeRequestDBModel(BaseDBModel): backref=backref("merge_requests"), ) + reviewer_id = Column( + Integer, + ForeignKey(column="users.id", name="fk_merge_request_reviewer"), + nullable=True, + ) + reviewer = relationship( + argument="UserDBModel", + foreign_keys=[reviewer_id], + backref=backref("merge_request_reviewer"), + ) + reviewers_id = Column( Integer, ForeignKey(column="users_collection.id", name="fk_merge_request_reviewers"), @@ -876,7 +898,7 @@ class MergeRequestDBModel(BaseDBModel): reviewers = relationship( argument="UsersDBModel", foreign_keys=[reviewers_id], - backref=backref("reviewed_merge_requests"), + backref=backref("merge_request_reviewers"), ) approved_by_id = Column(