summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMarkus Holtermann <info@markusholtermann.eu>2014-10-31 14:08:24 +0100
committerTim Graham <timograham@gmail.com>2014-10-31 13:30:56 -0400
commit40ad022d5e366f56424dcdb885607d13c00a550e (patch)
tree39d95750106a98ada7d98df26649612a20163634 /django
parent12bace46c1ca089e075ac9a2aac142302967a1c5 (diff)
[1.7.x] Fixed #23738 -- Allowed migrating from NULL to NOT NULL with the same default value
Thanks to Andrey Antukh for the report. Backport of 715ccfde24 from master
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/schema.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/schema.py b/django/db/backends/schema.py
index 154f452967..64ba5b0740 100644
--- a/django/db/backends/schema.py
+++ b/django/db/backends/schema.py
@@ -613,7 +613,7 @@ class BaseDatabaseSchemaEditor(object):
# directly run a (NOT) NULL alteration
actions = actions + null_actions
# Combine actions together if we can (e.g. postgres)
- if self.connection.features.supports_combined_alters:
+ if self.connection.features.supports_combined_alters and actions:
sql, params = tuple(zip(*actions))
actions = [(", ".join(sql), reduce(operator.add, params))]
# Apply those actions