diff options
author | Dan McGee <dan@archlinux.org> | 2012-07-31 20:07:15 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-07-31 20:07:15 -0500 |
commit | 566a9803dd4928fa2145ef14da2d59d2631eeb05 (patch) | |
tree | 52093f61b5dafbea894f5f4f69a009cb1fa20075 /packages/models.py | |
parent | 71859672267ccfc15e31398c5d86f5c0f69f0ed7 (diff) |
Add new deptype column to package depends
This is more flexible than our existing 'optional' boolean and will
allow us to import check and make depends into the database as well as
what we are already doing.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages/models.py')
-rw-r--r-- | packages/models.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/models.py b/packages/models.py index 1d538cce..b3752b6c 100644 --- a/packages/models.py +++ b/packages/models.py @@ -403,10 +403,19 @@ class RelatedToBase(models.Model): class Depend(RelatedToBase): + DEPTYPE_CHOICES = ( + ('D', 'Depend'), + ('O', 'Optional Depend'), + ('M', 'Make Depend'), + ('C', 'Check Depend'), + ) + pkg = models.ForeignKey(Package, related_name='depends') comparison = models.CharField(max_length=255, default='') optional = models.BooleanField(default=False) description = models.TextField(null=True, blank=True) + deptype = models.CharField(max_length=1, default='D', + choices=DEPTYPE_CHOICES) class Conflict(RelatedToBase): |