Skip to content

Commit

Permalink
Add unique constraint to model for group-role-assoc
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Aug 29, 2024
1 parent 642013a commit 3895a81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3706,6 +3706,7 @@ def __init__(self, user, role):

class GroupRoleAssociation(Base, RepresentById):
__tablename__ = "group_role_association"
__table_args__ = (UniqueConstraint("group_id", "role_id"),)

id: Mapped[int] = mapped_column(primary_key=True)
group_id: Mapped[int] = mapped_column(ForeignKey("galaxy_group.id"), index=True, nullable=True)
Expand Down

0 comments on commit 3895a81

Please sign in to comment.