src/cm/migrations/0007_populate_id_key_in_comments.py
changeset 520 0228f30668f1
parent 130 f257ad33bed5
equal deleted inserted replaced
519:e89c25780e6e 520:0228f30668f1
     5 
     5 
     6 class Migration:
     6 class Migration:
     7     
     7     
     8     def forwards(self, orm):
     8     def forwards(self, orm):
     9         "Write your forwards migration here"
     9         "Write your forwards migration here"
    10         for c in Comment.objects.all():
    10         for c in orm.Comment.objects.all():
    11             c.id_key = c.key
    11             c.id_key = c.key
    12             c.save()    
    12             c.save()    
    13     
    13     
    14     def backwards(self, orm):
    14     def backwards(self, orm):
    15         "Write your backwards migration here"
    15         "Write your backwards migration here"