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