Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / migrations / 0052_auto__del_field_project_deactivation_start_date__add_field_project_sta.py @ 123be68a

History | View | Annotate | Download (20.9 kB)

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
        # Deleting field 'Project.deactivation_start_date'
12
        db.delete_column('im_project', 'deactivation_start_date')
13

    
14
        # Adding field 'Project.state'
15
        db.add_column('im_project', 'state', self.gf('django.db.models.fields.IntegerField')(default=256, db_index=True), keep_default=False)
16

    
17

    
18
    def backwards(self, orm):
19
        
20
        # Adding field 'Project.deactivation_start_date'
21
        db.add_column('im_project', 'deactivation_start_date', self.gf('django.db.models.fields.DateTimeField')(null=True), keep_default=False)
22

    
23
        # Deleting field 'Project.state'
24
        db.delete_column('im_project', 'state')
25

    
26

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

    
255
    complete_apps = ['im']