diff options
Diffstat (limited to 'django/db/backends/sqlite3')
| -rw-r--r-- | django/db/backends/sqlite3/schema.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/db/backends/sqlite3/schema.py b/django/db/backends/sqlite3/schema.py index 8c6db9776a..c206a020d5 100644 --- a/django/db/backends/sqlite3/schema.py +++ b/django/db/backends/sqlite3/schema.py @@ -161,6 +161,9 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): """ Alters M2Ms to repoint their to= endpoints. """ + if old_field.rel.through == new_field.rel.through: + return + # Make a new through table self.create_model(new_field.rel.through) # Copy the data across |
