summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2014-03-29 18:28:05 +0100
committerDan McGee <dan@archlinux.org>2014-03-29 18:28:05 +0100
commit6a09ffdd8e7ed12b73d181f0530510562ec7e316 (patch)
tree97538701be27f55d28e608702e34c2a75e52a97e
parent945337177d35a5c038e29b6594e1251f26d42156 (diff)
downloadarchweb-6a09ffdd8e7ed12b73d181f0530510562ec7e316.tar.gz
archweb-6a09ffdd8e7ed12b73d181f0530510562ec7e316.tar.xz
Protect ORM migration portion in db.dry_run
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--mirrors/migrations/0028_auto__add_field_mirror_last_modified.py3
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 dbd4b12..35e8073 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')