Patchwork [bitbake-devel,31/94] bitbake: webhob: orm change to remove Target

login
register
mail settings
Submitter Alexandru DAMIAN
Date Sept. 24, 2013, 4:52 p.m.
Message ID <be34511d888dd2efa693f3ee763012e4218573f7.1380041477.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/58789/
State New
Headers show

Comments

Alexandru DAMIAN - Sept. 24, 2013, 4:52 p.m.
From: Alexandru DAMIAN <alexandru.damian@intel.com>

Removes the Target dependency as it is replaced
by a field in Build.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 bitbake/lib/webhob/orm/models.py | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

Patch

diff --git a/bitbake/lib/webhob/orm/models.py b/bitbake/lib/webhob/orm/models.py
index 83126d8..e6663a3 100644
--- a/bitbake/lib/webhob/orm/models.py
+++ b/bitbake/lib/webhob/orm/models.py
@@ -14,6 +14,7 @@  class Build(models.Model):
 
     uuid = models.CharField(max_length=100, unique=True)
     target = models.CharField(max_length=100)
+    is_image = models.BooleanField()
     machine = models.ForeignKey('Machine', related_name='build_machine')
     distro = models.CharField(max_length=100)
     distro_version = models.CharField(max_length=100)
@@ -98,24 +99,14 @@  class Task_Dependency(models.Model):
     depends_on = models.ForeignKey(Task, related_name='task_dependencies_depends')
 
 
-class Target(models.Model):
-    build = models.ForeignKey(Build, related_name='target_build')
-    is_image = models.BooleanField()
-
-
 class Artifact(models.Model):
     build = models.ForeignKey(Build, related_name='artifact_build')
-    target = models.ForeignKey(Target, related_name='artifact_target')
     file_name = models.CharField(max_length=100)
     file_size = models.IntegerField()
 
 
-class Package_In_Image(models.Model):
-    package = models.ForeignKey('Package', related_name='package_in_image_package')
-    target = models.ForeignKey(Target, related_name='package_in_image_target')
-
-
 class Package(models.Model):
+    build = models.ForeignKey('Build', related_name='package_build')
     recipe = models.ForeignKey('Recipe', related_name='package_recipe')
     name = models.CharField(max_length=100)
     version = models.CharField(max_length=100)