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 9ceb437 commit e2d4e65
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 e2d4e65

Please sign in to comment.