summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/migrations/0005_auto__add_target_image_file__add_target_file__add_field_variablehistor.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/orm/migrations/0005_auto__add_target_image_file__add_target_file__add_field_variablehistor.py')
-rw-r--r--bitbake/lib/toaster/orm/migrations/0005_auto__add_target_image_file__add_target_file__add_field_variablehistor.py301
1 files changed, 301 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/migrations/0005_auto__add_target_image_file__add_target_file__add_field_variablehistor.py b/bitbake/lib/toaster/orm/migrations/0005_auto__add_target_image_file__add_target_file__add_field_variablehistor.py
new file mode 100644
index 0000000..a55451c
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0005_auto__add_target_image_file__add_target_file__add_field_variablehistor.py
@@ -0,0 +1,301 @@
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 'Target_Image_File'
12 db.create_table(u'orm_target_image_file', (
13 (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('target', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Target'])),
15 ('file_name', self.gf('django.db.models.fields.FilePathField')(max_length=100)),
16 ('file_size', self.gf('django.db.models.fields.IntegerField')()),
17 ))
18 db.send_create_signal(u'orm', ['Target_Image_File'])
19
20 # Adding model 'Target_File'
21 db.create_table(u'orm_target_file', (
22 (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
23 ('target', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Target'])),
24 ('path', self.gf('django.db.models.fields.FilePathField')(max_length=100)),
25 ('size', self.gf('django.db.models.fields.IntegerField')()),
26 ('inodetype', self.gf('django.db.models.fields.IntegerField')()),
27 ('permission', self.gf('django.db.models.fields.IntegerField')()),
28 ('owner', self.gf('django.db.models.fields.CharField')(max_length=128)),
29 ('group', self.gf('django.db.models.fields.CharField')(max_length=128)),
30 ('directory', self.gf('django.db.models.fields.related.ForeignKey')(related_name='directory_set', to=orm['orm.Target_File'])),
31 ('sym_target', self.gf('django.db.models.fields.related.ForeignKey')(related_name='symlink_set', blank=True, to=orm['orm.Target_File'])),
32 ))
33 db.send_create_signal(u'orm', ['Target_File'])
34
35 # Adding field 'VariableHistory.value'
36 db.add_column(u'orm_variablehistory', 'value',
37 self.gf('django.db.models.fields.TextField')(default='', blank=True),
38 keep_default=False)
39
40 # Deleting field 'Recipe.licensing_info'
41 db.delete_column(u'orm_recipe', 'licensing_info')
42
43 # Deleting field 'Target.file_name'
44 db.delete_column(u'orm_target', 'file_name')
45
46 # Deleting field 'Target.file_size'
47 db.delete_column(u'orm_target', 'file_size')
48
49 # Deleting field 'Build.image_fstypes'
50 db.delete_column(u'orm_build', 'image_fstypes')
51
52 # Adding field 'Build.timespent'
53 db.add_column(u'orm_build', 'timespent',
54 self.gf('django.db.models.fields.IntegerField')(default=0),
55 keep_default=False)
56
57 # Adding field 'LogMessage.task'
58 db.add_column(u'orm_logmessage', 'task',
59 self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Task'], null=True, blank=True),
60 keep_default=False)
61
62
63 # Changing field 'Task.elapsed_time'
64 db.alter_column(u'orm_task', 'elapsed_time', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=6, decimal_places=2))
65 # Adding unique constraint on 'Task', fields ['build', 'recipe', 'task_name']
66 db.create_unique(u'orm_task', ['build_id', 'recipe_id', 'task_name'])
67
68
69 def backwards(self, orm):
70 # Removing unique constraint on 'Task', fields ['build', 'recipe', 'task_name']
71 db.delete_unique(u'orm_task', ['build_id', 'recipe_id', 'task_name'])
72
73 # Deleting model 'Target_Image_File'
74 db.delete_table(u'orm_target_image_file')
75
76 # Deleting model 'Target_File'
77 db.delete_table(u'orm_target_file')
78
79 # Deleting field 'VariableHistory.value'
80 db.delete_column(u'orm_variablehistory', 'value')
81
82 # Adding field 'Recipe.licensing_info'
83 db.add_column(u'orm_recipe', 'licensing_info',
84 self.gf('django.db.models.fields.TextField')(default='', blank=True),
85 keep_default=False)
86
87
88 # User chose to not deal with backwards NULL issues for 'Target.file_name'
89 raise RuntimeError("Cannot reverse this migration. 'Target.file_name' and its values cannot be restored.")
90
91 # The following code is provided here to aid in writing a correct migration # Adding field 'Target.file_name'
92 db.add_column(u'orm_target', 'file_name',
93 self.gf('django.db.models.fields.CharField')(max_length=100),
94 keep_default=False)
95
96
97 # User chose to not deal with backwards NULL issues for 'Target.file_size'
98 raise RuntimeError("Cannot reverse this migration. 'Target.file_size' and its values cannot be restored.")
99
100 # The following code is provided here to aid in writing a correct migration # Adding field 'Target.file_size'
101 db.add_column(u'orm_target', 'file_size',
102 self.gf('django.db.models.fields.IntegerField')(),
103 keep_default=False)
104
105
106 # User chose to not deal with backwards NULL issues for 'Build.image_fstypes'
107 raise RuntimeError("Cannot reverse this migration. 'Build.image_fstypes' and its values cannot be restored.")
108
109 # The following code is provided here to aid in writing a correct migration # Adding field 'Build.image_fstypes'
110 db.add_column(u'orm_build', 'image_fstypes',
111 self.gf('django.db.models.fields.CharField')(max_length=100),
112 keep_default=False)
113
114 # Deleting field 'Build.timespent'
115 db.delete_column(u'orm_build', 'timespent')
116
117 # Deleting field 'LogMessage.task'
118 db.delete_column(u'orm_logmessage', 'task_id')
119
120
121 # Changing field 'Task.elapsed_time'
122 db.alter_column(u'orm_task', 'elapsed_time', self.gf('django.db.models.fields.CharField')(max_length=50))
123
124 models = {
125 u'orm.build': {
126 'Meta': {'object_name': 'Build'},
127 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
128 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
129 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
130 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
131 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
132 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
133 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
134 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
135 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
136 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
137 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
138 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
139 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
140 },
141 u'orm.layer': {
142 'Meta': {'object_name': 'Layer'},
143 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
144 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
145 'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
146 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
147 },
148 u'orm.layer_version': {
149 'Meta': {'object_name': 'Layer_Version'},
150 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
151 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
152 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
153 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
154 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
155 'priority': ('django.db.models.fields.IntegerField', [], {})
156 },
157 u'orm.logmessage': {
158 'Meta': {'object_name': 'LogMessage'},
159 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
160 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
161 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
162 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
163 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
164 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
165 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
166 },
167 u'orm.package': {
168 'Meta': {'object_name': 'Package'},
169 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
170 'description': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
171 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
172 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
173 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
174 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
175 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
176 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
177 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
178 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
179 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
180 'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
181 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
182 },
183 u'orm.package_dependency': {
184 'Meta': {'object_name': 'Package_Dependency'},
185 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
186 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
187 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
188 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
189 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
190 },
191 u'orm.package_file': {
192 'Meta': {'object_name': 'Package_File'},
193 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
194 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
195 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
196 'size': ('django.db.models.fields.IntegerField', [], {})
197 },
198 u'orm.recipe': {
199 'Meta': {'object_name': 'Recipe'},
200 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
201 'description': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
202 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
203 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
204 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
205 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
206 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
207 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
208 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
209 'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
210 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
211 },
212 u'orm.recipe_dependency': {
213 'Meta': {'object_name': 'Recipe_Dependency'},
214 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
215 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
216 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
217 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
218 },
219 u'orm.target': {
220 'Meta': {'object_name': 'Target'},
221 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
222 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
223 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
224 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
225 },
226 u'orm.target_file': {
227 'Meta': {'object_name': 'Target_File'},
228 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'to': u"orm['orm.Target_File']"}),
229 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
230 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
231 'inodetype': ('django.db.models.fields.IntegerField', [], {}),
232 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
233 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
234 'permission': ('django.db.models.fields.IntegerField', [], {}),
235 'size': ('django.db.models.fields.IntegerField', [], {}),
236 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'blank': 'True', 'to': u"orm['orm.Target_File']"}),
237 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
238 },
239 u'orm.target_image_file': {
240 'Meta': {'object_name': 'Target_Image_File'},
241 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
242 'file_size': ('django.db.models.fields.IntegerField', [], {}),
243 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
244 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
245 },
246 u'orm.target_installed_package': {
247 'Meta': {'object_name': 'Target_Installed_Package'},
248 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
249 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
250 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
251 },
252 u'orm.task': {
253 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
254 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
255 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
256 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
257 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
258 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
259 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
260 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
261 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
262 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
263 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
264 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
265 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
266 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
267 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
268 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
269 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
270 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
271 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
272 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
273 },
274 u'orm.task_dependency': {
275 'Meta': {'object_name': 'Task_Dependency'},
276 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
277 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
278 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
279 },
280 u'orm.variable': {
281 'Meta': {'object_name': 'Variable'},
282 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
283 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
284 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
285 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
286 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
287 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
288 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
289 },
290 u'orm.variablehistory': {
291 'Meta': {'object_name': 'VariableHistory'},
292 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
293 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
294 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
295 'operation': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
296 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
297 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
298 }
299 }
300
301 complete_apps = ['orm'] \ No newline at end of file