Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / db / migrations / 0016_auto__add_field_synnefouser_max_invitations.py @ f32e8021

History | View | Annotate | Download (13 kB)

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