Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / db / migrations / 0005_auto__add_invitations.py @ df8a7015

History | View | Annotate | Download (10.8 kB)

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