Revision e17979fe

b/snf-cyclades-app/synnefo/ui/userdata/migrations/0003_auto__chg_field_publickeypair_fingerprint__chg_field_publickeypair_use.py
5 5
from django.db import models
6 6

  
7 7
class Migration(SchemaMigration):
8
    
8

  
9 9
    def forwards(self, orm):
10
        
10

  
11 11
        # Changing field 'PublicKeyPair.fingerprint'
12 12
        db.alter_column('userdata_publickeypair', 'fingerprint', self.gf('django.db.models.fields.CharField')(max_length=100, blank=True))
13 13

  
......
17 17
        db.alter_column('userdata_publickeypair', 'user', self.gf('django.db.models.fields.CharField')(max_length=100))
18 18

  
19 19
        # Removing index on 'PublicKeyPair', fields ['user']
20
        db.delete_index('userdata_publickeypair', ['user_id'])
21
    
22
    
20
        try:
21
            db.delete_index('userdata_publickeypair', ['user_id'])
22
        except:
23
            pass
24

  
25

  
23 26
    def backwards(self, orm):
24
        
27

  
25 28
        # Changing field 'PublicKeyPair.fingerprint'
26 29
        db.alter_column('userdata_publickeypair', 'fingerprint', self.gf('django.db.models.fields.CharField')(max_length=100))
27 30

  
......
32 35

  
33 36
        # Adding index on 'PublicKeyPair', fields ['user']
34 37
        db.create_index('userdata_publickeypair', ['user_id'])
35
    
36
    
38

  
39

  
37 40
    models = {
38 41
        'userdata.publickeypair': {
39 42
            'Meta': {'object_name': 'PublicKeyPair'},
......
44 47
            'user': ('django.db.models.fields.CharField', [], {'max_length': '100'})
45 48
        }
46 49
    }
47
    
50

  
48 51
    complete_apps = ['userdata']

Also available in: Unified diff