diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 8aa7126a9b..8d4f21b420 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
@@ -23,6 +23,10 @@ from django.db import models | |||
23 | from django.db.models import F | 23 | from django.db.models import F |
24 | from django.utils.encoding import python_2_unicode_compatible | 24 | from django.utils.encoding import python_2_unicode_compatible |
25 | 25 | ||
26 | class Project(models.Model): | ||
27 | name = models.CharField(max_length=100) | ||
28 | created = models.DateTimeField(auto_now_add = True) | ||
29 | updated = models.DateTimeField(auto_now = True) | ||
26 | 30 | ||
27 | class Build(models.Model): | 31 | class Build(models.Model): |
28 | SUCCEEDED = 0 | 32 | SUCCEEDED = 0 |
@@ -37,6 +41,7 @@ class Build(models.Model): | |||
37 | 41 | ||
38 | search_allowed_fields = ['machine', 'cooker_log_path', "target__target", "target__target_image_file__file_name"] | 42 | search_allowed_fields = ['machine', 'cooker_log_path', "target__target", "target__target_image_file__file_name"] |
39 | 43 | ||
44 | project = models.ForeignKey(Project) | ||
40 | machine = models.CharField(max_length=100) | 45 | machine = models.CharField(max_length=100) |
41 | distro = models.CharField(max_length=100) | 46 | distro = models.CharField(max_length=100) |
42 | distro_version = models.CharField(max_length=100) | 47 | distro_version = models.CharField(max_length=100) |
@@ -54,6 +59,9 @@ class Build(models.Model): | |||
54 | tgts = Target.objects.filter(build_id = self.id).order_by( 'target' ); | 59 | tgts = Target.objects.filter(build_id = self.id).order_by( 'target' ); |
55 | return( tgts ); | 60 | return( tgts ); |
56 | 61 | ||
62 | class ProjectTarget(models.Model): | ||
63 | project = models.ForeignKey(Project) | ||
64 | target = models.CharField(max_length=100) | ||
57 | 65 | ||
58 | @python_2_unicode_compatible | 66 | @python_2_unicode_compatible |
59 | class Target(models.Model): | 67 | class Target(models.Model): |
@@ -324,6 +332,12 @@ class Recipe_Dependency(models.Model): | |||
324 | dep_type = models.IntegerField(choices=DEPENDS_TYPE) | 332 | dep_type = models.IntegerField(choices=DEPENDS_TYPE) |
325 | objects = Recipe_DependencyManager() | 333 | objects = Recipe_DependencyManager() |
326 | 334 | ||
335 | class ProjectLayer(models.Model): | ||
336 | project = models.ForeignKey(Project) | ||
337 | name = models.CharField(max_length = 100) | ||
338 | giturl = models.CharField(max_length = 254) | ||
339 | commit = models.CharField(max_length = 254) | ||
340 | |||
327 | class Layer(models.Model): | 341 | class Layer(models.Model): |
328 | name = models.CharField(max_length=100) | 342 | name = models.CharField(max_length=100) |
329 | local_path = models.FilePathField(max_length=255) | 343 | local_path = models.FilePathField(max_length=255) |
@@ -338,6 +352,11 @@ class Layer_Version(models.Model): | |||
338 | priority = models.IntegerField() | 352 | priority = models.IntegerField() |
339 | 353 | ||
340 | 354 | ||
355 | class ProjectVariable(models.Model): | ||
356 | project = models.ForeignKey(Project) | ||
357 | name = models.CharField(max_length=100) | ||
358 | value = models.TextField(blank = True) | ||
359 | |||
341 | class Variable(models.Model): | 360 | class Variable(models.Model): |
342 | search_allowed_fields = ['variable_name', 'variable_value', | 361 | search_allowed_fields = ['variable_name', 'variable_value', |
343 | 'vhistory__file_name', "description"] | 362 | 'vhistory__file_name', "description"] |