Skip to content

Commit

Permalink
Add unique constraint to model for user-group-assoc
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Aug 29, 2024
1 parent 1842ce9 commit 72816c0
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 @@ -2968,6 +2968,7 @@ def __init__(self, name=None):

class UserGroupAssociation(Base, RepresentById):
__tablename__ = "user_group_association"
__table_args__ = (UniqueConstraint("user_id", "group_id"),)

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

0 comments on commit 72816c0

Please sign in to comment.