summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/schema.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/db/backends/schema.py b/django/db/backends/schema.py
index d4573a4be8..a82524b2a0 100644
--- a/django/db/backends/schema.py
+++ b/django/db/backends/schema.py
@@ -367,6 +367,8 @@ class BaseDatabaseSchemaEditor(object):
"""
Renames the table a model points to.
"""
+ if old_db_table == new_db_table:
+ return
self.execute(self.sql_rename_table % {
"old_table": self.quote_name(old_db_table),
"new_table": self.quote_name(new_db_table),