summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-06-09 11:36:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-11 10:35:47 +0100
commitb5a928af721026795be7b7f68b2dd577408afbe5 (patch)
tree578ba9fb6ffbd31baea949d79f38cb48e370a269 /bitbake/lib
parent9c3b53f12e4f463cacdcde94103525a129029924 (diff)
downloadpoky-b5a928af721026795be7b7f68b2dd577408afbe5.tar.gz
bitbake: toaster: add Project class models to orm
This patch adds the Project class models to the toaster GUI data model. There is no specified use, and the link in the Build class is optional. (Bitbake rev: 38f77a43d16e202d1f40632b27cb70dd20d02a5e) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/toaster/orm/migrations/0009_auto__add_projectvariable__add_projectlayer__add_projecttarget__add_pr.py286
-rw-r--r--bitbake/lib/toaster/orm/models.py2
2 files changed, 287 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/orm/migrations/0009_auto__add_projectvariable__add_projectlayer__add_projecttarget__add_pr.py b/bitbake/lib/toaster/orm/migrations/0009_auto__add_projectvariable__add_projectlayer__add_projecttarget__add_pr.py
new file mode 100644
index 0000000000..175998dc22
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0009_auto__add_projectvariable__add_projectlayer__add_projecttarget__add_pr.py
@@ -0,0 +1,286 @@
1# -*- coding: utf-8 -*-
2from south.utils import datetime_utils as datetime
3from south.db import db
4from south.v2 import SchemaMigration
5from django.db import models
6
7
8class Migration(SchemaMigration):
9
10 def forwards(self, orm):
11 # Adding model 'ProjectVariable'
12 db.create_table(u'orm_projectvariable', (
13 (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Project'])),
15 ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
16 ('value', self.gf('django.db.models.fields.TextField')(blank=True)),
17 ))
18 db.send_create_signal(u'orm', ['ProjectVariable'])
19
20 # Adding model 'ProjectLayer'
21 db.create_table(u'orm_projectlayer', (
22 (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
23 ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Project'])),
24 ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
25 ('giturl', self.gf('django.db.models.fields.CharField')(max_length=254)),
26 ('commit', self.gf('django.db.models.fields.CharField')(max_length=254)),
27 ))
28 db.send_create_signal(u'orm', ['ProjectLayer'])
29
30 # Adding model 'ProjectTarget'
31 db.create_table(u'orm_projecttarget', (
32 (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
33 ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Project'])),
34 ('target', self.gf('django.db.models.fields.CharField')(max_length=100)),
35 ))
36 db.send_create_signal(u'orm', ['ProjectTarget'])
37
38 # Adding model 'Project'
39 db.create_table(u'orm_project', (
40 (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
41 ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
42 ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
43 ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
44 ))
45 db.send_create_signal(u'orm', ['Project'])
46
47 # Adding field 'Build.project'
48 db.add_column(u'orm_build', 'project',
49 self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Project'], null=True),
50 keep_default=False)
51
52
53 def backwards(self, orm):
54 # Deleting model 'ProjectVariable'
55 db.delete_table(u'orm_projectvariable')
56
57 # Deleting model 'ProjectLayer'
58 db.delete_table(u'orm_projectlayer')
59
60 # Deleting model 'ProjectTarget'
61 db.delete_table(u'orm_projecttarget')
62
63 # Deleting model 'Project'
64 db.delete_table(u'orm_project')
65
66 # Deleting field 'Build.project'
67 db.delete_column(u'orm_build', 'project_id')
68
69
70 models = {
71 u'orm.build': {
72 'Meta': {'object_name': 'Build'},
73 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
74 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
75 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
76 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
77 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
78 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
79 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
80 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
81 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
82 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
83 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
84 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
85 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
86 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
87 },
88 u'orm.helptext': {
89 'Meta': {'object_name': 'HelpText'},
90 'area': ('django.db.models.fields.IntegerField', [], {}),
91 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
92 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
93 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
94 'text': ('django.db.models.fields.TextField', [], {})
95 },
96 u'orm.layer': {
97 'Meta': {'object_name': 'Layer'},
98 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
99 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
100 'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
101 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
102 },
103 u'orm.layer_version': {
104 'Meta': {'object_name': 'Layer_Version'},
105 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
106 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
107 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
108 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
109 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
110 'priority': ('django.db.models.fields.IntegerField', [], {})
111 },
112 u'orm.logmessage': {
113 'Meta': {'object_name': 'LogMessage'},
114 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
115 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
116 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
117 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
118 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
119 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
120 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
121 },
122 u'orm.package': {
123 'Meta': {'object_name': 'Package'},
124 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
125 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
126 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
127 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
128 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
129 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
130 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
131 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
132 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
133 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
134 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
135 'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
136 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
137 },
138 u'orm.package_dependency': {
139 'Meta': {'object_name': 'Package_Dependency'},
140 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
141 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
142 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
143 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
144 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
145 },
146 u'orm.package_file': {
147 'Meta': {'object_name': 'Package_File'},
148 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
149 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
150 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
151 'size': ('django.db.models.fields.IntegerField', [], {})
152 },
153 u'orm.project': {
154 'Meta': {'object_name': 'Project'},
155 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
156 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
157 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
158 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
159 },
160 u'orm.projectlayer': {
161 'Meta': {'object_name': 'ProjectLayer'},
162 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
163 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
164 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
165 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
166 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
167 },
168 u'orm.projecttarget': {
169 'Meta': {'object_name': 'ProjectTarget'},
170 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
171 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
172 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
173 },
174 u'orm.projectvariable': {
175 'Meta': {'object_name': 'ProjectVariable'},
176 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
177 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
178 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
179 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
180 },
181 u'orm.recipe': {
182 'Meta': {'object_name': 'Recipe'},
183 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
184 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
185 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
186 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
187 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
188 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
189 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
190 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
191 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
192 'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
193 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
194 },
195 u'orm.recipe_dependency': {
196 'Meta': {'object_name': 'Recipe_Dependency'},
197 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
198 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
199 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
200 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
201 },
202 u'orm.target': {
203 'Meta': {'object_name': 'Target'},
204 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
205 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
206 'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
207 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
208 'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
209 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
210 },
211 u'orm.target_file': {
212 'Meta': {'object_name': 'Target_File'},
213 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
214 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
215 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
216 'inodetype': ('django.db.models.fields.IntegerField', [], {}),
217 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
218 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
219 'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
220 'size': ('django.db.models.fields.IntegerField', [], {}),
221 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
222 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
223 },
224 u'orm.target_image_file': {
225 'Meta': {'object_name': 'Target_Image_File'},
226 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
227 'file_size': ('django.db.models.fields.IntegerField', [], {}),
228 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
229 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
230 },
231 u'orm.target_installed_package': {
232 'Meta': {'object_name': 'Target_Installed_Package'},
233 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
234 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
235 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
236 },
237 u'orm.task': {
238 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
239 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
240 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
241 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
242 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
243 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
244 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
245 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
246 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
247 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
248 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
249 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
250 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
251 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
252 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
253 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
254 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
255 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
256 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
257 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
258 },
259 u'orm.task_dependency': {
260 'Meta': {'object_name': 'Task_Dependency'},
261 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
262 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
263 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
264 },
265 u'orm.variable': {
266 'Meta': {'object_name': 'Variable'},
267 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
268 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
269 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
270 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
271 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
272 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
273 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
274 },
275 u'orm.variablehistory': {
276 'Meta': {'object_name': 'VariableHistory'},
277 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
278 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
279 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
280 'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
281 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
282 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
283 }
284 }
285
286 complete_apps = ['orm'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 8d4f21b420..b67afe139c 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -41,7 +41,7 @@ class Build(models.Model):
41 41
42 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"]
43 43
44 project = models.ForeignKey(Project) 44 project = models.ForeignKey(Project, null = True)
45 machine = models.CharField(max_length=100) 45 machine = models.CharField(max_length=100)
46 distro = models.CharField(max_length=100) 46 distro = models.CharField(max_length=100)
47 distro_version = models.CharField(max_length=100) 47 distro_version = models.CharField(max_length=100)