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