diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-01-08 11:17:18 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-08 23:03:48 +0000 |
commit | e45fff6314741d46e2549b2f72ed380cbbb95593 (patch) | |
tree | 5b97b497a5496cd92a663baa68ec569b9d274214 /lib/toaster/orm/models.py | |
parent | 85c416ca338c886db6e79651e44727482df9fb07 (diff) | |
download | bitbake-e45fff6314741d46e2549b2f72ed380cbbb95593.tar.gz |
toaster: add Provider model
Added new model Provider and a foreign key 'via' to link
Recipe_Dependency to it.
[YOCTO #6169]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/orm/models.py')
-rw-r--r-- | lib/toaster/orm/models.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py index 6e87c5447..e4ab0bbc4 100644 --- a/lib/toaster/orm/models.py +++ b/lib/toaster/orm/models.py @@ -733,6 +733,10 @@ class Recipe_DependencyManager(models.Manager): def get_queryset(self): return super(Recipe_DependencyManager, self).get_queryset().exclude(recipe_id = F('depends_on__id')) +class Provides(models.Model): + name = models.CharField(max_length=100) + recipe = models.ForeignKey(Recipe) + class Recipe_Dependency(models.Model): TYPE_DEPENDS = 0 TYPE_RDEPENDS = 1 @@ -743,6 +747,7 @@ class Recipe_Dependency(models.Model): ) recipe = models.ForeignKey(Recipe, related_name='r_dependencies_recipe') depends_on = models.ForeignKey(Recipe, related_name='r_dependencies_depends') + via = models.ForeignKey(Provides, null=True, default=None) dep_type = models.IntegerField(choices=DEPENDS_TYPE) objects = Recipe_DependencyManager() |