diff options
author | Dan McGee <dan@archlinux.org> | 2014-03-29 12:28:05 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2014-03-29 12:28:05 -0500 |
commit | 6a09ffdd8e7ed12b73d181f0530510562ec7e316 (patch) | |
tree | 97538701be27f55d28e608702e34c2a75e52a97e /mirrors | |
parent | 945337177d35a5c038e29b6594e1251f26d42156 (diff) |
Protect ORM migration portion in db.dry_run
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors')
-rw-r--r-- | mirrors/migrations/0028_auto__add_field_mirror_last_modified.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py b/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py index dbd4b129..35e80733 100644 --- a/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py +++ b/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py @@ -11,7 +11,8 @@ class Migration(SchemaMigration): db.add_column(u'mirrors_mirror', 'last_modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now()), keep_default=False) - orm.Mirror.objects.update(last_modified=models.F('created')) + if not db.dry_run: + orm.Mirror.objects.update(last_modified=models.F('created')) def backwards(self, orm): db.delete_column(u'mirrors_mirror', 'last_modified') |