Statistics
| Branch: | Tag: | Revision:

root / db / migrations / 0018_auto__add_field_virtualmachine_buildpercentage.py @ 19da4325

History | View | Annotate | Download (13.1 kB)

1
# encoding: utf-8
2
import datetime
3
from south.db import db
4
from south.v2 import SchemaMigration
5
from django.db import models
6

    
7
class Migration(SchemaMigration):
8

    
9
    def forwards(self, orm):
10
        
11
        # Adding field 'VirtualMachine.buildpercentage'
12
        db.add_column('db_virtualmachine', 'buildpercentage', self.gf('django.db.models.fields.IntegerField')(default=0), keep_default=False)
13

    
14

    
15
    def backwards(self, orm):
16
        
17
        # Deleting field 'VirtualMachine.buildpercentage'
18
        db.delete_column('db_virtualmachine', 'buildpercentage')
19

    
20

    
21
    models = {
22
        'db.debit': {
23
            'Meta': {'object_name': 'Debit'},
24
            'description': ('django.db.models.fields.TextField', [], {}),
25
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
26
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.SynnefoUser']"}),
27
            'vm': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.VirtualMachine']"}),
28
            'when': ('django.db.models.fields.DateTimeField', [], {})
29
        },
30
        'db.disk': {
31
            'Meta': {'object_name': 'Disk'},
32
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
33
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
34
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
35
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.SynnefoUser']", 'null': 'True', 'blank': 'True'}),
36
            'size': ('django.db.models.fields.PositiveIntegerField', [], {}),
37
            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
38
            'vm': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.VirtualMachine']", 'null': 'True', 'blank': 'True'})
39
        },
40
        'db.flavor': {
41
            'Meta': {'unique_together': "(('cpu', 'ram', 'disk'),)", 'object_name': 'Flavor'},
42
            'cpu': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
43
            'disk': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
44
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
45
            'ram': ('django.db.models.fields.IntegerField', [], {'default': '0'})
46
        },
47
        'db.flavorcost': {
48
            'Meta': {'object_name': 'FlavorCost'},
49
            'cost_active': ('django.db.models.fields.PositiveIntegerField', [], {}),
50
            'cost_inactive': ('django.db.models.fields.PositiveIntegerField', [], {}),
51
            'effective_from': ('django.db.models.fields.DateTimeField', [], {}),
52
            'flavor': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.Flavor']"}),
53
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
54
        },
55
        'db.image': {
56
            'Meta': {'object_name': 'Image'},
57
            'backend_id': ('django.db.models.fields.CharField', [], {'default': "'debian_base'", 'max_length': '50'}),
58
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
59
            'format': ('django.db.models.fields.CharField', [], {'default': "'dump'", 'max_length': '30'}),
60
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
61
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
62
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.SynnefoUser']", 'null': 'True', 'blank': 'True'}),
63
            'public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
64
            'sourcevm': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.VirtualMachine']", 'null': 'True'}),
65
            'state': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
66
            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
67
        },
68
        'db.imagemetadata': {
69
            'Meta': {'object_name': 'ImageMetadata'},
70
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
71
            'image': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.Image']"}),
72
            'meta_key': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
73
            'meta_value': ('django.db.models.fields.CharField', [], {'max_length': '500'})
74
        },
75
        'db.invitations': {
76
            'Meta': {'object_name': 'Invitations'},
77
            'accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
78
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
79
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
80
            'level': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
81
            'source': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['db.SynnefoUser']"}),
82
            'target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'target'", 'to': "orm['db.SynnefoUser']"}),
83
            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
84
        },
85
        'db.limit': {
86
            'Meta': {'object_name': 'Limit'},
87
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
88
            'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
89
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.SynnefoUser']"}),
90
            'value': ('django.db.models.fields.IntegerField', [], {})
91
        },
92
        'db.network': {
93
            'Meta': {'object_name': 'Network'},
94
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
95
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
96
            'link': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['db.NetworkLink']"}),
97
            'machines': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['db.VirtualMachine']", 'through': "orm['db.NetworkInterface']", 'symmetrical': 'False'}),
98
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
99
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.SynnefoUser']", 'null': 'True'}),
100
            'public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
101
            'state': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
102
            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
103
        },
104
        'db.networkinterface': {
105
            'Meta': {'object_name': 'NetworkInterface'},
106
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
107
            'firewall_profile': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
108
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
109
            'index': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
110
            'ipv4': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}),
111
            'ipv6': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
112
            'mac': ('django.db.models.fields.CharField', [], {'max_length': '17', 'null': 'True'}),
113
            'machine': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nics'", 'to': "orm['db.VirtualMachine']"}),
114
            'network': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nics'", 'to': "orm['db.Network']"}),
115
            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
116
        },
117
        'db.networklink': {
118
            'Meta': {'object_name': 'NetworkLink'},
119
            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
120
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
121
            'index': ('django.db.models.fields.IntegerField', [], {}),
122
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
123
            'network': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'null': 'True', 'to': "orm['db.Network']"})
124
        },
125
        'db.synnefouser': {
126
            'Meta': {'object_name': 'SynnefoUser'},
127
            'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}),
128
            'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
129
            'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
130
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
131
            'credit': ('django.db.models.fields.IntegerField', [], {}),
132
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
133
            'max_invitations': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
134
            'name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
135
            'realname': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
136
            'tmp_auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}),
137
            'tmp_auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
138
            'type': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
139
            'uniq': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
140
            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
141
        },
142
        'db.virtualmachine': {
143
            'Meta': {'object_name': 'VirtualMachine'},
144
            'action': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
145
            'backendjobid': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
146
            'backendjobstatus': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
147
            'backendlogmsg': ('django.db.models.fields.TextField', [], {'null': 'True'}),
148
            'backendopcode': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
149
            'buildpercentage': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
150
            'charged': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 7, 25, 11, 3, 17, 877945)'}),
151
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
152
            'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
153
            'flavor': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.Flavor']"}),
154
            'hostid': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
155
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
156
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
157
            'operstate': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
158
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.SynnefoUser']"}),
159
            'sourceimage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.Image']"}),
160
            'suspended': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
161
            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
162
        },
163
        'db.virtualmachinegroup': {
164
            'Meta': {'ordering': "['name']", 'object_name': 'VirtualMachineGroup'},
165
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
166
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
167
            'machines': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['db.VirtualMachine']", 'symmetrical': 'False'}),
168
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
169
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.SynnefoUser']"}),
170
            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
171
        },
172
        'db.virtualmachinemetadata': {
173
            'Meta': {'object_name': 'VirtualMachineMetadata'},
174
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
175
            'meta_key': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
176
            'meta_value': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
177
            'vm': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.VirtualMachine']"})
178
        }
179
    }
180

    
181
    complete_apps = ['db']