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