Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame^] | 1 | # -*- coding: utf-8 -*- |
| 2 | from south.utils import datetime_utils as datetime |
| 3 | from south.db import db |
| 4 | from south.v2 import SchemaMigration |
| 5 | from django.db import models |
| 6 | |
| 7 | |
| 8 | class Migration(SchemaMigration): |
| 9 | |
| 10 | def forwards(self, orm): |
| 11 | # Adding model 'BuildEnvironment' |
| 12 | db.create_table(u'bldcontrol_buildenvironment', ( |
| 13 | (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
| 14 | ('address', self.gf('django.db.models.fields.CharField')(max_length=254)), |
| 15 | ('betype', self.gf('django.db.models.fields.IntegerField')()), |
| 16 | ('bbaddress', self.gf('django.db.models.fields.CharField')(max_length=254, blank=True)), |
| 17 | ('bbport', self.gf('django.db.models.fields.IntegerField')(default=-1)), |
| 18 | ('bbtoken', self.gf('django.db.models.fields.CharField')(max_length=126, blank=True)), |
| 19 | ('bbstate', self.gf('django.db.models.fields.IntegerField')(default=0)), |
| 20 | ('lock', self.gf('django.db.models.fields.IntegerField')(default=0)), |
| 21 | ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), |
| 22 | ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), |
| 23 | )) |
| 24 | db.send_create_signal(u'bldcontrol', ['BuildEnvironment']) |
| 25 | |
| 26 | # Adding model 'BuildRequest' |
| 27 | db.create_table(u'bldcontrol_buildrequest', ( |
| 28 | (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
| 29 | ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Project'])), |
| 30 | ('build', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Build'], null=True)), |
| 31 | ('state', self.gf('django.db.models.fields.IntegerField')(default=0)), |
| 32 | ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), |
| 33 | ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), |
| 34 | )) |
| 35 | db.send_create_signal(u'bldcontrol', ['BuildRequest']) |
| 36 | |
| 37 | # Adding model 'BRLayer' |
| 38 | db.create_table(u'bldcontrol_brlayer', ( |
| 39 | (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
| 40 | ('req', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['bldcontrol.BuildRequest'])), |
| 41 | ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), |
| 42 | ('giturl', self.gf('django.db.models.fields.CharField')(max_length=254)), |
| 43 | ('commit', self.gf('django.db.models.fields.CharField')(max_length=254)), |
| 44 | )) |
| 45 | db.send_create_signal(u'bldcontrol', ['BRLayer']) |
| 46 | |
| 47 | # Adding model 'BRVariable' |
| 48 | db.create_table(u'bldcontrol_brvariable', ( |
| 49 | (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
| 50 | ('req', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['bldcontrol.BuildRequest'])), |
| 51 | ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), |
| 52 | ('value', self.gf('django.db.models.fields.TextField')(blank=True)), |
| 53 | )) |
| 54 | db.send_create_signal(u'bldcontrol', ['BRVariable']) |
| 55 | |
| 56 | # Adding model 'BRTarget' |
| 57 | db.create_table(u'bldcontrol_brtarget', ( |
| 58 | (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
| 59 | ('req', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['bldcontrol.BuildRequest'])), |
| 60 | ('target', self.gf('django.db.models.fields.CharField')(max_length=100)), |
| 61 | ('task', self.gf('django.db.models.fields.CharField')(max_length=100, null=True)), |
| 62 | )) |
| 63 | db.send_create_signal(u'bldcontrol', ['BRTarget']) |
| 64 | |
| 65 | |
| 66 | def backwards(self, orm): |
| 67 | # Deleting model 'BuildEnvironment' |
| 68 | db.delete_table(u'bldcontrol_buildenvironment') |
| 69 | |
| 70 | # Deleting model 'BuildRequest' |
| 71 | db.delete_table(u'bldcontrol_buildrequest') |
| 72 | |
| 73 | # Deleting model 'BRLayer' |
| 74 | db.delete_table(u'bldcontrol_brlayer') |
| 75 | |
| 76 | # Deleting model 'BRVariable' |
| 77 | db.delete_table(u'bldcontrol_brvariable') |
| 78 | |
| 79 | # Deleting model 'BRTarget' |
| 80 | db.delete_table(u'bldcontrol_brtarget') |
| 81 | |
| 82 | |
| 83 | models = { |
| 84 | u'bldcontrol.brlayer': { |
| 85 | 'Meta': {'object_name': 'BRLayer'}, |
| 86 | 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}), |
| 87 | 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}), |
| 88 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 89 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 90 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}) |
| 91 | }, |
| 92 | u'bldcontrol.brtarget': { |
| 93 | 'Meta': {'object_name': 'BRTarget'}, |
| 94 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 95 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}), |
| 96 | 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 97 | 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}) |
| 98 | }, |
| 99 | u'bldcontrol.brvariable': { |
| 100 | 'Meta': {'object_name': 'BRVariable'}, |
| 101 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 102 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 103 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}), |
| 104 | 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}) |
| 105 | }, |
| 106 | u'bldcontrol.buildenvironment': { |
| 107 | 'Meta': {'object_name': 'BuildEnvironment'}, |
| 108 | 'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}), |
| 109 | 'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}), |
| 110 | 'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), |
| 111 | 'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}), |
| 112 | 'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}), |
| 113 | 'betype': ('django.db.models.fields.IntegerField', [], {}), |
| 114 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
| 115 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 116 | 'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}), |
| 117 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) |
| 118 | }, |
| 119 | u'bldcontrol.buildrequest': { |
| 120 | 'Meta': {'object_name': 'BuildRequest'}, |
| 121 | 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}), |
| 122 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
| 123 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 124 | 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}), |
| 125 | 'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}), |
| 126 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) |
| 127 | }, |
| 128 | u'orm.build': { |
| 129 | 'Meta': {'object_name': 'Build'}, |
| 130 | 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}), |
| 131 | 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 132 | 'completed_on': ('django.db.models.fields.DateTimeField', [], {}), |
| 133 | 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}), |
| 134 | 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 135 | 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 136 | 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}), |
| 137 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 138 | 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 139 | 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}), |
| 140 | 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}), |
| 141 | 'started_on': ('django.db.models.fields.DateTimeField', [], {}), |
| 142 | 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}), |
| 143 | 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}) |
| 144 | }, |
| 145 | u'orm.project': { |
| 146 | 'Meta': {'object_name': 'Project'}, |
| 147 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
| 148 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
| 149 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
| 150 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | complete_apps = ['bldcontrol'] |