Project

General

Profile

« Previous | Next » 

Revision 26fb2895

Added by Jérôme Schneider over 10 years ago

ressources: test db.dry_run on migration 0009

Refs. #5014

View differences:

calebasse/ressources/migrations/0009_auto__add_field_school_display_name.py
12 12
        db.add_column(u'ressources_school', 'display_name',
13 13
                      self.gf('django.db.models.fields.CharField')(default='', max_length=256, null=True, blank=True),
14 14
                      keep_default=False)
15
        from calebasse.ressources.models import School
16
        for school in School.objects.all():
17
            school.save()
15
        if not db.dry_run:
16
            from calebasse.ressources.models import School
17
            for school in School.objects.all():
18
                school.save()
18 19

  
19 20

  
20 21
    def backwards(self, orm):

Also available in: Unified diff