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