Revision 2e15f9f6

b/snf-astakos-app/astakos/im/migrations/0051_auto__add_field_service_order.py
1
# encoding: utf-8
2
import datetime
3
from south.db import db
4
from south.v2 import SchemaMigration
5
from django.db import models
6

  
7
class Migration(SchemaMigration):
8

  
9
    def forwards(self, orm):
10
        
11
        # Adding field 'Service.order'
12
        db.add_column('im_service', 'order', self.gf('django.db.models.fields.PositiveIntegerField')(default=0), keep_default=False)
13

  
14

  
15
    def backwards(self, orm):
16
        
17
        # Deleting field 'Service.order'
18
        db.delete_column('im_service', 'order')
19

  
20

  
21
    models = {
22
        'auth.group': {
23
            'Meta': {'object_name': 'Group'},
24
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
25
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
26
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
27
        },
28
        'auth.permission': {
29
            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
30
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
31
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
32
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
33
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
34
        },
35
        'auth.user': {
36
            'Meta': {'object_name': 'User'},
37
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
38
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
39
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
40
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
41
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
42
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
43
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
44
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
45
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
46
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
47
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
48
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
49
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
50
        },
51
        'contenttypes.contenttype': {
52
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
53
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
54
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
55
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
56
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
57
        },
58
        'im.additionalmail': {
59
            'Meta': {'object_name': 'AdditionalMail'},
60
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
61
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
62
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
63
        },
64
        'im.approvalterms': {
65
            'Meta': {'object_name': 'ApprovalTerms'},
66
            'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 1, 9, 12, 50, 55, 170085)', 'db_index': 'True'}),
67
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
68
            'location': ('django.db.models.fields.CharField', [], {'max_length': '255'})
69
        },
70
        'im.astakosuser': {
71
            'Meta': {'object_name': 'AstakosUser', '_ormbases': ['auth.User']},
72
            'activation_sent': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
73
            'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
74
            'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
75
            'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
76
            'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
77
            'date_signed_terms': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
78
            'disturbed_quota': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
79
            'email_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
80
            'has_credits': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
81
            'has_signed_terms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
82
            'invitations': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
83
            'is_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
84
            'level': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
85
            'policy': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.AstakosUserQuota']", 'symmetrical': 'False'}),
86
            'provider': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
87
            'third_party_identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
88
            'updated': ('django.db.models.fields.DateTimeField', [], {}),
89
            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
90
            'uuid': ('django.db.models.fields.CharField', [], {'max_length': '255', 'unique': 'True', 'null': 'True'})
91
        },
92
        'im.astakosuserauthprovider': {
93
            'Meta': {'ordering': "('module', 'created')", 'unique_together': "(('identifier', 'module', 'user'),)", 'object_name': 'AstakosUserAuthProvider'},
94
            'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
95
            'affiliation': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'blank': 'True'}),
96
            'auth_backend': ('django.db.models.fields.CharField', [], {'default': "'astakos'", 'max_length': '255'}),
97
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
98
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
99
            'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
100
            'info_data': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}),
101
            'module': ('django.db.models.fields.CharField', [], {'default': "'local'", 'max_length': '255'}),
102
            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'auth_providers'", 'to': "orm['im.AstakosUser']"})
103
        },
104
        'im.astakosuserquota': {
105
            'Meta': {'unique_together': "(('resource', 'user'),)", 'object_name': 'AstakosUserQuota'},
106
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
107
            'limit': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
108
            'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"}),
109
            'uplimit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}),
110
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
111
        },
112
        'im.emailchange': {
113
            'Meta': {'object_name': 'EmailChange'},
114
            'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}),
115
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
116
            'new_email_address': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
117
            'requested_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 1, 9, 12, 50, 55, 170887)'}),
118
            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'emailchanges'", 'unique': 'True', 'to': "orm['im.AstakosUser']"})
119
        },
120
        'im.invitation': {
121
            'Meta': {'object_name': 'Invitation'},
122
            'code': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True'}),
123
            'consumed': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
124
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
125
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
126
            'inviter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'invitations_sent'", 'null': 'True', 'to': "orm['im.AstakosUser']"}),
127
            'is_consumed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
128
            'realname': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
129
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
130
        },
131
        'im.pendingthirdpartyuser': {
132
            'Meta': {'unique_together': "(('provider', 'third_party_identifier'),)", 'object_name': 'PendingThirdPartyUser'},
133
            'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
134
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
135
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
136
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
137
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
138
            'info': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}),
139
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
140
            'provider': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
141
            'third_party_identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
142
            'token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
143
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
144
        },
145
        'im.project': {
146
            'Meta': {'object_name': 'Project'},
147
            'application': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'project'", 'unique': 'True', 'to': "orm['im.ProjectApplication']"}),
148
            'creation_date': ('django.db.models.fields.DateTimeField', [], {}),
149
            'deactivation_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
150
            'deactivation_reason': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
151
            'deactivation_start_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
152
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
153
            'last_approval_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
154
            'members': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.AstakosUser']", 'through': "orm['im.ProjectMembership']", 'symmetrical': 'False'}),
155
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80', 'db_index': 'True'})
156
        },
157
        'im.projectapplication': {
158
            'Meta': {'object_name': 'ProjectApplication'},
159
            'applicant': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects_applied'", 'to': "orm['im.AstakosUser']"}),
160
            'comments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
161
            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
162
            'end_date': ('django.db.models.fields.DateTimeField', [], {}),
163
            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '255', 'null': 'True'}),
164
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
165
            'issue_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
166
            'limit_on_members_number': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
167
            'member_join_policy': ('django.db.models.fields.IntegerField', [], {}),
168
            'member_leave_policy': ('django.db.models.fields.IntegerField', [], {}),
169
            'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
170
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects_owned'", 'to': "orm['im.AstakosUser']"}),
171
            'precursor_application': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['im.ProjectApplication']", 'unique': 'True', 'null': 'True', 'blank': 'True'}),
172
            'resource_grants': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.ProjectResourceGrant']", 'blank': 'True'}),
173
            'start_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
174
            'state': ('django.db.models.fields.CharField', [], {'default': "'Pending'", 'max_length': '80'})
175
        },
176
        'im.projectmembership': {
177
            'Meta': {'unique_together': "(('person', 'project'),)", 'object_name': 'ProjectMembership'},
178
            'acceptance_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'db_index': 'True'}),
179
            'application': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'memberships'", 'null': 'True', 'to': "orm['im.ProjectApplication']"}),
180
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
181
            'leave_request_date': ('django.db.models.fields.DateField', [], {'null': 'True'}),
182
            'pending_application': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pending_memebrships'", 'null': 'True', 'to': "orm['im.ProjectApplication']"}),
183
            'pending_serial': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'db_index': 'True'}),
184
            'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}),
185
            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Project']"}),
186
            'request_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2013, 1, 9, 12, 50, 55, 174455)'}),
187
            'state': ('django.db.models.fields.IntegerField', [], {'default': '0'})
188
        },
189
        'im.projectmembershiphistory': {
190
            'Meta': {'object_name': 'ProjectMembershipHistory'},
191
            'date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime.now'}),
192
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
193
            'person': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
194
            'project': ('django.db.models.fields.BigIntegerField', [], {}),
195
            'reason': ('django.db.models.fields.IntegerField', [], {}),
196
            'serial': ('django.db.models.fields.BigIntegerField', [], {})
197
        },
198
        'im.projectresourcegrant': {
199
            'Meta': {'unique_together': "(('resource', 'project_application'),)", 'object_name': 'ProjectResourceGrant'},
200
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
201
            'member_capacity': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '100000000000000000000000000000000L', 'max_digits': '38', 'decimal_places': '0'}),
202
            'member_export_limit': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '100000000000000000000000000000000L', 'max_digits': '38', 'decimal_places': '0'}),
203
            'member_import_limit': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '100000000000000000000000000000000L', 'max_digits': '38', 'decimal_places': '0'}),
204
            'project_application': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.ProjectApplication']", 'null': 'True'}),
205
            'project_capacity': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '100000000000000000000000000000000L', 'max_digits': '38', 'decimal_places': '0'}),
206
            'project_export_limit': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '100000000000000000000000000000000L', 'max_digits': '38', 'decimal_places': '0'}),
207
            'project_import_limit': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '100000000000000000000000000000000L', 'max_digits': '38', 'decimal_places': '0'}),
208
            'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"})
209
        },
210
        'im.resource': {
211
            'Meta': {'unique_together': "(('name', 'service'),)", 'object_name': 'Resource'},
212
            'desc': ('django.db.models.fields.TextField', [], {'null': 'True'}),
213
            'group': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
214
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
215
            'meta': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.ResourceMetadata']", 'symmetrical': 'False'}),
216
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
217
            'service': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Service']"}),
218
            'unit': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'})
219
        },
220
        'im.resourcemetadata': {
221
            'Meta': {'object_name': 'ResourceMetadata'},
222
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
223
            'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
224
            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
225
        },
226
        'im.serial': {
227
            'Meta': {'object_name': 'Serial'},
228
            'serial': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
229
        },
230
        'im.service': {
231
            'Meta': {'object_name': 'Service'},
232
            'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
233
            'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
234
            'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
235
            'icon': ('django.db.models.fields.FilePathField', [], {'max_length': '100', 'blank': 'True'}),
236
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
237
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
238
            'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
239
            'url': ('django.db.models.fields.FilePathField', [], {'max_length': '100'})
240
        },
241
        'im.sessioncatalog': {
242
            'Meta': {'object_name': 'SessionCatalog'},
243
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
244
            'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
245
            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sessions'", 'null': 'True', 'to': "orm['im.AstakosUser']"})
246
        }
247
    }
248

  
249
    complete_apps = ['im']

Also available in: Unified diff