Revision e1017df9

b/snf-astakos-app/astakos/im/migrations/0021_auto__chg_field_project_name.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
        # Changing field 'Project.name'
12
        db.alter_column('im_project', 'name', self.gf('django.db.models.fields.CharField')(max_length=80, unique=True, null=True))
13

  
14

  
15
    def backwards(self, orm):
16
        
17
        # Changing field 'Project.name'
18
        db.alter_column('im_project', 'name', self.gf('django.db.models.fields.CharField')(default='', max_length=80, unique=True))
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', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': '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
            'capacity': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}),
107
            'export_limit': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '100000000000000000000000000000000L', 'max_digits': '38', 'decimal_places': '0'}),
108
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
109
            'import_limit': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '100000000000000000000000000000000L', 'max_digits': '38', 'decimal_places': '0'}),
110
            'quantity': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'}),
111
            'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"}),
112
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
113
        },
114
        'im.chain': {
115
            'Meta': {'object_name': 'Chain'},
116
            'chain': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
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', [], {'auto_now_add': 'True', 'blank': 'True'}),
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', 'null': 'True', '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', 'null': 'True', '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', 'null': 'True', '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', [], {'auto_now_add': 'True', 'blank': 'True'}),
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
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
159
            'is_modified': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
160
            'last_approval_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
161
            'members': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.AstakosUser']", 'through': "orm['im.ProjectMembership']", 'symmetrical': 'False'}),
162
            'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True', 'null': 'True', 'db_index': 'True'}),
163
            'state': ('django.db.models.fields.IntegerField', [], {'default': '1', 'db_index': 'True'})
164
        },
165
        'im.projectapplication': {
166
            'Meta': {'unique_together': "(('chain', 'id'),)", 'object_name': 'ProjectApplication'},
167
            'applicant': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects_applied'", 'to': "orm['im.AstakosUser']"}),
168
            'chain': ('django.db.models.fields.IntegerField', [], {}),
169
            'comments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
170
            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
171
            'end_date': ('django.db.models.fields.DateTimeField', [], {}),
172
            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '255', 'null': 'True'}),
173
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
174
            'issue_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
175
            'limit_on_members_number': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
176
            'member_join_policy': ('django.db.models.fields.IntegerField', [], {}),
177
            'member_leave_policy': ('django.db.models.fields.IntegerField', [], {}),
178
            'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
179
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects_owned'", 'to': "orm['im.AstakosUser']"}),
180
            'precursor_application': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.ProjectApplication']", 'null': 'True', 'blank': 'True'}),
181
            'resource_grants': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.ProjectResourceGrant']", 'blank': 'True'}),
182
            'response_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
183
            'start_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
184
            'state': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'})
185
        },
186
        'im.projectmembership': {
187
            'Meta': {'unique_together': "(('person', 'project'),)", 'object_name': 'ProjectMembership'},
188
            'acceptance_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'db_index': 'True'}),
189
            'application': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'memberships'", 'null': 'True', 'to': "orm['im.ProjectApplication']"}),
190
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
191
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
192
            'is_pending': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
193
            'leave_request_date': ('django.db.models.fields.DateField', [], {'null': 'True'}),
194
            'pending_application': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pending_memberships'", 'null': 'True', 'to': "orm['im.ProjectApplication']"}),
195
            'pending_serial': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'db_index': 'True'}),
196
            'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}),
197
            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Project']"}),
198
            'request_date': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}),
199
            'state': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'})
200
        },
201
        'im.projectmembershiphistory': {
202
            'Meta': {'object_name': 'ProjectMembershipHistory'},
203
            'date': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}),
204
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
205
            'person': ('django.db.models.fields.BigIntegerField', [], {}),
206
            'project': ('django.db.models.fields.BigIntegerField', [], {}),
207
            'reason': ('django.db.models.fields.IntegerField', [], {}),
208
            'serial': ('django.db.models.fields.BigIntegerField', [], {})
209
        },
210
        'im.projectresourcegrant': {
211
            'Meta': {'unique_together': "(('resource', 'project_application'),)", 'object_name': 'ProjectResourceGrant'},
212
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
213
            'member_capacity': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '100000000000000000000000000000000L', 'max_digits': '38', 'decimal_places': '0'}),
214
            'member_export_limit': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '100000000000000000000000000000000L', 'max_digits': '38', 'decimal_places': '0'}),
215
            'member_import_limit': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '100000000000000000000000000000000L', 'max_digits': '38', 'decimal_places': '0'}),
216
            'project_application': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.ProjectApplication']", 'null': 'True'}),
217
            'project_capacity': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '100000000000000000000000000000000L', 'max_digits': '38', 'decimal_places': '0'}),
218
            'project_export_limit': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '100000000000000000000000000000000L', 'max_digits': '38', 'decimal_places': '0'}),
219
            'project_import_limit': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '100000000000000000000000000000000L', 'max_digits': '38', 'decimal_places': '0'}),
220
            'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"})
221
        },
222
        'im.resource': {
223
            'Meta': {'unique_together': "(('service', 'name'),)", 'object_name': 'Resource'},
224
            'desc': ('django.db.models.fields.TextField', [], {'null': 'True'}),
225
            'group': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
226
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
227
            'meta': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.ResourceMetadata']", 'symmetrical': 'False'}),
228
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
229
            'service': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Service']"}),
230
            'unit': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
231
            'uplimit': ('synnefo.lib.db.intdecimalfield.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'})
232
        },
233
        'im.resourcemetadata': {
234
            'Meta': {'object_name': 'ResourceMetadata'},
235
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
236
            'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
237
            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
238
        },
239
        'im.serial': {
240
            'Meta': {'object_name': 'Serial'},
241
            'serial': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
242
        },
243
        'im.service': {
244
            'Meta': {'ordering': "('order',)", 'object_name': 'Service'},
245
            'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
246
            'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
247
            'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
248
            'icon': ('django.db.models.fields.FilePathField', [], {'max_length': '100', 'blank': 'True'}),
249
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
250
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
251
            'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
252
            'url': ('django.db.models.fields.FilePathField', [], {'max_length': '100'})
253
        },
254
        'im.sessioncatalog': {
255
            'Meta': {'object_name': 'SessionCatalog'},
256
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
257
            'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
258
            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sessions'", 'null': 'True', 'to': "orm['im.AstakosUser']"})
259
        }
260
    }
261

  
262
    complete_apps = ['im']
b/snf-astakos-app/astakos/im/models.py
1532 1532
            conflicting_project = Project.objects.get(q)
1533 1533
            if (conflicting_project != project):
1534 1534
                m = (_("cannot approve: project with name '%s' "
1535
                       "already exists (serial: %s)") % (
1535
                       "already exists (id: %s)") % (
1536 1536
                        new_project_name, conflicting_project.id))
1537 1537
                raise PermissionDenied(m) # invalid argument
1538 1538
        except Project.DoesNotExist:
......
1686 1686
    creation_date               =   models.DateTimeField(auto_now_add=True)
1687 1687
    name                        =   models.CharField(
1688 1688
                                            max_length=80,
1689
                                            null=True,
1689 1690
                                            db_index=True,
1690 1691
                                            unique=True)
1691 1692

  
......
1767 1768
    def terminate(self):
1768 1769
        self.deactivation_reason = 'TERMINATED'
1769 1770
        self.state = self.TERMINATED
1771
        self.name = None
1770 1772
        self.save()
1771 1773

  
1772 1774
    def suspend(self):

Also available in: Unified diff