diff --git a/hub/persistence/models/user_applications.py b/hub/persistence/models/user_applications.py index d4c856af..978803f8 100644 --- a/hub/persistence/models/user_applications.py +++ b/hub/persistence/models/user_applications.py @@ -7,7 +7,7 @@ Project Coder Guille Gutierrez Guillermo.GutierrezMorote@concordia.ca import datetime -from sqlalchemy import Column, Integer, ForeignKey +from sqlalchemy import Column, Integer, ForeignKey, PrimaryKeyConstraint from sqlalchemy import DateTime from hub.persistence.db_config import Base @@ -23,6 +23,7 @@ class UserApplications(Base): created = Column(DateTime, default=datetime.datetime.utcnow) updated = Column(DateTime, default=datetime.datetime.utcnow) + __table_args__ = (PrimaryKeyConstraint(user_id, application_id),) def __init__(self, user_id, application_id): self.user_id = user_id