1
# Copyright 2011 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
4
"""The `PackagesetSources` linking table.
6
This table associates `Packageset`s with `SourcePackageName`s.
14
from storm.locals import (
21
class PackagesetSources(Storm):
22
"""Linking table: which packages are in a package set?"""
23
# This table is largely managed from Packageset, but also directly
24
# accessed from other places.
26
__storm_table__ = 'PackagesetSources'
28
# There's a vestigial id as well, a holdover from the SQLObject
29
# days. Nobody seems to use it. The only key that matters is
30
# (packageset, sourcepackagename).
33
'sourcepackagename_id',
36
packageset_id = Int(name='packageset')
37
packageset = Reference(packageset_id, 'Packageset.id')
38
sourcepackagename_id = Int(name='sourcepackagename')
39
sourcepackagename = Reference(
40
sourcepackagename_id, 'SourcePackageName.id')