Skip to content

Commit

Permalink
[tmp] 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 f7ea3ec commit 9ceb437
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 @@ -3705,6 +3705,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 9ceb437

Please sign in to comment.