Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / db / migrations / 0040_auto__chg_field_networkinterface_index.py @ 3b56bbe4

History | View | Annotate | Download (10.8 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
        # Changing field 'NetworkInterface.index'
12
        db.alter_column('db_networkinterface', 'index', self.gf('django.db.models.fields.IntegerField')())
13
    
14
    
15
    def backwards(self, orm):
16
        
17
        # Changing field 'NetworkInterface.index'
18
        db.alter_column('db_networkinterface', 'index', self.gf('django.db.models.fields.IntegerField')(null=True))
19
    
20
    
21
    models = {
22
        'db.backend': {
23
            'Meta': {'object_name': 'Backend'},
24
            'clustername': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
25
            'ctotal': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
26
            'dfree': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
27
            'drained': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
28
            'dtotal': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
29
            'hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
30
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
31
            'mfree': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
32
            'mtotal': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
33
            'offline': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
34
            'password': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
35
            'pinst_cnt': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
36
            'port': ('django.db.models.fields.PositiveIntegerField', [], {'default': '5080'}),
37
            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
38
            'username': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'})
39
        },
40
        'db.backendnetwork': {
41
            'Meta': {'object_name': 'BackendNetwork'},
42
            'backend': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'networks'", 'to': "orm['db.Backend']"}),
43
            'backendjobid': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
44
            'backendjobstatus': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
45
            'backendlogmsg': ('django.db.models.fields.TextField', [], {'null': 'True'}),
46
            'backendopcode': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
47
            'backendtime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1, 1, 1, 0, 0)'}),
48
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
49
            'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
50
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
51
            'network': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'backend_networks'", 'to': "orm['db.Network']"}),
52
            'operstate': ('django.db.models.fields.CharField', [], {'default': "'PENDING'", 'max_length': '30'}),
53
            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
54
        },
55
        'db.bridgepool': {
56
            'Meta': {'object_name': 'BridgePool'},
57
            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
58
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
59
            'index': ('django.db.models.fields.IntegerField', [], {'unique': 'True'}),
60
            'value': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'})
61
        },
62
        'db.flavor': {
63
            'Meta': {'unique_together': "(('cpu', 'ram', 'disk', 'disk_template'),)", 'object_name': 'Flavor'},
64
            'cpu': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
65
            'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
66
            'disk': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
67
            'disk_template': ('django.db.models.fields.CharField', [], {'default': "'drbd'", 'max_length': '32'}),
68
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
69
            'ram': ('django.db.models.fields.IntegerField', [], {'default': '0'})
70
        },
71
        'db.macprefixpool': {
72
            'Meta': {'object_name': 'MacPrefixPool'},
73
            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
74
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
75
            'index': ('django.db.models.fields.IntegerField', [], {'unique': 'True'}),
76
            'value': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'})
77
        },
78
        'db.network': {
79
            'Meta': {'object_name': 'Network'},
80
            'action': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '32', 'null': 'True'}),
81
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
82
            'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
83
            'dhcp': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
84
            'gateway': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}),
85
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
86
            'link': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}),
87
            'mac_prefix': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}),
88
            'machines': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['db.VirtualMachine']", 'through': "orm['db.NetworkInterface']", 'symmetrical': 'False'}),
89
            'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
90
            'public': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
91
            'state': ('django.db.models.fields.CharField', [], {'default': "'PENDING'", 'max_length': '32'}),
92
            'subnet': ('django.db.models.fields.CharField', [], {'default': "'10.0.0.0/24'", 'max_length': '32'}),
93
            'type': ('django.db.models.fields.CharField', [], {'default': "'PRIVATE_VLAN'", 'max_length': '50'}),
94
            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
95
            'userid': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'})
96
        },
97
        'db.networkinterface': {
98
            'Meta': {'object_name': 'NetworkInterface'},
99
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
100
            'firewall_profile': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
101
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
102
            'index': ('django.db.models.fields.IntegerField', [], {}),
103
            'ipv4': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}),
104
            'ipv6': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
105
            'mac': ('django.db.models.fields.CharField', [], {'max_length': '17', 'null': 'True'}),
106
            'machine': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nics'", 'to': "orm['db.VirtualMachine']"}),
107
            'network': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nics'", 'to': "orm['db.Network']"}),
108
            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
109
        },
110
        'db.virtualmachine': {
111
            'Meta': {'object_name': 'VirtualMachine'},
112
            'action': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
113
            'backend': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'virtual_machines'", 'null': 'True', 'to': "orm['db.Backend']"}),
114
            'backend_hash': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}),
115
            'backendjobid': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
116
            'backendjobstatus': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
117
            'backendlogmsg': ('django.db.models.fields.TextField', [], {'null': 'True'}),
118
            'backendopcode': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
119
            'backendtime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(1, 1, 1, 0, 0)'}),
120
            'buildpercentage': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
121
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
122
            'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
123
            'flavor': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.Flavor']"}),
124
            'hostid': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
125
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
126
            'imageid': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
127
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
128
            'operstate': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
129
            'suspended': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
130
            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
131
            'userid': ('django.db.models.fields.CharField', [], {'max_length': '100'})
132
        },
133
        'db.virtualmachinemetadata': {
134
            'Meta': {'unique_together': "(('meta_key', 'vm'),)", 'object_name': 'VirtualMachineMetadata'},
135
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
136
            'meta_key': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
137
            'meta_value': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
138
            'vm': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'metadata'", 'to': "orm['db.VirtualMachine']"})
139
        }
140
    }
141
    
142
    complete_apps = ['db']