fix(models.package_dependency): add DepTypeID to PKs

This was stopping us from using numerous records for each dep type.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-01-04 01:05:37 -08:00
parent 2cb9de0800
commit 8ffff6261b
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
2 changed files with 6 additions and 12 deletions

View file

@ -16,7 +16,11 @@ class PackageDependency(Base):
__table__ = schema.PackageDepends
__tablename__ = __table__.name
__mapper_args__ = {
"primary_key": [__table__.c.PackageID, __table__.c.DepName]
"primary_key": [
__table__.c.PackageID,
__table__.c.DepTypeID,
__table__.c.DepName,
]
}
Package = relationship(