Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge 0b89736 into 36a17be

  • Loading branch information...
commit b8b26fd0ea6b356c43f13a5f8ecafe6ad188197c 2 parents 36a17be + 0b89736
Jean-Louis Fuchs ganwell authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/db/backends/base/
2  django/db/backends/base/
@@ -710,7 +710,7 @@ def _alter_field(self, model, old_field, new_field, old_type, new_type,
# Does it have a foreign key?
if new_field.rel and \
- (fks_dropped or (old_field.rel and not old_field.db_constraint)) and \
+ (fks_dropped or not old_field.rel or not old_field.db_constraint) and \
self.execute(self._create_fk_sql(model, new_field, "_fk_%(to_table)s_%(to_column)s"))
# Rebuild FKs that pointed to us if we previously had to drop them
Please sign in to comment.
Something went wrong with that request. Please try again.